diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | generic/tcl.h | 16 | ||||
-rw-r--r-- | generic/tclInt.decls | 12 | ||||
-rw-r--r-- | generic/tclIntPlatDecls.h | 14 | ||||
-rw-r--r-- | generic/tclPort.h | 14 | ||||
-rwxr-xr-x | win/configure | 135 | ||||
-rw-r--r-- | win/configure.in | 20 | ||||
-rw-r--r-- | win/tcl.m4 | 16 | ||||
-rw-r--r-- | win/tclWinError.c | 6 | ||||
-rw-r--r-- | win/tclWinPipe.c | 6 | ||||
-rw-r--r-- | win/tclWinPort.h | 4 |
11 files changed, 131 insertions, 125 deletions
@@ -1,3 +1,16 @@ +2010-01-22 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tclInt.decls Don't use DWORD and HANDLE here + * generic/tclIntPlatDecls.h + * generic/tcl.h Revert [2009-12-21] change, in stead + * generic/tclPort.h resolve the CYGWIN inclusion problems by + * win/tclWinPort.h re-arranging the inclusions at other places. + * win/tclWinError.c + * win/tclWinPipe.c + * win/tcl.m4 Make cygwin configuration error into + * win/configure.in a warning: CYGWIN compilation works + * win/configure although there still are test failures. + 2010-01-22 Donal K. Fellows <dkf@users.sf.net> * generic/tclExecute.c (TclExecuteByteCode): Improve error code diff --git a/generic/tcl.h b/generic/tcl.h index fb8a27b..bcf0251 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.296 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.297 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCL @@ -128,12 +128,6 @@ extern "C" { #define TCL_DECLARE_MUTEX(name) #endif -#if defined(__CYGWIN__) && defined(__WIN32__) -/* Cygwin/win32 needs winsock2.h to be included BEFORE stdio.h, - * otherwise there will be symbol conflicts with sys/types.h! */ -# include <winsock2.h> -#endif - /* * Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and * SEEK_END, all #define'd by stdio.h . @@ -144,7 +138,13 @@ extern "C" { * prior Tcl releases. */ -#include <stdio.h> +#if 1 +# ifndef NULL +# define NULL ((void *) 0) +# endif +#else +# include <stdio.h> +#endif /* * Support for functions with a variable number of arguments. diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 2d0e460..478c719 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.141 2009/12/16 23:26:01 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.142 2010/01/22 13:02:50 nijtmans Exp $ library tcl @@ -876,7 +876,7 @@ declare 216 generic { } declare 217 generic { int TclPushStackFrame(Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr, - Tcl_Namespace *namespacePtr, int isProcCallFrame ) + Tcl_Namespace *namespacePtr, int isProcCallFrame) } declare 218 generic { void TclPopStackFrame(Tcl_Interp *interp) @@ -1002,10 +1002,10 @@ interface tclIntPlat # Windows specific functions declare 0 win { - void TclWinConvertError(DWORD errCode) + void TclWinConvertError(unsigned long errCode) } declare 1 win { - void TclWinConvertWSAError(DWORD errCode) + void TclWinConvertWSAError(unsigned long errCode) } declare 2 win { struct servent *TclWinGetServByName(const char *nm, @@ -1074,7 +1074,7 @@ declare 19 win { TclFile TclpOpenFile(const char *fname, int mode) } declare 20 win { - void TclWinAddProcess(HANDLE hProcess, DWORD id) + void TclWinAddProcess(void *hProcess, unsigned long id) } # removed permanently for 8.4 @@ -1112,7 +1112,7 @@ declare 28 win { void TclWinResetInterfaces(void) } declare 29 win { - int TclWinCPUID( unsigned int index, unsigned int *regs ) + int TclWinCPUID(unsigned int index, unsigned int *regs) } ################################ diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index b3a55ac..620a73d 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.39 2009/04/10 18:02:36 das Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.40 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCLINTPLATDECLS @@ -124,12 +124,12 @@ EXTERN int TclUnixCopyFile (const char * src, const char * dst, #ifndef TclWinConvertError_TCL_DECLARED #define TclWinConvertError_TCL_DECLARED /* 0 */ -EXTERN void TclWinConvertError (DWORD errCode); +EXTERN void TclWinConvertError (unsigned long errCode); #endif #ifndef TclWinConvertWSAError_TCL_DECLARED #define TclWinConvertWSAError_TCL_DECLARED /* 1 */ -EXTERN void TclWinConvertWSAError (DWORD errCode); +EXTERN void TclWinConvertWSAError (unsigned long errCode); #endif #ifndef TclWinGetServByName_TCL_DECLARED #define TclWinGetServByName_TCL_DECLARED @@ -218,7 +218,7 @@ EXTERN TclFile TclpOpenFile (const char * fname, int mode); #ifndef TclWinAddProcess_TCL_DECLARED #define TclWinAddProcess_TCL_DECLARED /* 20 */ -EXTERN void TclWinAddProcess (HANDLE hProcess, DWORD id); +EXTERN void TclWinAddProcess (void * hProcess, unsigned long id); #endif /* Slot 21 is reserved */ #ifndef TclpCreateTempFile_TCL_DECLARED @@ -398,8 +398,8 @@ typedef struct TclIntPlatStubs { int (*tclUnixCopyFile) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr, int dontCopyAtts); /* 14 */ #endif /* UNIX */ #ifdef __WIN32__ /* WIN */ - void (*tclWinConvertError) (DWORD errCode); /* 0 */ - void (*tclWinConvertWSAError) (DWORD errCode); /* 1 */ + void (*tclWinConvertError) (unsigned long errCode); /* 0 */ + void (*tclWinConvertWSAError) (unsigned long errCode); /* 1 */ struct servent * (*tclWinGetServByName) (const char * nm, const char * proto); /* 2 */ int (*tclWinGetSockOpt) (int s, int level, int optname, char FAR * optval, int FAR * optlen); /* 3 */ HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */ @@ -418,7 +418,7 @@ typedef struct TclIntPlatStubs { void *reserved17; TclFile (*tclpMakeFile) (Tcl_Channel channel, int direction); /* 18 */ TclFile (*tclpOpenFile) (const char * fname, int mode); /* 19 */ - void (*tclWinAddProcess) (HANDLE hProcess, DWORD id); /* 20 */ + void (*tclWinAddProcess) (void * hProcess, unsigned long id); /* 20 */ void *reserved21; TclFile (*tclpCreateTempFile) (const char * contents); /* 22 */ char * (*tclpGetTZName) (int isdst); /* 23 */ diff --git a/generic/tclPort.h b/generic/tclPort.h index 0b4eda9..e9d6046 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.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: tclPort.h,v 1.17 2009/12/21 23:25:39 nijtmans Exp $ + * RCS: @(#) $Id: tclPort.h,v 1.18 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCLPORT @@ -19,11 +19,11 @@ #ifdef HAVE_TCL_CONFIG_H #include "tclConfig.h" #endif -#include "tcl.h" - -#if defined(__WIN32__) +#if defined(_WIN32) # include "tclWinPort.h" -#else +#endif +#include "tcl.h" +#if !defined(_WIN32) # include "tclUnixPort.h" #endif @@ -33,8 +33,8 @@ /* On Cygwin, the environment is imported from the Cygwin DLL. */ DLLIMPORT extern char **__cygwin_environ; DLLIMPORT extern int cygwin_conv_to_win32_path(const char *, char *); -# define environ __cygwin_environ -# define timezone _timezone +# define environ __cygwin_environ +# define timezone _timezone #endif #if !defined(LLONG_MIN) diff --git a/win/configure b/win/configure index ee83212..12fadb8 100755 --- a/win/configure +++ b/win/configure @@ -2938,75 +2938,6 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 -if test "${ac_cv_cygwin+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef __CYGWIN__ -#error cygwin -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (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); }; } && - { 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 - ac_cv_cygwin=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_cygwin=yes -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6 -if test "$ac_cv_cygwin" = "yes" ; then - { { echo "$as_me:$LINENO: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." >&5 -echo "$as_me: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." >&2;} - { (exit 1); exit 1; }; } -fi - - echo "$as_me:$LINENO: checking for SEH support in compiler" >&5 echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6 if test "${tcl_cv_seh+set}" = set; then @@ -3892,6 +3823,72 @@ echo "${ECHO_T}yes" >&6 cyg_conftest= fi + echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 +if test "${ac_cv_cygwin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef __CYGWIN__ + #error cygwin + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (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); }; } && + { 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 + ac_cv_cygwin=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_cygwin=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6 + if test "$ac_cv_cygwin" = "yes" ; then + { echo "$as_me:$LINENO: WARNING: Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw." >&5 +echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw." >&2;} + fi if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then DEPARG='"$<"' else diff --git a/win/configure.in b/win/configure.in index f8d54ce..7995106 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.119 2009/11/23 20:17:36 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.120 2010/01/22 13:02:50 nijtmans Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.59) @@ -101,24 +101,6 @@ dnl under autoconf 2.5X. dnl dnl AC_CYGWIN -AC_CACHE_CHECK(for Cygwin version of gcc, - ac_cv_cygwin, -AC_TRY_COMPILE([ -#ifdef __CYGWIN__ -#error cygwin -#endif -], -[], - ac_cv_cygwin=no, - ac_cv_cygwin=yes) -) -if test "$ac_cv_cygwin" = "yes" ; then - AC_MSG_ERROR([Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw.]) -fi - - AC_CACHE_CHECK(for SEH support in compiler, tcl_cv_seh, AC_TRY_RUN([ @@ -432,6 +432,22 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ cyg_conftest= fi + AC_CACHE_CHECK(for Cygwin version of gcc, + ac_cv_cygwin, + AC_TRY_COMPILE([ + #ifdef __CYGWIN__ + #error cygwin + #endif + ], + [], + ac_cv_cygwin=no, + ac_cv_cygwin=yes) + ) + if test "$ac_cv_cygwin" = "yes" ; then + AC_MSG_WARN([Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw.]) + fi if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then DEPARG='"$<"' else diff --git a/win/tclWinError.c b/win/tclWinError.c index 05661a2..c71f535 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.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: tclWinError.c,v 1.7 2005/11/04 00:06:50 dkf Exp $ + * RCS: @(#) $Id: tclWinError.c,v 1.8 2010/01/22 13:02:50 nijtmans Exp $ */ #include "tclInt.h" @@ -354,7 +354,7 @@ static int wsaErrorTable[] = { void TclWinConvertError( - DWORD errCode) /* Win32 error code. */ + unsigned long errCode) /* Win32 error code. */ { if (errCode >= tableLen) { Tcl_SetErrno(EINVAL); @@ -381,7 +381,7 @@ TclWinConvertError( void TclWinConvertWSAError( - DWORD errCode) /* Win32 error code. */ + unsigned long errCode) /* Win32 error code. */ { if ((errCode >= WSAEWOULDBLOCK) && (errCode <= WSAEREMOTE)) { Tcl_SetErrno(wsaErrorTable[errCode - WSAEWOULDBLOCK]); diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 8357637..fda862e 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.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: tclWinPipe.c,v 1.73 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.74 2010/01/22 13:02:50 nijtmans Exp $ */ #include "tclWinInt.h" @@ -2686,8 +2686,8 @@ Tcl_WaitPid( void TclWinAddProcess( - HANDLE hProcess, /* Handle to process */ - DWORD id) /* Global process identifier */ + void *hProcess, /* Handle to process */ + unsigned long id) /* Global process identifier */ { ProcInfo *procPtr = (ProcInfo *) ckalloc(sizeof(ProcInfo)); diff --git a/win/tclWinPort.h b/win/tclWinPort.h index c7e343f..df76d46 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.53 2010/01/13 06:46:56 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.54 2010/01/22 13:02:50 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -402,8 +402,6 @@ #ifdef __CYGWIN__ /* On Cygwin, the environment is imported from the Cygwin DLL. */ - DLLIMPORT extern char **__cygwin_environ; -# define environ __cygwin_environ # define putenv TclCygwinPutenv # define timezone _timezone #endif /* __CYGWIN__ */ |