diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rwxr-xr-x | win/configure | 62 | ||||
-rw-r--r-- | win/configure.in | 23 | ||||
-rw-r--r-- | win/tclWinPort.h | 9 |
4 files changed, 101 insertions, 2 deletions
@@ -1,3 +1,12 @@ +2004-03-05 Mo DeJong <mdejong@users.sourceforge.net> + + * win/configure: Regen. + * win/configure.in: Check for define of + MWMO_ALERTABLE in winuser.h. + * win/tclWinPort.h: If MWMO_ALERTABLE + is not defined in winuser.h then define it. + This is needed for Mingw. + 2004-03-05 Kevin B. Kenny <kennykb@acm.org> * generic/tclTest.c: Modified TesteventObjCmd to use diff --git a/win/configure b/win/configure index b8f441a..80fb8e6 100755 --- a/win/configure +++ b/win/configure @@ -2869,6 +2869,68 @@ _ACEOF fi +# See if MWMO_ALERTABLE is missing from winuser.h +# This is known to be a problem with Mingw. + +echo "$as_me:$LINENO: checking for MWMO_ALERTABLE in winuser.h" >&5 +echo $ECHO_N "checking for MWMO_ALERTABLE in winuser.h... $ECHO_C" >&6 +if test "${tcl_cv_mwmo_alertable+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 () +{ + + int i = MWMO_ALERTABLE; + + ; + 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_mwmo_alertable=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_mwmo_alertable=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $tcl_cv_mwmo_alertable" >&5 +echo "${ECHO_T}$tcl_cv_mwmo_alertable" >&6 +if test "$tcl_cv_mwmo_alertable" = "no"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NO_MWMO_ALERTABLE 1 +_ACEOF + +fi + #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- diff --git a/win/configure.in b/win/configure.in index 170672d..8f8b064 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.77 2004/03/02 00:42:51 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.78 2004/03/05 21:27:46 mdejong Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.57) @@ -287,6 +287,27 @@ if test "$tcl_cv_findex_enums" = "no"; then [Defined when enums are missing from winbase.h]) fi +# See if MWMO_ALERTABLE is missing from winuser.h +# This is known to be a problem with Mingw. + +AC_CACHE_CHECK(for MWMO_ALERTABLE in winuser.h, + tcl_cv_mwmo_alertable, +AC_TRY_COMPILE([ +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#undef WIN32_LEAN_AND_MEAN +], +[ + int i = MWMO_ALERTABLE; +], + tcl_cv_mwmo_alertable=yes, + tcl_cv_mwmo_alertable=no) +) +if test "$tcl_cv_mwmo_alertable" = "no"; then + AC_DEFINE(HAVE_NO_MWMO_ALERTABLE, 1, + [Defined when MWMO_ALERTABLE is missing from winuser.h]) +fi + #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 1848e03..dd36806 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.38 2003/08/27 21:52:41 davygrvy Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.39 2004/03/05 21:27:46 mdejong Exp $ */ #ifndef _TCLWINPORT @@ -446,6 +446,13 @@ #endif /* + * Older version of Mingw are known to lack a MWMO_ALERTABLE define. + */ +#if defined(HAVE_NO_MWMO_ALERTABLE) +# define MWMO_ALERTABLE 2 +#endif + +/* * The following defines wrap the system memory allocation routines for * use by tclAlloc.c. */ |