summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2003-04-14 02:36:57 (GMT)
committermdejong <mdejong>2003-04-14 02:36:57 (GMT)
commit0642c2ce3305c22c76c707fe3a2b4adc74c36c72 (patch)
treeda9db3b4445736bddeaa994bdd7e2c453a4a5ba8
parent37ff37a0b748da5dcebf15c20e744d8573aeb7a6 (diff)
downloadtcl-0642c2ce3305c22c76c707fe3a2b4adc74c36c72.zip
tcl-0642c2ce3305c22c76c707fe3a2b4adc74c36c72.tar.gz
tcl-0642c2ce3305c22c76c707fe3a2b4adc74c36c72.tar.bz2
* win/configure: Regen.
* win/configure.in: Add check for FINDEX_INFO_LEVELS from winbase.h, known to be a problem in VC++ 5.2. Define HAVE_NO_FINDEX_ENUMS if the define does not exist. * win/tclWinFile.c: Put declarations for FINDEX_INFO_LEVELS and FINDEX_SEARCH_OPS inside a check for HAVE_NO_FINDEX_ENUMS so that these are not declared twice. This fixes the Mingw build. * win/tclWinTime.c: Rework the init of timeInfo so that the number or initializers matches the declaration. This was broken under Mingw. Add cast to avoid compile warning when calling the AccumulateSample function.
-rw-r--r--ChangeLog17
-rwxr-xr-xwin/configure64
-rw-r--r--win/configure.in25
-rw-r--r--win/tclWinFile.c4
-rw-r--r--win/tclWinTime.c10
5 files changed, 112 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 985aeeb..75b4ade 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2003-04-13 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * win/configure: Regen.
+ * win/configure.in: Add check for FINDEX_INFO_LEVELS
+ from winbase.h, known to be a problem in VC++ 5.2.
+ Define HAVE_NO_FINDEX_ENUMS if the define does not
+ exist.
+ * win/tclWinFile.c: Put declarations for
+ FINDEX_INFO_LEVELS and FINDEX_SEARCH_OPS inside
+ a check for HAVE_NO_FINDEX_ENUMS so that these are
+ not declared twice. This fixes the Mingw build.
+ * win/tclWinTime.c: Rework the init of timeInfo
+ so that the number or initializers matches the
+ declaration. This was broken under Mingw. Add
+ cast to avoid compile warning when calling the
+ AccumulateSample function.
+
2003-04-12 Jeff Hobbs <jeffh@ActiveState.com>
* win/Makefile.in (GENERIC_OBJS): add missing tclPathObj.c
diff --git a/win/configure b/win/configure
index 031e866..0d13280 100755
--- a/win/configure
+++ b/win/configure
@@ -2795,6 +2795,70 @@ _ACEOF
fi
+# See if declarations like FINDEX_INFO_LEVELS are
+# missing from winbase.h. This is known to be
+# a problem with VC++ 5.2.
+
+echo "$as_me:$LINENO: checking for FINDEX_INFO_LEVELS in winbase.h" >&5
+echo $ECHO_N "checking for FINDEX_INFO_LEVELS in winbase.h... $ECHO_C" >&6
+if test "${tcl_cv_findex_enums+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+int
+main ()
+{
+
+ FINDEX_INFO_LEVELS i;
+ FINDEX_SEARCH_OPS j;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_findex_enums=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_findex_enums=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_findex_enums" >&5
+echo "${ECHO_T}$tcl_cv_findex_enums" >&6
+if test "$tcl_cv_findex_enums" = "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_FINDEX_ENUMS 1
+_ACEOF
+
+fi
+
#--------------------------------------------------------------------
# Determines the correct binary file extension (.o, .obj, .exe etc.)
#--------------------------------------------------------------------
diff --git a/win/configure.in b/win/configure.in
index c88ba3d..dbc36d6 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.72 2003/04/03 02:24:12 mdejong Exp $
+# RCS: @(#) $Id: configure.in,v 1.73 2003/04/14 02:36:58 mdejong Exp $
AC_INIT(../generic/tcl.h)
AC_PREREQ(2.57)
@@ -259,6 +259,29 @@ if test "$tcl_cv_cast_to_union" = "yes"; then
fi
+# See if declarations like FINDEX_INFO_LEVELS are
+# missing from winbase.h. This is known to be
+# a problem with VC++ 5.2.
+
+AC_CACHE_CHECK(for FINDEX_INFO_LEVELS in winbase.h,
+ tcl_cv_findex_enums,
+AC_TRY_COMPILE([
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+],
+[
+ FINDEX_INFO_LEVELS i;
+ FINDEX_SEARCH_OPS j;
+],
+ tcl_cv_findex_enums=yes,
+ tcl_cv_findex_enums=no)
+)
+if test "$tcl_cv_findex_enums" = "no"; then
+ AC_DEFINE(HAVE_NO_FINDEX_ENUMS, 1,
+ [Defined when enums are missing from winbase.h])
+fi
+
#--------------------------------------------------------------------
# Determines the correct binary file extension (.o, .obj, .exe etc.)
#--------------------------------------------------------------------
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 895747a..faa1759 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.45 2003/04/11 16:00:13 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.46 2003/04/14 02:36:58 mdejong Exp $
*/
//#define _WIN32_WINNT 0x0500
@@ -128,6 +128,7 @@ typedef struct {
WCHAR dummyBuf[MAX_PATH*3];
} DUMMY_REPARSE_BUFFER;
+#ifdef HAVE_NO_FINDEX_ENUMS
/* These two aren't in VC++ 5.2 headers */
typedef enum _FINDEX_INFO_LEVELS {
FindExInfoStandard,
@@ -139,6 +140,7 @@ typedef enum _FINDEX_SEARCH_OPS {
FindExSearchLimitToDevices,
FindExSearchMaxSearchOp
} FINDEX_SEARCH_OPS;
+#endif /* HAVE_NO_FINDEX_ENUMS */
/* Other typedefs required by this code */
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 5e3b66b..975b78f 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinTime.c,v 1.15 2003/04/12 19:08:56 kennykb Exp $
+ * RCS: @(#) $Id: tclWinTime.c,v 1.16 2003/04/14 02:36:58 mdejong Exp $
*/
#include "tclWinInt.h"
@@ -106,6 +106,7 @@ static TimeInfo timeInfo = {
(HANDLE) NULL,
(HANDLE) NULL,
#ifdef HAVE_CAST_TO_UNION
+ (LARGE_INTEGER) (LONGLONG) 0,
(ULARGE_INTEGER) (DWORDLONG) 0,
(LARGE_INTEGER) (LONGLONG) 0,
(LARGE_INTEGER) (LONGLONG) 0,
@@ -113,13 +114,10 @@ static TimeInfo timeInfo = {
0,
0,
0,
-#endif
- 0,
- 0,
0,
+#endif
{ 0 },
{ 0 },
- 0,
0
};
@@ -875,7 +873,7 @@ UpdateTimeEachSecond()
*/
estFreq = AccumulateSample( curPerfCounter.QuadPart,
- curFileTime.QuadPart );
+ (ULONGLONG) curFileTime.QuadPart );
/*
* We want to adjust things so that time appears to be continuous.