summaryrefslogtreecommitdiffstats
path: root/win/configure.in
diff options
context:
space:
mode:
authormdejong <mdejong>2003-01-27 02:19:55 (GMT)
committermdejong <mdejong>2003-01-27 02:19:55 (GMT)
commit60b96992277a21af6c79074d66edf3a069abf734 (patch)
tree83788b8dece0b2e2e04f753732f38c93a6efa6e1 /win/configure.in
parentbb7fd9a6b22b81948f940088e8e810b7d3673fd1 (diff)
downloadtcl-60b96992277a21af6c79074d66edf3a069abf734.zip
tcl-60b96992277a21af6c79074d66edf3a069abf734.tar.gz
tcl-60b96992277a21af6c79074d66edf3a069abf734.tar.bz2
* win/configure: Regen.
* win/configure.in: Add test that checks to see if the compiler can cast to a union type. * win/tclWinTime.c: Squelch compiler warning about union initializer by casting to union type when compiling with gcc.
Diffstat (limited to 'win/configure.in')
-rw-r--r--win/configure.in22
1 files changed, 21 insertions, 1 deletions
diff --git a/win/configure.in b/win/configure.in
index 16591e6..b195e2b 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -3,7 +3,7 @@
# generate the file "configure", which is run during Tcl installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.64 2003/01/25 12:48:12 mdejong Exp $
+# RCS: @(#) $Id: configure.in,v 1.65 2003/01/27 02:19:57 mdejong Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.13)
@@ -224,6 +224,26 @@ if test "$tcl_cv_malloc_decl_alloca" = "no" &&
[Defined when gcc should use inline ASM to call alloca.])
fi
+# See if the compiler supports casting to a union type.
+# This is used to stop gcc from printing a compiler
+# warning when initializing a union member.
+
+AC_CACHE_CHECK(for cast to union support,
+ tcl_cv_cast_to_union,
+AC_TRY_COMPILE([],
+[
+ union foo { int i; double d; };
+ union foo f = (union foo) (int) 0;
+],
+ tcl_cv_cast_to_union=yes,
+ tcl_cv_cast_to_union=no)
+)
+if test "$tcl_cv_cast_to_union" = "yes"; then
+ AC_DEFINE(HAVE_CAST_TO_UNION, 1,
+ [Defined when compiler supports casting to union type.])
+fi
+
+
#--------------------------------------------------------------------
# Determines the correct binary file extension (.o, .obj, .exe etc.)
#--------------------------------------------------------------------