From 1cbe41a90cc155259e98e2e4ed1cfdae770d19a6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 4 Apr 2012 14:50:05 +0000 Subject: implement TclpGetPid for Cygwin --- generic/tclInt.decls | 28 ++++++++++++++++-- generic/tclIntPlatDecls.h | 74 ++++++++++++++++++++++++++++++++++++----------- generic/tclStubInit.c | 18 +++++++++++- mac/tclMacPort.h | 1 - unix/tclUnixFile.c | 38 ++++++++++++++++++++---- unix/tclUnixPort.h | 1 - win/tcl.m4 | 3 ++ 7 files changed, 136 insertions(+), 27 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index d380270..b7c7ee4 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -978,8 +978,9 @@ declare 7 unix { int TclWinSetSockOpt(void *s, int level, int optname, const char *optval, int optlen) } +# On non-cygwin, this is actually a reference to TclUnixWaitForFile declare 8 unix { - int TclUnixWaitForFile(int fd, int mask, int timeout) + unsigned long TclpGetPid(Tcl_Pid pid) } # Added in 8.1: @@ -1049,7 +1050,30 @@ declare 30 unix { declare 31 unix { int TclpCloseFile(TclFile file) } - +#declare 32 unix { +# Tcl_Channel TclpCreateCommandChannel(TclFile readFile, +# TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr) +#} +#declare 33 unix { +# int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) +#} +declare 34 unix { + int TclpCreateProcess (Tcl_Interp *interp, + int argc, const char **argv, TclFile inputFile, + TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr) +} +#declare 35 unix { +# char *TclpInetNtoa(struct in_addr addr) +#} +declare 36 unix { + TclFile TclpMakeFile (Tcl_Channel channel, int direction) +} +declare 37 unix { + TclFile TclpOpenFile (const char *fname, int mode) +} +declare 38 unix { + int TclUnixWaitForFile(int fd, int mask, int timeout) +} # Local Variables: # mode: tcl diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 7ce711d..50c546c 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -13,16 +13,6 @@ #ifndef _TCLINTPLATDECLS #define _TCLINTPLATDECLS -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ -EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, - int argc, CONST char **argv, TclFile inputFile, - TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); -EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, - int direction)); -EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, - int mode)); -#endif - /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made @@ -58,8 +48,7 @@ EXTERN unsigned short TclWinNToHS _ANSI_ARGS_((unsigned short ns)); EXTERN int TclWinSetSockOpt _ANSI_ARGS_((VOID *s, int level, int optname, CONST char *optval, int optlen)); /* 8 */ -EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask, - int timeout)); +EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); /* 9 */ EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* 10 */ @@ -110,6 +99,23 @@ EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 31 */ EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); +/* Slot 32 is reserved */ +/* Slot 33 is reserved */ +/* 34 */ +EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, + int argc, CONST char **argv, + TclFile inputFile, TclFile outputFile, + TclFile errorFile, Tcl_Pid *pidPtr)); +/* Slot 35 is reserved */ +/* 36 */ +EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, + int direction)); +/* 37 */ +EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, + int mode)); +/* 38 */ +EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask, + int timeout)); #endif /* UNIX */ #ifdef __WIN32__ /* 0 */ @@ -267,7 +273,7 @@ typedef struct TclIntPlatStubs { VOID *reserved5; unsigned short (*tclWinNToHS) _ANSI_ARGS_((unsigned short ns)); /* 6 */ int (*tclWinSetSockOpt) _ANSI_ARGS_((VOID *s, int level, int optname, CONST char *optval, int optlen)); /* 7 */ - int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */ + unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */ Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR *dir)); /* 10 */ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 11 */ @@ -291,6 +297,13 @@ typedef struct TclIntPlatStubs { int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 30 */ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 31 */ + VOID *reserved32; + VOID *reserved33; + int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); /* 34 */ + VOID *reserved35; + TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 36 */ + TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char *fname, int mode)); /* 37 */ + int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 38 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */ @@ -399,9 +412,9 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclWinSetSockOpt \ (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ #endif -#ifndef TclUnixWaitForFile -#define TclUnixWaitForFile \ - (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 8 */ +#ifndef TclpGetPid +#define TclpGetPid \ + (tclIntPlatStubsPtr->tclpGetPid) /* 8 */ #endif #ifndef TclWinGetPlatformId #define TclWinGetPlatformId \ @@ -477,6 +490,25 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclpCloseFile \ (tclIntPlatStubsPtr->tclpCloseFile) /* 31 */ #endif +/* Slot 32 is reserved */ +/* Slot 33 is reserved */ +#ifndef TclpCreateProcess +#define TclpCreateProcess \ + (tclIntPlatStubsPtr->tclpCreateProcess) /* 34 */ +#endif +/* Slot 35 is reserved */ +#ifndef TclpMakeFile +#define TclpMakeFile \ + (tclIntPlatStubsPtr->tclpMakeFile) /* 36 */ +#endif +#ifndef TclpOpenFile +#define TclpOpenFile \ + (tclIntPlatStubsPtr->tclpOpenFile) /* 37 */ +#endif +#ifndef TclUnixWaitForFile +#define TclUnixWaitForFile \ + (tclIntPlatStubsPtr->tclUnixWaitForFile) /* 38 */ +#endif #endif /* UNIX */ #ifdef __WIN32__ #ifndef TclWinConvertError @@ -703,7 +735,14 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #undef TclpLocaltime_unix #undef TclpGmtime_unix -#if !defined(__WIN32__) && !defined(MAC_TCL) && defined(USE_TCL_STUBS) +#if !defined(__WIN32__) && !defined(MAC_TCL) +# undef TclpGetPid +# define TclpGetPid(pid) ((unsigned long) (pid)) + +# if defined(USE_TCL_STUBS) +# undef TclpCreateProcess +# undef TclpMakeFile +# undef TclpOpenFile # ifdef __CYGWIN__ # define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ @@ -732,6 +771,7 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; # define TclpCloseFile ((int (*) _ANSI_ARGS_((TclFile))) \ tclIntPlatStubsPtr->tclWinConvertWSAError) # endif +# endif #endif #endif /* _TCLINTPLATDECLS */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index cbb89a2..50fc9eb 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -31,6 +31,7 @@ #undef Tcl_ValidateAllMemory #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry +#undef TclpGetPid /* * Keep a record of the original Notifier procedures, created in the @@ -85,6 +86,7 @@ int __stdcall GetModuleHandleExW(unsigned int, const char *, void *); #define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing #define TclWinFlushDirtyChannels doNothing #define TclWinResetInterfaces doNothing +#define TclpGetPid getPid static Tcl_Encoding winTCharEncoding; @@ -130,6 +132,12 @@ TclWinNoBackslash(char *path) return path; } +static unsigned long +TclpGetPid(Tcl_Pid pid) +{ + return (unsigned long) (size_t) pid; +} + static void doNothing(void) { @@ -186,6 +194,7 @@ Tcl_WinTCharToUtf( # define TclWinSetInterfaces 0 # define TclWinFlushDirtyChannels 0 # define TclWinResetInterfaces 0 +# define TclpGetPid 0 # define TclMacOSXGetFileAttribute 0 /* Only implemented in Tcl >= 8.5 */ # define TclMacOSXMatchType 0 /* Only implemented in Tcl >= 8.5 */ # define TclMacOSXNotifierAddRunLoopMode 0 /* Only implemented in Tcl >= 8.5 */ @@ -454,7 +463,7 @@ TclIntPlatStubs tclIntPlatStubs = { NULL, /* 5 */ TclWinNToHS, /* 6 */ TclWinSetSockOpt, /* 7 */ - TclUnixWaitForFile, /* 8 */ + TclpGetPid, /* 8 */ TclWinGetPlatformId, /* 9 */ TclpReaddir, /* 10 */ TclpLocaltime_unix, /* 11 */ @@ -478,6 +487,13 @@ TclIntPlatStubs tclIntPlatStubs = { TclWinCPUID, /* 29 */ TclGetAndDetachPids, /* 30 */ TclpCloseFile, /* 31 */ + NULL, /* 32 */ + NULL, /* 33 */ + TclpCreateProcess, /* 34 */ + NULL, /* 35 */ + TclpMakeFile, /* 36 */ + TclpOpenFile, /* 37 */ + TclUnixWaitForFile, /* 38 */ #endif /* UNIX */ #ifdef __WIN32__ TclWinConvertError, /* 0 */ diff --git a/mac/tclMacPort.h b/mac/tclMacPort.h index f427899..c5c1743 100644 --- a/mac/tclMacPort.h +++ b/mac/tclMacPort.h @@ -215,7 +215,6 @@ extern char **environ; * address platform-specific issues. */ -#define TclpGetPid(pid) ((unsigned long) (pid)) #define TclSetSystemEnv(a,b) #define tzset() diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 5eac978..4ba2e47 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -22,7 +22,8 @@ static int NativeMatchType(CONST char* nativeName, Tcl_GlobTypeData *types); * TclpFindExecutable -- * * This procedure computes the absolute path name of the current - * application, given its argv[0] value. + * application, given its argv[0] value. For Cygwin, argv[0] is + * ignored and the path is determined the same as under win32. * * Results: * A dirty UTF string that is the path to the executable. At this @@ -45,18 +46,44 @@ TclpFindExecutable(argv0) CONST char *argv0; /* The value of the application's argv[0] * (native). */ { + int length; +#ifdef __CYGWIN__ + char buf[PATH_MAX * TCL_UTF_MAX + 1]; + char name[PATH_MAX * TCL_UTF_MAX + 1]; +#else CONST char *name, *p; Tcl_StatBuf statBuf; - int length; Tcl_DString buffer, nameString; +#endif - if (argv0 == NULL) { - return NULL; - } if (tclNativeExecutableName != NULL) { return tclNativeExecutableName; } +#ifdef __CYGWIN__ + + /* Make some symbols available without including */ +# define CP_UTF8 65001 + extern int cygwin_conv_to_full_posix_path(const char *, char *); + extern __stdcall int GetModuleFileNameW(void *, const char *, int); + extern __stdcall int WideCharToMultiByte(int, int, const char *, int, + const char *, int, const char *, const char *); + + GetModuleFileNameW(NULL, name, PATH_MAX); + WideCharToMultiByte(CP_UTF8, 0, name, -1, buf, PATH_MAX, NULL, NULL); + cygwin_conv_to_full_posix_path(buf, name); + length = strlen(name); + if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) { + /* Strip '.exe' part. */ + length -= 4; + } + tclNativeExecutableName = (char *) ckalloc(length + 1); + memcpy(tclNativeExecutableName, name, length); + buf[length] = '\0'; +#else + if (argv0 == NULL) { + return NULL; + } Tcl_DStringInit(&buffer); name = argv0; @@ -174,6 +201,7 @@ gotName: done: Tcl_DStringFree(&buffer); +#endif return tclNativeExecutableName; } diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index c0bf77d8..a26922c 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -658,7 +658,6 @@ extern int copyfile(const char *from, const char *to, void *state, * address platform-specific issues. */ -#define TclpGetPid(pid) ((unsigned long) (pid)) #define TclpReleaseFile(file) /* Nothing. */ /* diff --git a/win/tcl.m4 b/win/tcl.m4 index 752f022..ff39c38 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -27,6 +27,9 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ else TCL_BIN_DIR_DEFAULT=../../tcl/win fi + if test ! -f $TCL_BIN_DIR_DEFAULT/tclConfig.sh; then + TCL_BIN_DIR_DEFAULT="${TCL_BIN_DIR_DEFAULT}/../unix" + fi AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.4 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) -- cgit v0.12 From 51a4b5f8807bc1e0df2e06087292df90c7777f50 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 6 Apr 2012 23:33:46 +0000 Subject: tclpGetPid signature change (stub entry only, not for macro), for win64 compatibility with future cygwin64 correctly use win32 as default when cross-compiling under cygwin --- ChangeLog | 0 generic/tcl.decls | 0 generic/tcl.h | 0 generic/tclCmdAH.c | 0 generic/tclEnv.c | 0 generic/tclFCmd.c | 0 generic/tclFileName.c | 0 generic/tclIOSock.c | 0 generic/tclInt.decls | 4 ++-- generic/tclIntPlatDecls.h | 8 ++++---- generic/tclPipe.c | 2 +- generic/tclStubInit.c | 4 ++-- mac/tclMacPort.h | 0 tools/genStubs.tcl | 0 unix/Makefile.in | 0 unix/configure.in | 0 unix/tcl.m4 | 0 unix/tclUnixFile.c | 0 unix/tclUnixPort.h | 0 win/configure | 14 +++++++------- win/configure.in | 0 win/tcl.m4 | 23 ++++++++++++----------- win/tclWinError.c | 0 win/tclWinFile.c | 0 win/tclWinPipe.c | 2 +- win/tclWinPort.h | 0 win/tclWinSock.c | 0 27 files changed, 29 insertions(+), 28 deletions(-) mode change 100644 => 100755 ChangeLog mode change 100644 => 100755 generic/tcl.decls mode change 100644 => 100755 generic/tcl.h mode change 100644 => 100755 generic/tclCmdAH.c mode change 100644 => 100755 generic/tclEnv.c mode change 100644 => 100755 generic/tclFCmd.c mode change 100644 => 100755 generic/tclFileName.c mode change 100644 => 100755 generic/tclIOSock.c mode change 100644 => 100755 generic/tclInt.decls mode change 100644 => 100755 generic/tclPipe.c mode change 100644 => 100755 mac/tclMacPort.h mode change 100644 => 100755 tools/genStubs.tcl mode change 100644 => 100755 unix/Makefile.in mode change 100644 => 100755 unix/configure.in mode change 100644 => 100755 unix/tcl.m4 mode change 100644 => 100755 unix/tclUnixFile.c mode change 100644 => 100755 unix/tclUnixPort.h mode change 100644 => 100755 win/configure.in mode change 100644 => 100755 win/tcl.m4 mode change 100644 => 100755 win/tclWinError.c mode change 100644 => 100755 win/tclWinFile.c mode change 100644 => 100755 win/tclWinPipe.c mode change 100644 => 100755 win/tclWinPort.h mode change 100644 => 100755 win/tclWinSock.c diff --git a/ChangeLog b/ChangeLog old mode 100644 new mode 100755 diff --git a/generic/tcl.decls b/generic/tcl.decls old mode 100644 new mode 100755 diff --git a/generic/tcl.h b/generic/tcl.h old mode 100644 new mode 100755 diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c old mode 100644 new mode 100755 diff --git a/generic/tclEnv.c b/generic/tclEnv.c old mode 100644 new mode 100755 diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c old mode 100644 new mode 100755 diff --git a/generic/tclFileName.c b/generic/tclFileName.c old mode 100644 new mode 100755 diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c old mode 100644 new mode 100755 diff --git a/generic/tclInt.decls b/generic/tclInt.decls old mode 100644 new mode 100755 index b7c7ee4..e438588 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -856,7 +856,7 @@ declare 7 win { const char *optval, int optlen) } declare 8 win { - unsigned long TclpGetPid(Tcl_Pid pid) + int TclpGetPid(Tcl_Pid pid) } declare 9 win { int TclWinGetPlatformId(void) @@ -980,7 +980,7 @@ declare 7 unix { } # On non-cygwin, this is actually a reference to TclUnixWaitForFile declare 8 unix { - unsigned long TclpGetPid(Tcl_Pid pid) + int TclpGetPid(Tcl_Pid pid) } # Added in 8.1: diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 50c546c..6d3ed94 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -48,7 +48,7 @@ EXTERN unsigned short TclWinNToHS _ANSI_ARGS_((unsigned short ns)); EXTERN int TclWinSetSockOpt _ANSI_ARGS_((VOID *s, int level, int optname, CONST char *optval, int optlen)); /* 8 */ -EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); +EXTERN int TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); /* 9 */ EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* 10 */ @@ -137,7 +137,7 @@ EXTERN u_short TclWinNToHS _ANSI_ARGS_((u_short ns)); EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char *optval, int optlen)); /* 8 */ -EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); +EXTERN int TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); /* 9 */ EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* Slot 10 is reserved */ @@ -273,7 +273,7 @@ typedef struct TclIntPlatStubs { VOID *reserved5; unsigned short (*tclWinNToHS) _ANSI_ARGS_((unsigned short ns)); /* 6 */ int (*tclWinSetSockOpt) _ANSI_ARGS_((VOID *s, int level, int optname, CONST char *optval, int optlen)); /* 7 */ - unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */ + int (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */ Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR *dir)); /* 10 */ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 11 */ @@ -314,7 +314,7 @@ typedef struct TclIntPlatStubs { VOID *reserved5; u_short (*tclWinNToHS) _ANSI_ARGS_((u_short ns)); /* 6 */ int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char *optval, int optlen)); /* 7 */ - unsigned long (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */ + int (*tclpGetPid) _ANSI_ARGS_((Tcl_Pid pid)); /* 8 */ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */ VOID *reserved10; void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 11 */ diff --git a/generic/tclPipe.c b/generic/tclPipe.c old mode 100644 new mode 100755 index 1042e09..6e7029e --- a/generic/tclPipe.c +++ b/generic/tclPipe.c @@ -283,7 +283,7 @@ TclCleanupChildren(interp, numPids, pidPtr, errorChan) for (i = 0; i < numPids; i++) { /* * We need to get the resolved pid before we wait on it as - * the windows implimentation of Tcl_WaitPid deletes the + * the windows implementation of Tcl_WaitPid deletes the * information such that any following calls to TclpGetPid * fail. */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 71c6ab4..7d24d69 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -133,10 +133,10 @@ TclWinNoBackslash(char *path) return path; } -static unsigned long +static int TclpGetPid(Tcl_Pid pid) { - return (unsigned long) (size_t) pid; + return (int) (size_t) pid; } static void diff --git a/mac/tclMacPort.h b/mac/tclMacPort.h old mode 100644 new mode 100755 diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl old mode 100644 new mode 100755 diff --git a/unix/Makefile.in b/unix/Makefile.in old mode 100644 new mode 100755 diff --git a/unix/configure.in b/unix/configure.in old mode 100644 new mode 100755 diff --git a/unix/tcl.m4 b/unix/tcl.m4 old mode 100644 new mode 100755 diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c old mode 100644 new mode 100755 diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h old mode 100644 new mode 100755 diff --git a/win/configure b/win/configure index ae7ad50..29b1245 100755 --- a/win/configure +++ b/win/configure @@ -1232,7 +1232,7 @@ else #line 1233 "configure" #include "confdefs.h" - #ifdef __WIN32__ + #ifndef __WIN32__ #error cross-compiler #endif @@ -1242,12 +1242,12 @@ int main() { EOF if { (eval echo configure:1244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_cv_cross=yes + ac_cv_cross=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_cross=no + ac_cv_cross=yes fi rm -f conftest* @@ -1449,8 +1449,8 @@ echo "configure:1351: checking compiler flags" >&5 #line 1450 "configure" #include "confdefs.h" - #ifdef _WIN64 - #error 64-bit + #ifndef _WIN64 + #error 32-bit #endif int main() { @@ -1459,12 +1459,12 @@ int main() { EOF if { (eval echo configure:1461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - tcl_win_64bit=no + tcl_win_64bit=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_win_64bit=yes + tcl_win_64bit=no fi rm -f conftest* diff --git a/win/configure.in b/win/configure.in old mode 100644 new mode 100755 diff --git a/win/tcl.m4 b/win/tcl.m4 old mode 100644 new mode 100755 index ff39c38..ab47afc --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -27,9 +27,6 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ else TCL_BIN_DIR_DEFAULT=../../tcl/win fi - if test ! -f $TCL_BIN_DIR_DEFAULT/tclConfig.sh; then - TCL_BIN_DIR_DEFAULT="${TCL_BIN_DIR_DEFAULT}/../unix" - fi AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.4 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) @@ -37,7 +34,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) fi if test ! -f $TCL_BIN_DIR/tclConfig.sh; then - AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then + AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + fi + TCL_BIN_DIR=`cd ${TCL_BIN_DIR}/../unix; pwd` + CFLAGS="$CFLAGS -mwin32" fi AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh) ]) @@ -416,12 +417,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK(for cross-compile version of gcc, ac_cv_cross, AC_TRY_COMPILE([ - #ifdef __WIN32__ + #ifndef __WIN32__ #error cross-compiler #endif ], [], - ac_cv_cross=yes, - ac_cv_cross=no) + ac_cv_cross=no, + ac_cv_cross=yes) ) if test "$ac_cv_cross" = "yes"; then @@ -592,12 +593,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ;; *) AC_TRY_COMPILE([ - #ifdef _WIN64 - #error 64-bit + #ifndef _WIN64 + #error 32-bit #endif ], [], - tcl_win_64bit=no, - tcl_win_64bit=yes + tcl_win_64bit=yes, + tcl_win_64bit=no ) if test "$tcl_win_64bit" = "yes" ; then do64bit=amd64 diff --git a/win/tclWinError.c b/win/tclWinError.c old mode 100644 new mode 100755 diff --git a/win/tclWinFile.c b/win/tclWinFile.c old mode 100644 new mode 100755 diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c old mode 100644 new mode 100755 index f15daa5..a661343 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -871,7 +871,7 @@ TclpCloseFile( *-------------------------------------------------------------------------- */ -unsigned long +int TclpGetPid( Tcl_Pid pid) /* The HANDLE of the child process. */ { diff --git a/win/tclWinPort.h b/win/tclWinPort.h old mode 100644 new mode 100755 diff --git a/win/tclWinSock.c b/win/tclWinSock.c old mode 100644 new mode 100755 -- cgit v0.12 From ba718c26090c3d742694dc7a033b1ea9b0820e0d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 13 Apr 2012 22:18:46 +0000 Subject: sync win/rules.vc with Tk version --- win/rules.vc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/win/rules.vc b/win/rules.vc index 0cc9ffb..4efbad7 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -422,18 +422,21 @@ OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1 OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD !endif -!if $(DEBUG) -OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DEBUG -!elseif $(OPTIMIZING) +!if !$(DEBUG) +OPTDEFINES = $(OPTDEFINES) -DNDEBUG +!if $(OPTIMIZING) OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_OPTIMIZED !endif +!endif !if $(PROFILE) OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_PROFILED !endif !if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64" OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT !endif - +!if $(VCVERSION) < 1300 +OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64 +!endif #---------------------------------------------------------- # Get common info used when building extensions. -- cgit v0.12 From 154f6e364d28d67ef3d2f09c4a991d46e53ad2d4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Apr 2012 08:20:59 +0000 Subject: fix MSVC warning: tclStubInit.c(306) : warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(int ,int )' --- generic/tclStubInit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 8f42f96..a300afc 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -46,9 +46,7 @@ # define TclSockMinimumBuffersOld 0 #else #define TclSockMinimumBuffersOld sockMinimumBuffersOld -static int TclSockMinimumBuffersOld(sock, size) - int sock; - int size; +static int TclSockMinimumBuffersOld(int sock, int size) { return TclSockMinimumBuffers(INT2PTR(sock), size); } -- cgit v0.12 From 6f14ff020a548ab6adcb30836c498ab0fe921970 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Apr 2012 12:30:28 +0000 Subject: make some more internal tables const On cygwin, install dll's in /usr/bin, not in /usr/lib --- generic/regc_lex.c | 38 +-- generic/regcomp.c | 24 +- generic/tclCmdMZ.c | 4 +- generic/tclCompExpr.c | 18 +- generic/tclCompile.c | 2 +- generic/tclDate.c | 12 +- generic/tclExecute.c | 2 +- generic/tclGetDate.y | 12 +- generic/tclIO.c | 2 +- generic/tclIOCmd.c | 2 +- generic/tclIOGT.c | 1 + generic/tclIOUtil.c | 1 + generic/tclTest.c | 2 +- unix/Makefile.in | 5 +- unix/configure | 687 +++++++++++++++++++++++++------------------------- unix/tcl.m4 | 21 +- unix/tclUnixChan.c | 2 +- win/tclWinFCmd.c | 2 +- win/tclWinPipe.c | 2 +- win/tclWinReg.c | 2 +- win/tclWinTest.c | 4 +- win/tclWinTime.c | 6 +- 22 files changed, 435 insertions(+), 416 deletions(-) diff --git a/generic/regc_lex.c b/generic/regc_lex.c index 588718d..99497b9 100644 --- a/generic/regc_lex.c +++ b/generic/regc_lex.c @@ -195,8 +195,8 @@ struct vars *v; static VOID lexnest(v, beginp, endp) struct vars *v; -chr *beginp; /* start of interpolation */ -chr *endp; /* one past end of interpolation */ +CONST chr *beginp; /* start of interpolation */ +CONST chr *endp; /* one past end of interpolation */ { assert(v->savenow == NULL); /* only one level of nesting */ v->savenow = v->now; @@ -208,47 +208,47 @@ chr *endp; /* one past end of interpolation */ /* * string constants to interpolate as expansions of things like \d */ -static chr backd[] = { /* \d */ +static CONST chr backd[] = { /* \d */ CHR('['), CHR('['), CHR(':'), CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'), CHR(':'), CHR(']'), CHR(']') }; -static chr backD[] = { /* \D */ +static CONST chr backD[] = { /* \D */ CHR('['), CHR('^'), CHR('['), CHR(':'), CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'), CHR(':'), CHR(']'), CHR(']') }; -static chr brbackd[] = { /* \d within brackets */ +static CONST chr brbackd[] = { /* \d within brackets */ CHR('['), CHR(':'), CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'), CHR(':'), CHR(']') }; -static chr backs[] = { /* \s */ +static CONST chr backs[] = { /* \s */ CHR('['), CHR('['), CHR(':'), CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'), CHR(':'), CHR(']'), CHR(']') }; -static chr backS[] = { /* \S */ +static CONST chr backS[] = { /* \S */ CHR('['), CHR('^'), CHR('['), CHR(':'), CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'), CHR(':'), CHR(']'), CHR(']') }; -static chr brbacks[] = { /* \s within brackets */ +static CONST chr brbacks[] = { /* \s within brackets */ CHR('['), CHR(':'), CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'), CHR(':'), CHR(']') }; -static chr backw[] = { /* \w */ +static CONST chr backw[] = { /* \w */ CHR('['), CHR('['), CHR(':'), CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'), CHR(':'), CHR(']'), CHR('_'), CHR(']') }; -static chr backW[] = { /* \W */ +static CONST chr backW[] = { /* \W */ CHR('['), CHR('^'), CHR('['), CHR(':'), CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'), CHR(':'), CHR(']'), CHR('_'), CHR(']') }; -static chr brbackw[] = { /* \w within brackets */ +static CONST chr brbackw[] = { /* \w within brackets */ CHR('['), CHR(':'), CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'), CHR(':'), CHR(']'), CHR('_') @@ -660,13 +660,13 @@ lexescape(v) struct vars *v; { chr c; - static chr alert[] = { + static CONST chr alert[] = { CHR('a'), CHR('l'), CHR('e'), CHR('r'), CHR('t') }; - static chr esc[] = { + static CONST chr esc[] = { CHR('E'), CHR('S'), CHR('C') }; - chr *save; + CONST chr *save; assert(v->cflags®_ADVF); @@ -979,7 +979,7 @@ static VOID skip(v) struct vars *v; { - chr *start = v->now; + CONST chr *start = v->now; assert(v->cflags®_EXPANDED); @@ -1018,10 +1018,10 @@ newline() ^ #endif */ #ifdef REG_DEBUG -static chr * +static CONST chr * ch() { - static chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') }; + static CONST chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') }; return chstr; } @@ -1036,8 +1036,8 @@ ch() static chr chrnamed(v, startp, endp, lastresort) struct vars *v; -chr *startp; /* start of name */ -chr *endp; /* just past end of name */ +CONST chr *startp; /* start of name */ +CONST chr *endp; /* just past end of name */ pchr lastresort; /* what to return if name lookup fails */ { celt c; diff --git a/generic/regcomp.c b/generic/regcomp.c index c239d8b..a1fe5bc 100644 --- a/generic/regcomp.c +++ b/generic/regcomp.c @@ -52,7 +52,7 @@ static VOID repeat _ANSI_ARGS_((struct vars *, struct state *, struct state *, i static VOID bracket _ANSI_ARGS_((struct vars *, struct state *, struct state *)); static VOID cbracket _ANSI_ARGS_((struct vars *, struct state *, struct state *)); static VOID brackpart _ANSI_ARGS_((struct vars *, struct state *, struct state *)); -static chr *scanplain _ANSI_ARGS_((struct vars *)); +static CONST chr *scanplain _ANSI_ARGS_((struct vars *)); static VOID onechr _ANSI_ARGS_((struct vars *, pchr, struct state *, struct state *)); static VOID dovec _ANSI_ARGS_((struct vars *, struct cvec *, struct state *, struct state *)); static celt nextleader _ANSI_ARGS_((struct vars *, pchr, pchr)); @@ -76,7 +76,7 @@ static char *stid _ANSI_ARGS_((struct subre *, char *, size_t)); /* === regc_lex.c === */ static VOID lexstart _ANSI_ARGS_((struct vars *)); static VOID prefixes _ANSI_ARGS_((struct vars *)); -static VOID lexnest _ANSI_ARGS_((struct vars *, chr *, chr *)); +static VOID lexnest _ANSI_ARGS_((struct vars *, CONST chr *, CONST chr *)); static VOID lexword _ANSI_ARGS_((struct vars *)); static int next _ANSI_ARGS_((struct vars *)); static int lexescape _ANSI_ARGS_((struct vars *)); @@ -85,9 +85,9 @@ static int brenext _ANSI_ARGS_((struct vars *, pchr)); static VOID skip _ANSI_ARGS_((struct vars *)); static chr newline _ANSI_ARGS_((NOPARMS)); #ifdef REG_DEBUG -static chr *ch _ANSI_ARGS_((NOPARMS)); +static CONST chr *ch _ANSI_ARGS_((NOPARMS)); #endif -static chr chrnamed _ANSI_ARGS_((struct vars *, chr *, chr *, pchr)); +static chr chrnamed _ANSI_ARGS_((struct vars *, CONST chr *, CONST chr *, pchr)); /* === regc_color.c === */ static VOID initcm _ANSI_ARGS_((struct vars *, struct colormap *)); static VOID freecm _ANSI_ARGS_((struct colormap *)); @@ -190,10 +190,10 @@ static int casecmp _ANSI_ARGS_((CONST chr *, CONST chr *, size_t)); /* internal variables, bundled for easy passing around */ struct vars { regex_t *re; - chr *now; /* scan pointer into string */ - chr *stop; /* end of string */ - chr *savenow; /* saved now and stop for "subroutine call" */ - chr *savestop; + CONST chr *now; /* scan pointer into string */ + CONST chr *stop; /* end of string */ + CONST chr *savenow; /* saved now and stop for "subroutine call" */ + CONST chr *savestop; int err; /* error code (0 if none) */ int cflags; /* copy of compile flags */ int lasttype; /* type of previous token */ @@ -1357,8 +1357,8 @@ struct state *rp; celt startc; celt endc; struct cvec *cv; - chr *startp; - chr *endp; + CONST chr *startp; + CONST chr *endp; chr c[1]; /* parse something, get rid of special cases, take shortcuts */ @@ -1458,11 +1458,11 @@ struct state *rp; * to look past the final bracket of the [. etc. ^ static chr *scanplain(struct vars *); */ -static chr * /* just after end of sequence */ +static CONST chr * /* just after end of sequence */ scanplain(v) struct vars *v; { - chr *endp; + CONST chr *endp; assert(SEE(COLLEL) || SEE(ECLASS) || SEE(CCLASS)); NEXT(); diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index fb15062..4ada397 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -115,10 +115,10 @@ Tcl_TraceTypeObjCmd TclTraceExecutionObjCmd; static CONST char *traceTypeOptions[] = { "execution", "command", "variable", (char*) NULL }; -static Tcl_TraceTypeObjCmd* traceSubCmds[] = { +static Tcl_TraceTypeObjCmd *CONST traceSubCmds[] = { TclTraceExecutionObjCmd, TclTraceCommandObjCmd, - TclTraceVariableObjCmd, + TclTraceVariableObjCmd }; /* diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 68533c5..6bac221 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -101,19 +101,19 @@ static int opTableInitialized = 0; /* 0 means not yet initialized. */ TCL_DECLARE_MUTEX(opMutex) typedef struct OperatorDesc { - char *name; /* Name of the operator. */ + CONST char *name; /* Name of the operator. */ int numOperands; /* Number of operands. 0 if the operator * requires special handling. */ int instruction; /* Instruction opcode for the operator. * Ignored if numOperands is 0. */ } OperatorDesc; -static OperatorDesc operatorTable[] = { +static CONST OperatorDesc operatorTable[] = { {"*", 2, INST_MULT}, {"/", 2, INST_DIV}, {"%", 2, INST_MOD}, - {"+", 0}, - {"-", 0}, + {"+", 0, 0}, + {"-", 0, 0}, {"<<", 2, INST_LSHIFT}, {">>", 2, INST_RSHIFT}, {"<", 2, INST_LT}, @@ -125,14 +125,14 @@ static OperatorDesc operatorTable[] = { {"&", 2, INST_BITAND}, {"^", 2, INST_BITXOR}, {"|", 2, INST_BITOR}, - {"&&", 0}, - {"||", 0}, - {"?", 0}, + {"&&", 0, 0}, + {"||", 0, 0}, + {"?", 0, 0}, {"!", 1, INST_LNOT}, {"~", 1, INST_BITNOT}, {"eq", 2, INST_STR_EQ}, {"ne", 2, INST_STR_NEQ}, - {NULL} + {NULL, 0, 0} }; /* @@ -343,7 +343,7 @@ CompileSubExpr(exprTokenPtr, infoPtr, envPtr) Tcl_Interp *interp = infoPtr->interp; Tcl_Token *tokenPtr, *endPtr = NULL; /* silence gcc 4 warning */ Tcl_Token *afterSubexprPtr; - OperatorDesc *opDescPtr; + CONST OperatorDesc *opDescPtr; Tcl_HashEntry *hPtr; CONST char *operator; Tcl_DString opBuf; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index e281a0a..1ec7c58 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -267,7 +267,7 @@ InstructionDesc tclInstructionTable[] = { * stacked objs: stktop is old value, next is new element value, next * come (operand-2) indices; pushes the new value. */ - {0} + {0, 0, 0, 0, {OPERAND_NONE}} }; /* diff --git a/generic/tclDate.c b/generic/tclDate.c index 7354a6f..b64a792 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -189,7 +189,7 @@ static int TclDatemaxdepth = YYMAXDEPTH; /* * Month and day table. */ -static TABLE MonthDayTable[] = { +static CONST TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, @@ -220,7 +220,7 @@ static TABLE MonthDayTable[] = { /* * Time units table. */ -static TABLE UnitsTable[] = { +static CONST TABLE UnitsTable[] = { { "year", tMONTH_UNIT, 12 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, @@ -237,7 +237,7 @@ static TABLE UnitsTable[] = { /* * Assorted relative-time words. */ -static TABLE OtherTable[] = { +static CONST TABLE OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, @@ -269,7 +269,7 @@ static TABLE OtherTable[] = { * The timezone table. (Note: This table was modified to not use any floating * point constants to work around an SGI compiler bug). */ -static TABLE TimezoneTable[] = { +static CONST TABLE TimezoneTable[] = { { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR( 0) }, @@ -353,7 +353,7 @@ static TABLE TimezoneTable[] = { /* * Military timezone table. */ -static TABLE MilitaryTable[] = { +static CONST TABLE MilitaryTable[] = { { "a", tZONE, HOUR( 1) }, { "b", tZONE, HOUR( 2) }, { "c", tZONE, HOUR( 3) }, @@ -655,7 +655,7 @@ LookupWord(buff) { register char *p; register char *q; - register TABLE *tp; + register CONST TABLE *tp; int i; int abbrev; diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 9f01cbb..3ca1b63 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -453,7 +453,7 @@ BuiltinFunc tclBuiltinFuncTable[] = { {"round", 1, {TCL_EITHER}, ExprRoundFunc, 0}, {"srand", 1, {TCL_INT}, ExprSrandFunc, 0}, {"wide", 1, {TCL_EITHER}, ExprWideFunc, 0}, - {0}, + {0, 0, {TCL_INT}, 0, 0}, }; /* diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index 7db4a35..d210526 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -408,7 +408,7 @@ o_merid : /* NULL */ { /* * Month and day table. */ -static TABLE MonthDayTable[] = { +static CONST TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, @@ -439,7 +439,7 @@ static TABLE MonthDayTable[] = { /* * Time units table. */ -static TABLE UnitsTable[] = { +static CONST TABLE UnitsTable[] = { { "year", tMONTH_UNIT, 12 }, { "month", tMONTH_UNIT, 1 }, { "fortnight", tDAY_UNIT, 14 }, @@ -456,7 +456,7 @@ static TABLE UnitsTable[] = { /* * Assorted relative-time words. */ -static TABLE OtherTable[] = { +static CONST TABLE OtherTable[] = { { "tomorrow", tDAY_UNIT, 1 }, { "yesterday", tDAY_UNIT, -1 }, { "today", tDAY_UNIT, 0 }, @@ -488,7 +488,7 @@ static TABLE OtherTable[] = { * The timezone table. (Note: This table was modified to not use any floating * point constants to work around an SGI compiler bug). */ -static TABLE TimezoneTable[] = { +static CONST TABLE TimezoneTable[] = { { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ { "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */ { "utc", tZONE, HOUR( 0) }, @@ -572,7 +572,7 @@ static TABLE TimezoneTable[] = { /* * Military timezone table. */ -static TABLE MilitaryTable[] = { +static CONST TABLE MilitaryTable[] = { { "a", tZONE, HOUR( 1) }, { "b", tZONE, HOUR( 2) }, { "c", tZONE, HOUR( 3) }, @@ -874,7 +874,7 @@ LookupWord(buff) { register char *p; register char *q; - register TABLE *tp; + register CONST TABLE *tp; int i; int abbrev; diff --git a/generic/tclIO.c b/generic/tclIO.c index 15ac94f..a1d5447 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -7596,7 +7596,7 @@ Tcl_FileEventObjCmd(clientData, interp, objc, objv) int modeIndex; /* Index of mode argument. */ int mask; static CONST char *modeOptions[] = {"readable", "writable", NULL}; - static int maskArray[] = {TCL_READABLE, TCL_WRITABLE}; + static CONST int maskArray[] = {TCL_READABLE, TCL_WRITABLE}; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 1, objv, "channelId event ?script?"); diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 7d54156..2b3a5a8 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -421,7 +421,7 @@ Tcl_SeekObjCmd(clientData, interp, objc, objv) static CONST char *originOptions[] = { "start", "current", "end", (char *) NULL }; - static int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END}; + static CONST int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END}; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 1, objv, "channelId offset ?origin?"); diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index 0cd9c67..8699b39 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -143,6 +143,7 @@ static Tcl_ChannelType transformChannelType = { NULL, /* Flush proc. */ TransformNotifyProc, /* Handling of events bubbling up */ TransformWideSeekProc, /* Wide seek proc */ + NULL }; /* diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 1dfd4ba..d50f2e3 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -469,6 +469,7 @@ static FilesystemRecord nativeFilesystemRecord = { NULL, &tclNativeFilesystem, 1, + NULL, NULL }; diff --git a/generic/tclTest.c b/generic/tclTest.c index 194f110..b61213d 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -2777,7 +2777,7 @@ TestlocaleCmd(clientData, interp, objc, objv) "ctype", "numeric", "time", "collate", "monetary", "all", NULL }; - static int lcTypes[] = { + static CONST int lcTypes[] = { LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_ALL }; diff --git a/unix/Makefile.in b/unix/Makefile.in index b066e56..aa771cc 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -49,6 +49,7 @@ BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir) # Directory in which to install libtcl.so or libtcl.a: LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) +DLL_INSTALL_DIR = @DLL_INSTALL_DIR@ # Path name to use when installing library scripts. SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY) @@ -630,9 +631,9 @@ install-binaries: binaries @if test ! -x $(SRC_DIR)/install-sh; then \ chmod +x $(SRC_DIR)/install-sh; \ fi - @echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/" + @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ - @chmod 555 $(LIB_INSTALL_DIR)/$(LIB_FILE) + @chmod 555 $(DLL_INSTALL_DIR)/$(LIB_FILE) @if test "$(TCL_BUILD_EXP_FILE)" != ""; then \ echo "Installing $(TCL_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \ $(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \ diff --git a/unix/configure b/unix/configure index b116827..b933912 100755 --- a/unix/configure +++ b/unix/configure @@ -3277,7 +3277,6 @@ echo "$ac_t""$tcl_cv_cc_m64" 1>&6 CFLAGS="$CFLAGS -fno-inline" fi - # XIM peeking works under XFree86. cat >> confdefs.h <<\EOF #define PEEK_XCLOSEIM 1 EOF @@ -3298,17 +3297,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:3302: checking for dld.h" >&5 +echo "configure:3301: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3377,17 +3376,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:3381: checking for dlfcn.h" >&5 +echo "configure:3380: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3415,13 +3414,13 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:3419: checking for ELF" >&5 +echo "configure:3418: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:3504: checking for ELF" >&5 +echo "configure:3503: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 case `arch` in ppc) echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6 -echo "configure:3612: checking if compiler accepts -arch ppc64 flag" >&5 +echo "configure:3611: checking if compiler accepts -arch ppc64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3616,14 +3615,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_arch_ppc64=yes else @@ -3643,7 +3642,7 @@ echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6 fi;; i386) echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6 -echo "configure:3647: checking if compiler accepts -arch x86_64 flag" >&5 +echo "configure:3646: checking if compiler accepts -arch x86_64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3651,14 +3650,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_arch_x86_64=yes else @@ -3687,7 +3686,7 @@ echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6 fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 -echo "configure:3691: checking if ld accepts -single_module flag" >&5 +echo "configure:3690: checking if ld accepts -single_module flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3695,14 +3694,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_single_module=yes else @@ -3728,7 +3727,7 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 -echo "configure:3732: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:3731: checking if ld accepts -search_paths_first flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3736,14 +3735,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_search_paths_first=yes else @@ -3766,7 +3765,7 @@ echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6 PLAT_OBJS=\$\(MAC\_OSX_OBJS\) PLAT_SRCS=\$\(MAC\_OSX_SRCS\) echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6 -echo "configure:3770: checking whether to use CoreFoundation" >&5 +echo "configure:3769: checking whether to use CoreFoundation" >&5 # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then enableval="$enable_corefoundation" @@ -3778,7 +3777,7 @@ fi echo "$ac_t""$tcl_corefoundation" 1>&6 if test $tcl_corefoundation = yes; then echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6 -echo "configure:3782: checking for CoreFoundation.framework" >&5 +echo "configure:3781: checking for CoreFoundation.framework" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3792,14 +3791,14 @@ else done; fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -3826,7 +3825,7 @@ EOF fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6 -echo "configure:3830: checking for 64-bit CoreFoundation" >&5 +echo "configure:3829: checking for 64-bit CoreFoundation" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3835,14 +3834,14 @@ else eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation_64=yes else @@ -4171,7 +4170,7 @@ EOF # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 -echo "configure:4175: checking for ld accepts -Bexport flag" >&5 +echo "configure:4174: checking for ld accepts -Bexport flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4179,14 +4178,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -4236,13 +4235,13 @@ echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6 if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:4240: checking sys/exec.h" >&5 +echo "configure:4239: checking sys/exec.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4260,7 +4259,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -4280,13 +4279,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:4284: checking a.out.h" >&5 +echo "configure:4283: checking a.out.h" >&5 if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4304,7 +4303,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -4324,13 +4323,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:4328: checking sys/exec_aout.h" >&5 +echo "configure:4327: checking sys/exec_aout.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4348,7 +4347,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -4428,11 +4427,17 @@ fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + else + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + fi else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -4460,12 +4465,12 @@ fi # warning when initializing a union member. echo $ac_n "checking for cast to union support""... $ac_c" 1>&6 -echo "configure:4464: checking for cast to union support" >&5 +echo "configure:4469: checking for cast to union support" >&5 if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_cast_to_union=yes else @@ -4525,11 +4530,12 @@ EOF + echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:4533: checking for build with symbols" >&5 +echo "configure:4539: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -4594,21 +4600,21 @@ TCL_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:4598: checking for required early compiler flags" >&5 +echo "configure:4604: checking for required early compiler flags" >&5 tcl_flags="" if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -4616,7 +4622,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4624,7 +4630,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -4651,14 +4657,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -4666,7 +4672,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4674,7 +4680,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -4701,14 +4707,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -4716,7 +4722,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4724,7 +4730,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4755,7 +4761,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4759: checking for 64-bit integer type" >&5 +echo "configure:4765: checking for 64-bit integer type" >&5 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4763,14 +4769,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4784,7 +4790,7 @@ rm -f conftest* # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4818,13 +4824,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4822: checking for struct dirent64" >&5 +echo "configure:4828: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4832,7 +4838,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4853,13 +4859,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4857: checking for struct stat64" >&5 +echo "configure:4863: checking for struct stat64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4867,7 +4873,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4890,12 +4896,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4894: checking for $ac_func" >&5 +echo "configure:4900: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4943,13 +4949,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4947: checking for off64_t" >&5 +echo "configure:4953: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4957,7 +4963,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4989,14 +4995,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4993: checking whether byte ordering is bigendian" >&5 +echo "configure:4999: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -5007,11 +5013,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:5011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -5022,7 +5028,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:5026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -5042,7 +5048,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -5088,12 +5094,12 @@ fi for ac_func in getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5092: checking for $ac_func" >&5 +echo "configure:5098: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5150,12 +5156,12 @@ done for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5154: checking for $ac_func" >&5 +echo "configure:5160: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5205,12 +5211,12 @@ done echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:5209: checking for strerror" >&5 +echo "configure:5215: checking for strerror" >&5 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strerror=yes" else @@ -5257,12 +5263,12 @@ EOF fi echo $ac_n "checking for getwd""... $ac_c" 1>&6 -echo "configure:5261: checking for getwd" >&5 +echo "configure:5267: checking for getwd" >&5 if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getwd=yes" else @@ -5309,12 +5315,12 @@ EOF fi echo $ac_n "checking for wait3""... $ac_c" 1>&6 -echo "configure:5313: checking for wait3" >&5 +echo "configure:5319: checking for wait3" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_wait3=yes" else @@ -5361,12 +5367,12 @@ EOF fi echo $ac_n "checking for uname""... $ac_c" 1>&6 -echo "configure:5365: checking for uname" >&5 +echo "configure:5371: checking for uname" >&5 if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_uname=yes" else @@ -5420,12 +5426,12 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \ ac_cv_func_realpath=no fi echo $ac_n "checking for realpath""... $ac_c" 1>&6 -echo "configure:5424: checking for realpath" >&5 +echo "configure:5430: checking for realpath" >&5 if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_realpath=yes" else @@ -5478,12 +5484,12 @@ fi if test "${TCL_THREADS}" = 1; then echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6 -echo "configure:5482: checking for getpwuid_r" >&5 +echo "configure:5488: checking for getpwuid_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getpwuid_r=yes" else @@ -5522,13 +5528,13 @@ if eval "test \"`echo '$ac_cv_func_'getpwuid_r`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for getpwuid_r with 5 args""... $ac_c" 1>&6 -echo "configure:5526: checking for getpwuid_r with 5 args" >&5 +echo "configure:5532: checking for getpwuid_r with 5 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5545,7 +5551,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwuid_r_5=yes else @@ -5566,13 +5572,13 @@ EOF else echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6 -echo "configure:5570: checking for getpwuid_r with 4 args" >&5 +echo "configure:5576: checking for getpwuid_r with 4 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5589,7 +5595,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwuid_r_4=yes else @@ -5622,12 +5628,12 @@ else fi echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6 -echo "configure:5626: checking for getpwnam_r" >&5 +echo "configure:5632: checking for getpwnam_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpwnam_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getpwnam_r=yes" else @@ -5666,13 +5672,13 @@ if eval "test \"`echo '$ac_cv_func_'getpwnam_r`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for getpwnam_r with 5 args""... $ac_c" 1>&6 -echo "configure:5670: checking for getpwnam_r with 5 args" >&5 +echo "configure:5676: checking for getpwnam_r with 5 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5689,7 +5695,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwnam_r_5=yes else @@ -5710,13 +5716,13 @@ EOF else echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6 -echo "configure:5714: checking for getpwnam_r with 4 args" >&5 +echo "configure:5720: checking for getpwnam_r with 4 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5733,7 +5739,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwnam_r_4=yes else @@ -5766,12 +5772,12 @@ else fi echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6 -echo "configure:5770: checking for getgrgid_r" >&5 +echo "configure:5776: checking for getgrgid_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getgrgid_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getgrgid_r=yes" else @@ -5810,13 +5816,13 @@ if eval "test \"`echo '$ac_cv_func_'getgrgid_r`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for getgrgid_r with 5 args""... $ac_c" 1>&6 -echo "configure:5814: checking for getgrgid_r with 5 args" >&5 +echo "configure:5820: checking for getgrgid_r with 5 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5833,7 +5839,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrgid_r_5=yes else @@ -5854,13 +5860,13 @@ EOF else echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6 -echo "configure:5858: checking for getgrgid_r with 4 args" >&5 +echo "configure:5864: checking for getgrgid_r with 4 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5877,7 +5883,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrgid_r_4=yes else @@ -5910,12 +5916,12 @@ else fi echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6 -echo "configure:5914: checking for getgrnam_r" >&5 +echo "configure:5920: checking for getgrnam_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getgrnam_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getgrnam_r=yes" else @@ -5954,13 +5960,13 @@ if eval "test \"`echo '$ac_cv_func_'getgrnam_r`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for getgrnam_r with 5 args""... $ac_c" 1>&6 -echo "configure:5958: checking for getgrnam_r with 5 args" >&5 +echo "configure:5964: checking for getgrnam_r with 5 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5977,7 +5983,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrnam_r_5=yes else @@ -5998,13 +6004,13 @@ EOF else echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6 -echo "configure:6002: checking for getgrnam_r with 4 args" >&5 +echo "configure:6008: checking for getgrnam_r with 4 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6021,7 +6027,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrnam_r_4=yes else @@ -6081,12 +6087,12 @@ EOF else echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 -echo "configure:6085: checking for gethostbyname_r" >&5 +echo "configure:6091: checking for gethostbyname_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname_r=yes" else @@ -6125,13 +6131,13 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gethostbyname_r with 6 args""... $ac_c" 1>&6 -echo "configure:6129: checking for gethostbyname_r with 6 args" >&5 +echo "configure:6135: checking for gethostbyname_r with 6 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_6'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6148,7 +6154,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyname_r_6=yes else @@ -6169,13 +6175,13 @@ EOF else echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6 -echo "configure:6173: checking for gethostbyname_r with 5 args" >&5 +echo "configure:6179: checking for gethostbyname_r with 5 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6192,7 +6198,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyname_r_5=yes else @@ -6213,13 +6219,13 @@ EOF else echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6 -echo "configure:6217: checking for gethostbyname_r with 3 args" >&5 +echo "configure:6223: checking for gethostbyname_r with 3 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6234,7 +6240,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyname_r_3=yes else @@ -6268,12 +6274,12 @@ else fi echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6 -echo "configure:6272: checking for gethostbyaddr_r" >&5 +echo "configure:6278: checking for gethostbyaddr_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr_r'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyaddr_r=yes" else @@ -6312,13 +6318,13 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyaddr_r`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gethostbyaddr_r with 7 args""... $ac_c" 1>&6 -echo "configure:6316: checking for gethostbyaddr_r with 7 args" >&5 +echo "configure:6322: checking for gethostbyaddr_r with 7 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_7'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6338,7 +6344,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyaddr_r_7=yes else @@ -6359,13 +6365,13 @@ EOF else echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6 -echo "configure:6363: checking for gethostbyaddr_r with 8 args" >&5 +echo "configure:6369: checking for gethostbyaddr_r with 8 args" >&5 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_8'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -6385,7 +6391,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyaddr_r_8=yes else @@ -6431,17 +6437,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6435: checking for $ac_hdr" >&5 +echo "configure:6441: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6468,7 +6474,7 @@ fi done echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6 -echo "configure:6472: checking termios vs. termio vs. sgtty" >&5 +echo "configure:6478: checking termios vs. termio vs. sgtty" >&5 if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6477,7 +6483,7 @@ else tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6492,7 +6498,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termios else @@ -6509,7 +6515,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6523,7 +6529,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termio else @@ -6541,7 +6547,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6556,7 +6562,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=sgtty else @@ -6574,7 +6580,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6591,7 +6597,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termios else @@ -6609,7 +6615,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6625,7 +6631,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=termio else @@ -6643,7 +6649,7 @@ fi tcl_cv_api_serial=none else cat > conftest.$ac_ext < @@ -6660,7 +6666,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_api_serial=sgtty else @@ -6703,20 +6709,20 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:6707: checking for fd_set in sys/types" >&5 +echo "configure:6713: checking for fd_set in sys/types" >&5 if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:6720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -6732,13 +6738,13 @@ echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 tcl_ok=$tcl_cv_type_fd_set if test $tcl_ok = no; then echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 -echo "configure:6736: checking for fd_mask in sys/select" >&5 +echo "configure:6742: checking for fd_mask in sys/select" >&5 if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -6775,12 +6781,12 @@ fi #------------------------------------------------------------------------------ echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:6779: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:6785: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6788,7 +6794,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:6792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -6813,17 +6819,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6817: checking for $ac_hdr" >&5 +echo "configure:6823: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6850,12 +6856,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:6854: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:6860: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6864,7 +6870,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:6868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -6885,12 +6891,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:6889: checking for tm_zone in struct tm" >&5 +echo "configure:6895: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -6898,7 +6904,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:6902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -6918,12 +6924,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:6922: checking for tzname" >&5 +echo "configure:6928: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -6933,7 +6939,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:6937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -6958,12 +6964,12 @@ fi for ac_func in gmtime_r localtime_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6962: checking for $ac_func" >&5 +echo "configure:6968: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7012,20 +7018,20 @@ done echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6 -echo "configure:7016: checking tm_tzadj in struct tm" >&5 +echo "configure:7022: checking tm_tzadj in struct tm" >&5 if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct tm tm; tm.tm_tzadj; ; return 0; } EOF -if { (eval echo configure:7029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_member_tm_tzadj=yes else @@ -7046,20 +7052,20 @@ EOF fi echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:7050: checking tm_gmtoff in struct tm" >&5 +echo "configure:7056: checking tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct tm tm; tm.tm_gmtoff; ; return 0; } EOF -if { (eval echo configure:7063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_member_tm_gmtoff=yes else @@ -7084,13 +7090,13 @@ EOF # (like convex) have timezone functions, etc. # echo $ac_n "checking long timezone variable""... $ac_c" 1>&6 -echo "configure:7088: checking long timezone variable" >&5 +echo "configure:7094: checking long timezone variable" >&5 if eval "test \"`echo '$''{'tcl_cv_timezone_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -7099,7 +7105,7 @@ extern long timezone; exit (0); ; return 0; } EOF -if { (eval echo configure:7103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_timezone_long=yes else @@ -7122,13 +7128,13 @@ EOF # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6 -echo "configure:7126: checking time_t timezone variable" >&5 +echo "configure:7132: checking time_t timezone variable" >&5 if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -7137,7 +7143,7 @@ extern time_t timezone; exit (0); ; return 0; } EOF -if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_timezone_time=yes else @@ -7165,12 +7171,12 @@ EOF #-------------------------------------------------------------------- if test "$ac_cv_cygwin" != "yes"; then echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:7169: checking for st_blksize in struct stat" >&5 +echo "configure:7175: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7178,7 +7184,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:7182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -7200,12 +7206,12 @@ fi fi echo $ac_n "checking for fstatfs""... $ac_c" 1>&6 -echo "configure:7204: checking for fstatfs" >&5 +echo "configure:7210: checking for fstatfs" >&5 if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_fstatfs=yes" else @@ -7257,7 +7263,7 @@ fi # data, this checks it and add memcmp.o to LIBOBJS if needed #-------------------------------------------------------------------- echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:7261: checking for 8-bit clean memcmp" >&5 +echo "configure:7267: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7265,7 +7271,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -7299,12 +7305,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" # {The replacement define is in compat/string.h} #-------------------------------------------------------------------- echo $ac_n "checking for memmove""... $ac_c" 1>&6 -echo "configure:7303: checking for memmove" >&5 +echo "configure:7309: checking for memmove" >&5 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_memmove=yes" else @@ -7360,7 +7366,7 @@ fi #-------------------------------------------------------------------- if test "x${ac_cv_func_strstr}" = "xyes"; then echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6 -echo "configure:7364: checking proper strstr implementation" >&5 +echo "configure:7370: checking proper strstr implementation" >&5 if eval "test \"`echo '$''{'tcl_cv_strstr_unbroken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7369,7 +7375,7 @@ else tcl_cv_strstr_unbroken=broken else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strstr_unbroken=ok else @@ -7405,12 +7411,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strtoul""... $ac_c" 1>&6 -echo "configure:7409: checking for strtoul" >&5 +echo "configure:7415: checking for strtoul" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtoul=yes" else @@ -7455,7 +7461,7 @@ fi if test $tcl_ok = 1; then echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6 -echo "configure:7459: checking proper strtoul implementation" >&5 +echo "configure:7465: checking proper strtoul implementation" >&5 if eval "test \"`echo '$''{'tcl_cv_strtoul_unbroken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7464,7 +7470,7 @@ else tcl_cv_strtoul_unbroken=broken else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtoul_unbroken=ok else @@ -7509,12 +7515,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:7513: checking for strtod" >&5 +echo "configure:7519: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -7559,7 +7565,7 @@ fi if test $tcl_ok = 1; then echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6 -echo "configure:7563: checking proper strtod implementation" >&5 +echo "configure:7569: checking proper strtod implementation" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_unbroken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7568,7 +7574,7 @@ else tcl_cv_strtod_unbroken=broken else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_unbroken=ok else @@ -7616,12 +7622,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:7620: checking for strtod" >&5 +echo "configure:7626: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -7666,7 +7672,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:7670: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:7676: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7675,7 +7681,7 @@ else tcl_cv_strtod_buggy=buggy else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=ok else @@ -7729,12 +7735,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7733: checking for ANSI C header files" >&5 +echo "configure:7739: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -7742,7 +7748,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7759,7 +7765,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -7777,7 +7783,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -7798,7 +7804,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7809,7 +7815,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7833,12 +7839,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7837: checking for mode_t" >&5 +echo "configure:7843: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7866,12 +7872,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7870: checking for pid_t" >&5 +echo "configure:7876: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7899,12 +7905,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:7903: checking for size_t" >&5 +echo "configure:7909: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -7932,12 +7938,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:7936: checking for uid_t in sys/types.h" >&5 +echo "configure:7942: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -7967,13 +7973,13 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:7971: checking for socklen_t" >&5 +echo "configure:7977: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -8012,12 +8018,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for opendir""... $ac_c" 1>&6 -echo "configure:8016: checking for opendir" >&5 +echo "configure:8022: checking for opendir" >&5 if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_opendir=yes" else @@ -8073,13 +8079,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking union wait""... $ac_c" 1>&6 -echo "configure:8077: checking union wait" >&5 +echo "configure:8083: checking union wait" >&5 if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -8091,7 +8097,7 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED ; return 0; } EOF -if { (eval echo configure:8095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_union_wait=yes else @@ -8118,12 +8124,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6 -echo "configure:8122: checking for strncasecmp" >&5 +echo "configure:8128: checking for strncasecmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strncasecmp=yes" else @@ -8168,7 +8174,7 @@ fi if test "$tcl_ok" = 0; then echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6 -echo "configure:8172: checking for strncasecmp in -lsocket" >&5 +echo "configure:8178: checking for strncasecmp in -lsocket" >&5 ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8176,7 +8182,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8211,7 +8217,7 @@ fi fi if test "$tcl_ok" = 0; then echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6 -echo "configure:8215: checking for strncasecmp in -linet" >&5 +echo "configure:8221: checking for strncasecmp in -linet" >&5 ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8219,7 +8225,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8268,12 +8274,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 -echo "configure:8272: checking for BSDgettimeofday" >&5 +echo "configure:8278: checking for BSDgettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_BSDgettimeofday=yes" else @@ -8318,12 +8324,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:8322: checking for gettimeofday" >&5 +echo "configure:8328: checking for gettimeofday" >&5 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gettimeofday=yes" else @@ -8373,13 +8379,13 @@ fi fi echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 -echo "configure:8377: checking for gettimeofday declaration" >&5 +echo "configure:8383: checking for gettimeofday declaration" >&5 if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -8410,14 +8416,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:8414: checking whether char is unsigned" >&5 +echo "configure:8420: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -8473,13 +8479,13 @@ EOF fi echo $ac_n "checking signed char declarations""... $ac_c" 1>&6 -echo "configure:8477: checking signed char declarations" >&5 +echo "configure:8483: checking signed char declarations" >&5 if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_char_signed=yes else @@ -8514,7 +8520,7 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6 -echo "configure:8518: checking for a putenv() that copies the buffer" >&5 +echo "configure:8524: checking for a putenv() that copies the buffer" >&5 if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8523,7 +8529,7 @@ else tcl_cv_putenv_copy=no else cat > conftest.$ac_ext < @@ -8545,7 +8551,7 @@ else } EOF -if { (eval echo configure:8549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_putenv_copy=no else @@ -8585,17 +8591,17 @@ fi if test "$langinfo_ok" = "yes"; then ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6 -echo "configure:8589: checking for langinfo.h" >&5 +echo "configure:8595: checking for langinfo.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8619,21 +8625,21 @@ fi fi echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6 -echo "configure:8623: checking whether to use nl_langinfo" >&5 +echo "configure:8629: checking whether to use nl_langinfo" >&5 if test "$langinfo_ok" = "yes"; then if eval "test \"`echo '$''{'tcl_cv_langinfo_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:8637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_langinfo_h=yes else @@ -8666,17 +8672,17 @@ if test "`uname -s`" = "Darwin" ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8670: checking for $ac_hdr" >&5 +echo "configure:8676: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8705,12 +8711,12 @@ done for ac_func in copyfile do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8709: checking for $ac_func" >&5 +echo "configure:8715: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8762,17 +8768,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8766: checking for $ac_hdr" >&5 +echo "configure:8772: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8801,12 +8807,12 @@ done for ac_func in OSSpinLockLock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8805: checking for $ac_func" >&5 +echo "configure:8811: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8856,12 +8862,12 @@ done for ac_func in pthread_atfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8860: checking for $ac_func" >&5 +echo "configure:8866: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8925,17 +8931,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8929: checking for $ac_hdr" >&5 +echo "configure:8935: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8963,14 +8969,14 @@ done if test "$ac_cv_header_AvailabilityMacros_h" = yes; then echo $ac_n "checking if weak import is available""... $ac_c" 1>&6 -echo "configure:8967: checking if weak import is available" >&5 +echo "configure:8973: checking if weak import is available" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_weak_import'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_weak_import=yes else @@ -9014,13 +9020,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fts""... $ac_c" 1>&6 -echo "configure:9018: checking for fts" >&5 +echo "configure:9024: checking for fts" >&5 if eval "test \"`echo '$''{'tcl_cv_api_fts'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -9035,7 +9041,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_api_fts=yes else @@ -9067,17 +9073,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9071: checking for $ac_hdr" >&5 +echo "configure:9077: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9107,17 +9113,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9111: checking for $ac_hdr" >&5 +echo "configure:9117: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9145,7 +9151,7 @@ done echo $ac_n "checking system version""... $ac_c" 1>&6 -echo "configure:9149: checking system version" >&5 +echo "configure:9155: checking system version" >&5 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9176,7 +9182,7 @@ echo "$ac_t""$tcl_cv_sys_version" 1>&6 system=$tcl_cv_sys_version echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 -echo "configure:9180: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo "configure:9186: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 case $system in OSF*) cat >> confdefs.h <<\EOF @@ -9220,17 +9226,17 @@ fi if test $tcl_ok = yes; then ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6 -echo "configure:9224: checking for sys/sdt.h" >&5 +echo "configure:9230: checking for sys/sdt.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9257,7 +9263,7 @@ if test $tcl_ok = yes; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9261: checking for $ac_word" >&5 +echo "configure:9267: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DTRACE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9292,7 +9298,7 @@ fi test -z "$ac_cv_path_DTRACE" && tcl_ok=no fi echo $ac_n "checking whether to enable DTrace support""... $ac_c" 1>&6 -echo "configure:9296: checking whether to enable DTrace support" >&5 +echo "configure:9302: checking whether to enable DTrace support" >&5 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then cat >> confdefs.h <<\EOF @@ -9346,7 +9352,7 @@ if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 -echo "configure:9350: checking how to package libraries" >&5 +echo "configure:9356: checking how to package libraries" >&5 # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then enableval="$enable_framework" @@ -9733,6 +9739,7 @@ s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g s%@MAKE_LIB@%$MAKE_LIB%g s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g s%@INSTALL_LIB@%$INSTALL_LIB%g +s%@DLL_INSTALL_DIR@%$DLL_INSTALL_DIR%g s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c804072..2391a41 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1168,7 +1168,7 @@ dnl AC_CHECK_TOOL(AR, ar) AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" - AC_DEFINE(USE_DELTA_FOR_TZ) + AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Use delta for TZ]) fi ;; BeOS*) @@ -1440,8 +1440,8 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS="$CFLAGS -fno-inline" fi - # XIM peeking works under XFree86. - AC_DEFINE(PEEK_XCLOSEIM) + AC_DEFINE(PEEK_XCLOSEIM, 1, + [XIM peeking works under XFree86]) ;; GNU*) @@ -1742,7 +1742,8 @@ dnl AC_CHECK_TOOL(AR, ar) done; fi; LIBS=$hold_libs]) if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" - AC_DEFINE(HAVE_COREFOUNDATION) + AC_DEFINE(HAVE_COREFOUNDATION, 1, + [Do we have access to Darwin CoreFoundation.framework?]) else tcl_corefoundation=no fi @@ -1758,7 +1759,8 @@ dnl AC_CHECK_TOOL(AR, ar) eval $v'="$hold_'$v'"' done]) if test $tcl_cv_lib_corefoundation_64 = no; then - AC_DEFINE(NO_COREFOUNDATION_64) + AC_DEFINE(NO_COREFOUNDATION_64, 1, + [Is Darwin CoreFoundation unavailable for 64-bit?]) fi fi fi @@ -2197,11 +2199,17 @@ dnl # preprocessing tests use only CPPFLAGS. if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + else + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + fi else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -2270,6 +2278,7 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(INSTALL_LIB) + AC_SUBST(DLL_INSTALL_DIR) AC_SUBST(INSTALL_STUB_LIB) AC_SUBST(RANLIB) ]) diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 0ae41c4..7018e15 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -1220,7 +1220,7 @@ TtyGetOptionProc(instanceData, interp, optionName, dsPtr) # define TtyGetBaud(speed) ((int) (speed)) #else /* !DIRECT_BAUD */ -static struct {int baud; unsigned long speed;} speeds[] = { +static CONST struct {int baud; unsigned long speed;} speeds[] = { #ifdef B0 {0, B0}, #endif diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 231e4b7..2aeed16 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -54,7 +54,7 @@ enum { WIN_SYSTEM_ATTRIBUTE }; -static int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN, +static const int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN, 0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM}; diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index f15daa5..d31380e 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1367,7 +1367,7 @@ ApplicationType(interp, originalName, fullName) Tcl_DString nameBuf, ds; CONST TCHAR *nativeName; WCHAR nativeFullPath[MAX_PATH]; - static char extensions[][5] = {"", ".com", ".exe", ".bat"}; + static const char extensions[][5] = {"", ".com", ".exe", ".bat"}; /* Look for the program as an external program. First try the name * as it is, then try adding .com, .exe, and .bat, in that order, to diff --git a/win/tclWinReg.c b/win/tclWinReg.c index d4c7292..3960fda 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -49,7 +49,7 @@ static CONST char *rootKeyNames[] = { "HKEY_PERFORMANCE_DATA", "HKEY_DYN_DATA", NULL }; -static HKEY rootKeys[] = { +static const HKEY rootKeys[] = { HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, HKEY_DYN_DATA }; diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 0ddd76b..dadd067 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -440,7 +440,7 @@ TestExceptionCmd( int objc, /* Argument count */ Tcl_Obj *CONST objv[]) /* Argument vector */ { - static char *cmds[] = { + static CONST84 char *cmds[] = { "access_violation", "datatype_misalignment", "array_bounds", @@ -464,7 +464,7 @@ TestExceptionCmd( "ctrl+c", NULL }; - static DWORD exceptions[] = { + static const DWORD exceptions[] = { EXCEPTION_ACCESS_VIOLATION, EXCEPTION_DATATYPE_MISALIGNMENT, EXCEPTION_ARRAY_BOUNDS_EXCEEDED, diff --git a/win/tclWinTime.c b/win/tclWinTime.c index dd5699e..8bbd8fd 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -26,11 +26,11 @@ * each month, where index 1 is January. */ -static int normalDays[] = { +static const int normalDays[] = { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 }; -static int leapDays[] = { +static const int leapDays[] = { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; @@ -668,7 +668,7 @@ ComputeGMT(tp) struct tm *tmPtr; long tmp, rem; int isLeap; - int *days; + const int *days; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); tmPtr = &tsdPtr->tm; -- cgit v0.12 From 55b3c5a95d03b9102041c8aa71c94dd7f7b07b52 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 23 Apr 2012 14:13:35 +0000 Subject: autoconf --- unix/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/configure b/unix/configure index d87b633..848d6c3 100755 --- a/unix/configure +++ b/unix/configure @@ -9132,7 +9132,7 @@ fi UNSHARED_LIB_SUFFIX='${VERSION}.a' fi - DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then -- cgit v0.12 From cc79d413c959197709155dc84b0680e37c20400e Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 23 Apr 2012 17:02:54 +0000 Subject: grammar fix (reported on Tcler's Chat) --- doc/FileSystem.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index 52eeb23..d7198b1 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -1218,8 +1218,8 @@ In addition, if \fIinterp\fR is non-NULL, the \fBTcl_FSOpenFileChannelProc\fR leaves an error message in \fIinterp\fR's result after any error. .PP -The newly created channel must not registered in the supplied -interpreter; that task is up to the caller of +The newly created channel must not be registered in the supplied interpreter +by a \fBTcl_FSOpenFileChannelProc\fR; that task is up to the caller of \fBTcl_FSOpenFileChannel\fR (if necessary). If one of the standard channels, \fBstdin\fR, \fBstdout\fR or \fBstderr\fR was previously closed, the act of creating the new channel also assigns it -- cgit v0.12 From a74b2db348b33fef423a84c7619861ac8f366b79 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Apr 2012 12:55:42 +0000 Subject: implement TclWinGetSockOpt and TclWinGetServByName for cygwi (should work, but not yet tested on UNIX) --- generic/tclInt.decls | 38 ++++++++++++--------- generic/tclIntPlatDecls.h | 87 +++++++++++++++++++++++++++++++---------------- generic/tclStubInit.c | 31 +++++++++++++---- unix/tclUnixPort.h | 1 - 4 files changed, 104 insertions(+), 53 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index e438588..ef2f6df 100755 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -953,12 +953,14 @@ declare 0 unix { declare 1 unix { void TclWinConvertWSAError(unsigned int errCode) } +# On non-cygwin, this is actually a reference to TclpCreateCommandChannel declare 2 unix { - Tcl_Channel TclpCreateCommandChannel(TclFile readFile, - TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr) + struct servent *TclWinGetServByName(const char *nm, const char *proto) } +# On non-cygwin, this is actually a reference to TclpCreatePipe declare 3 unix { - int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) + int TclWinGetSockOpt(void *s, int level, int optname, + char *optval, int *optlen) } # On non-cygwin, this is actually a reference to TclpCreateProcess declare 4 unix { @@ -1005,8 +1007,10 @@ declare 11 unix { declare 12 unix { struct tm *TclpGmtime_unix(TclpTime_t_CONST clock) } +# On cygwin, this is a reference to TclpCreateCommandChannel +# Otherwise, this is a reference to TclpInetNtoa declare 13 unix { - char *TclpInetNtoa(struct in_addr addr) + void TclIntPlatReserved13(void) } #On cygwin, TclpCreateProcess is here declare 15 unix { @@ -1050,26 +1054,26 @@ declare 30 unix { declare 31 unix { int TclpCloseFile(TclFile file) } -#declare 32 unix { -# Tcl_Channel TclpCreateCommandChannel(TclFile readFile, -# TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr) -#} -#declare 33 unix { -# int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) -#} +declare 32 unix { + Tcl_Channel TclpCreateCommandChannel(TclFile readFile, + TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr) +} +declare 33 unix { + int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) +} declare 34 unix { - int TclpCreateProcess (Tcl_Interp *interp, + int TclpCreateProcess(Tcl_Interp *interp, int argc, const char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr) } -#declare 35 unix { -# char *TclpInetNtoa(struct in_addr addr) -#} +declare 35 unix { + char *TclpInetNtoa(struct in_addr addr) +} declare 36 unix { - TclFile TclpMakeFile (Tcl_Channel channel, int direction) + TclFile TclpMakeFile(Tcl_Channel channel, int direction) } declare 37 unix { - TclFile TclpOpenFile (const char *fname, int mode) + TclFile TclpOpenFile(const char *fname, int mode) } declare 38 unix { int TclUnixWaitForFile(int fd, int mask, int timeout) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 6d3ed94..63f9fe6 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -32,13 +32,11 @@ EXTERN void TclWinConvertError _ANSI_ARGS_((unsigned int errCode)); EXTERN void TclWinConvertWSAError _ANSI_ARGS_(( unsigned int errCode)); /* 2 */ -EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_(( - TclFile readFile, TclFile writeFile, - TclFile errorFile, int numPids, - Tcl_Pid *pidPtr)); +EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char *nm, + CONST char *proto)); /* 3 */ -EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, - TclFile *writePipe)); +EXTERN int TclWinGetSockOpt _ANSI_ARGS_((VOID *s, int level, + int optname, char *optval, int *optlen)); /* 4 */ EXTERN VOID * TclWinGetTclInstance _ANSI_ARGS_((void)); /* Slot 5 is reserved */ @@ -59,7 +57,7 @@ EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_(( /* 12 */ EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 13 */ -EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr)); +EXTERN void TclIntPlatReserved13 _ANSI_ARGS_((void)); /* Slot 14 is reserved */ /* 15 */ EXTERN int TclMacOSXGetFileAttribute _ANSI_ARGS_(( @@ -99,14 +97,21 @@ EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 31 */ EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); -/* Slot 32 is reserved */ -/* Slot 33 is reserved */ +/* 32 */ +EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_(( + TclFile readFile, TclFile writeFile, + TclFile errorFile, int numPids, + Tcl_Pid *pidPtr)); +/* 33 */ +EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, + TclFile *writePipe)); /* 34 */ EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); -/* Slot 35 is reserved */ +/* 35 */ +EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr)); /* 36 */ EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, int direction)); @@ -267,8 +272,8 @@ typedef struct TclIntPlatStubs { #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ void (*tclWinConvertError) _ANSI_ARGS_((unsigned int errCode)); /* 0 */ void (*tclWinConvertWSAError) _ANSI_ARGS_((unsigned int errCode)); /* 1 */ - Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)); /* 2 */ - int (*tclpCreatePipe) _ANSI_ARGS_((TclFile *readPipe, TclFile *writePipe)); /* 3 */ + struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char *nm, CONST char *proto)); /* 2 */ + int (*tclWinGetSockOpt) _ANSI_ARGS_((VOID *s, int level, int optname, char *optval, int *optlen)); /* 3 */ VOID * (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ VOID *reserved5; unsigned short (*tclWinNToHS) _ANSI_ARGS_((unsigned short ns)); /* 6 */ @@ -278,7 +283,7 @@ typedef struct TclIntPlatStubs { Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR *dir)); /* 10 */ struct tm * (*tclpLocaltime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 11 */ struct tm * (*tclpGmtime_unix) _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 12 */ - char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 13 */ + void (*tclIntPlatReserved13) _ANSI_ARGS_((void)); /* 13 */ VOID *reserved14; int (*tclMacOSXGetFileAttribute) _ANSI_ARGS_((Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* 15 */ VOID *reserved16; @@ -297,10 +302,10 @@ typedef struct TclIntPlatStubs { int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 30 */ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 31 */ - VOID *reserved32; - VOID *reserved33; + Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)); /* 32 */ + int (*tclpCreatePipe) _ANSI_ARGS_((TclFile *readPipe, TclFile *writePipe)); /* 33 */ int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); /* 34 */ - VOID *reserved35; + char * (*tclpInetNtoa) _ANSI_ARGS_((struct in_addr addr)); /* 35 */ TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 36 */ TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char *fname, int mode)); /* 37 */ int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 38 */ @@ -391,13 +396,13 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclWinConvertWSAError \ (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ #endif -#ifndef TclpCreateCommandChannel -#define TclpCreateCommandChannel \ - (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 2 */ +#ifndef TclWinGetServByName +#define TclWinGetServByName \ + (tclIntPlatStubsPtr->tclWinGetServByName) /* 2 */ #endif -#ifndef TclpCreatePipe -#define TclpCreatePipe \ - (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ +#ifndef TclWinGetSockOpt +#define TclWinGetSockOpt \ + (tclIntPlatStubsPtr->tclWinGetSockOpt) /* 3 */ #endif #ifndef TclWinGetTclInstance #define TclWinGetTclInstance \ @@ -432,9 +437,9 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclpGmtime_unix \ (tclIntPlatStubsPtr->tclpGmtime_unix) /* 12 */ #endif -#ifndef TclpInetNtoa -#define TclpInetNtoa \ - (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ +#ifndef TclIntPlatReserved13 +#define TclIntPlatReserved13 \ + (tclIntPlatStubsPtr->tclIntPlatReserved13) /* 13 */ #endif /* Slot 14 is reserved */ #ifndef TclMacOSXGetFileAttribute @@ -490,13 +495,22 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclpCloseFile \ (tclIntPlatStubsPtr->tclpCloseFile) /* 31 */ #endif -/* Slot 32 is reserved */ -/* Slot 33 is reserved */ +#ifndef TclpCreateCommandChannel +#define TclpCreateCommandChannel \ + (tclIntPlatStubsPtr->tclpCreateCommandChannel) /* 32 */ +#endif +#ifndef TclpCreatePipe +#define TclpCreatePipe \ + (tclIntPlatStubsPtr->tclpCreatePipe) /* 33 */ +#endif #ifndef TclpCreateProcess #define TclpCreateProcess \ (tclIntPlatStubsPtr->tclpCreateProcess) /* 34 */ #endif -/* Slot 35 is reserved */ +#ifndef TclpInetNtoa +#define TclpInetNtoa \ + (tclIntPlatStubsPtr->tclpInetNtoa) /* 35 */ +#endif #ifndef TclpMakeFile #define TclpMakeFile \ (tclIntPlatStubsPtr->tclpMakeFile) /* 36 */ @@ -734,6 +748,7 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #undef TclpLocaltime_unix #undef TclpGmtime_unix +#undef TclIntPlatReserved13 #if !defined(__WIN32__) && !defined(MAC_TCL) # undef TclpGetPid @@ -743,6 +758,7 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; # undef TclpCreateProcess # undef TclpMakeFile # undef TclpOpenFile +# undef TclpCreateCommandChannel # ifdef __CYGWIN__ # define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ @@ -751,6 +767,8 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; int direction))) tclIntPlatStubsPtr->tclMacOSXMatchType) # define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) +# define TclpCreateCommandChannel ((Tcl_Channel (*) _ANSI_ARGS_((TclFile, TclFile, \ + TclFile, int, Tcl_Pid *))) tclIntPlatStubsPtr->tclIntPlatReserved13) # else # define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ @@ -758,11 +776,16 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; # define TclpMakeFile ((TclFile (*) _ANSI_ARGS_((Tcl_Channel channel, \ int direction))) tclIntPlatStubsPtr->tclWinNToHS) # define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ - tclIntPlatStubsPtr->tclWinNToHS) + tclIntPlatStubsPtr->tclWinSetSockOpt) +# define TclpCreateCommandChannel ((Tcl_Channel (*) _ANSI_ARGS_((TclFile, TclFile, \ + TclFile, int, Tcl_Pid *))) tclIntPlatStubsPtr->tclWinGetServByName) # undef TclpCreateTempFile # undef TclGetAndDetachPids # undef TclpCloseFile +# undef TclpCreatePipe +# undef TclpInetNtoa +# undef TclUnixWaitForFile # define TclpCreateTempFile ((TclFile (*) _ANSI_ARGS_((CONST char *))) \ tclIntPlatStubsPtr->tclWinGetPlatformId) @@ -770,6 +793,12 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; tclIntPlatStubsPtr->tclWinConvertError) # define TclpCloseFile ((int (*) _ANSI_ARGS_((TclFile))) \ tclIntPlatStubsPtr->tclWinConvertWSAError) +# define TclpCreatePipe ((int (*)_ANSI_ARGS_((TclFile *, TclFile *))) \ + tclIntPlatStubsPtr->tclWinGetSockOpt) +# define TclpInetNtoa ((char *(*) _ANSI_ARGS_((struct in_addr addr))) \ + tclIntPlatStubsPtr->tclIntPlatReserved13) +# define TclUnixWaitForFile (int (*) _ANSI_ARGS_((int, int, int))) \ + tclIntPlatStubsPtr->tclpGetPid) # endif # endif #endif diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index bd3dd05..fedce5e 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -82,9 +82,12 @@ int __stdcall GetModuleHandleExW(unsigned int, const char *, void *); #define TclWinGetTclInstance winGetTclInstance #define TclWinNToHS winNToHS #define TclWinSetSockOpt winSetSockOpt +#define TclWinGetSockOpt winGetSockOpt +#define TclWinGetServByName winGetServByName #define TclWinNoBackslash winNoBackslash #define TclWinSetInterfaces (void (*) (int)) doNothing #define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing +#define TclIntPlatReserved13 (void (*) ()) TclpCreateCommandChannel #define TclWinFlushDirtyChannels doNothing #define TclWinResetInterfaces doNothing #define TclpGetPid getPid @@ -120,6 +123,19 @@ TclWinSetSockOpt(void *s, int level, int optname, return setsockopt((int) s, level, optname, optval, optlen); } +static int +TclWinGetSockOpt(void *s, int level, int optname, + char *optval, int optlen) +{ + return getsockopt((int) s, level, optname, optval, optlen); +} + +struct servent * +TclWinGetServByName(const char *name, const char *proto) +{ + return getservbyname(name, proto); +} + static char * TclWinNoBackslash(char *path) { @@ -190,6 +206,9 @@ Tcl_WinTCharToUtf( # define TclWinGetTclInstance (void *(*)()) TclpCreateProcess # define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile # define TclWinSetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, CONST char *, int))) TclpOpenFile +# define TclWinGetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, char *, int))) TclpCreatePipe +# define TclWinGetServByName (struct servent *(*) _ANSI_ARGS_((const char *nm, const char *proto))) TclpCreateCommandChannel +# define TclIntPlatReserved13 (void (*) ()) TclpInetNtoa # define TclWinAddProcess 0 # define TclWinNoBackslash 0 # define TclWinSetInterfaces 0 @@ -458,8 +477,8 @@ TclIntPlatStubs tclIntPlatStubs = { #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ TclWinConvertError, /* 0 */ TclWinConvertWSAError, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ + TclWinGetServByName, /* 2 */ + TclWinGetSockOpt, /* 3 */ TclWinGetTclInstance, /* 4 */ NULL, /* 5 */ TclWinNToHS, /* 6 */ @@ -469,7 +488,7 @@ TclIntPlatStubs tclIntPlatStubs = { TclpReaddir, /* 10 */ TclpLocaltime_unix, /* 11 */ TclpGmtime_unix, /* 12 */ - TclpInetNtoa, /* 13 */ + TclIntPlatReserved13, /* 13 */ NULL, /* 14 */ TclMacOSXGetFileAttribute, /* 15 */ NULL, /* 16 */ @@ -488,10 +507,10 @@ TclIntPlatStubs tclIntPlatStubs = { TclWinCPUID, /* 29 */ TclGetAndDetachPids, /* 30 */ TclpCloseFile, /* 31 */ - NULL, /* 32 */ - NULL, /* 33 */ + TclpCreateCommandChannel, /* 32 */ + TclpCreatePipe, /* 33 */ TclpCreateProcess, /* 34 */ - NULL, /* 35 */ + TclpInetNtoa, /* 35 */ TclpMakeFile, /* 36 */ TclpOpenFile, /* 37 */ TclUnixWaitForFile, /* 38 */ diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index a26922c..9426697 100755 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -698,7 +698,6 @@ EXTERN struct tm * TclpLocaltime(TclpTime_t_CONST); #ifndef TclpGmtime EXTERN struct tm * TclpGmtime(TclpTime_t_CONST); #endif -EXTERN char * TclpInetNtoa(struct in_addr); #define inet_ntoa(x) TclpInetNtoa(x) #else typedef int TclpMutex; -- cgit v0.12 From 4f07974ad48f283b3c7bc0aa520b59a8450771cb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Apr 2012 13:10:04 +0000 Subject: oops, wrong signature --- generic/tclStubInit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index fedce5e..8b6e22b 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -125,7 +125,7 @@ TclWinSetSockOpt(void *s, int level, int optname, static int TclWinGetSockOpt(void *s, int level, int optname, - char *optval, int optlen) + char *optval, int *optlen) { return getsockopt((int) s, level, optname, optval, optlen); } -- cgit v0.12 From 1916575eb7e519f88b930218c3dc7311cd9c1da5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Apr 2012 20:42:44 +0000 Subject: syntax error --- unix/tclUnixCompat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index aad3d76..3f7bbdf 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -696,7 +696,8 @@ TclWinCPUID( __asm__ __volatile__ ("cpuid":\ "=a" (regsPtr[0]), "=b" (regsPtr[1]), "=c" (regsPtr[2]), "=d" (regsPtr[3]) : "a" (index)); status = TCL_OK; -#endif return status; +#endif + return status; } /* -- cgit v0.12 From 136ab8e516a21b2151c13a72576fd4311094953b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Apr 2012 21:25:42 +0000 Subject: gcc warnings --- unix/tclUnixFile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index dc5af66..8fb9fd9 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -39,7 +39,6 @@ TclpFindExecutable( CONST char *argv0) /* The value of the application's argv[0] * (native). */ { - int length; #ifdef __CYGWIN__ char buf[PATH_MAX * TCL_UTF_MAX + 1]; char name[PATH_MAX * TCL_UTF_MAX + 1]; @@ -72,7 +71,7 @@ TclpFindExecutable( buf[length] = '\0'; #else if (argv0 == NULL) { - return NULL; + return; } Tcl_DStringInit(&buffer); -- cgit v0.12 From 5e51fad7d7a9da7e201afd58883e13e04b2aae74 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Apr 2012 21:50:55 +0000 Subject: fix merge error --- generic/tclIntPlatDecls.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index a05c71a..bc0f4fd 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -638,6 +638,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr; #undef TclpLocaltime_unix #undef TclpGmtime_unix #undef TclIntPlatReserved13 +#undef TclWinConvertWSAError +#define TclWinConvertWSAError TclWinConvertError #if !defined(__WIN32__) # undef TclpGetPid -- cgit v0.12 From e32765f9cc3dae186aa1ddf4f395280ce115c9b3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 Apr 2012 11:08:32 +0000 Subject: truncation in SetWindowLongPtr data --- win/tclWinDde.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 0d5f7d7..291a244 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -814,9 +814,9 @@ DdeClientWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ddeEnumServices *es; es = (ddeEnumServices*)lpcs->lpCreateParams; #ifdef _WIN64 - SetWindowLongPtr(hwnd, GWLP_USERDATA, (long)es); + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) es); #else - SetWindowLong(hwnd, GWL_USERDATA, (long)es); + SetWindowLong(hwnd, GWL_USERDATA, (LONG) es); #endif break; } -- cgit v0.12 From 46a826db38fe47acda1efb7714281b9df8ead242 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 25 Apr 2012 12:07:45 +0000 Subject: * generic/tclUtil.c (TclDStringToObj): Added internal function to make the fairly-common operation of converting a DString into an Obj a more efficient one. --- ChangeLog | 11 ++++++++++ generic/tclCmdAH.c | 12 +++-------- generic/tclFileName.c | 13 ++++-------- generic/tclInt.h | 1 + generic/tclMain.c | 23 +++++++++++--------- generic/tclPathObj.c | 5 +---- generic/tclRegexp.c | 4 +--- generic/tclUtil.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ generic/tclZlib.c | 8 ++----- unix/tclUnixFCmd.c | 6 ++---- unix/tclUnixFile.c | 22 ++++--------------- unix/tclUnixInit.c | 7 ++----- win/tclWinFCmd.c | 12 +++++------ win/tclWinFile.c | 6 +----- win/tclWinInit.c | 5 ++--- 15 files changed, 110 insertions(+), 83 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17daabc..bf2201b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-04-25 Donal K. Fellows + + * generic/tclUtil.c (TclDStringToObj): Added internal function to make + the fairly-common operation of converting a DString into an Obj a more + efficient one; for long strings, it can just transfer the ownership of + the buffer directly. Replaces this: + obj=Tcl_NewStringObj(Tcl_DStringValue(&ds),Tcl_DStringLength(&ds)); + Tcl_DStringFree(&ds); + with this: + obj=TclDStringToObj(&ds); + 2012-04-24 Jan Nijtmans * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin tclsh diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 1cbc4d2..70aef8d 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -563,9 +563,7 @@ Tcl_EncodingObjCmd( * truncate the string at the first null byte. */ - Tcl_SetObjResult(interp, Tcl_NewStringObj( - Tcl_DStringValue(&ds), Tcl_DStringLength(&ds))); - Tcl_DStringFree(&ds); + Tcl_SetObjResult(interp, TclDStringToObj(&ds)); } else { /* * Store the result as binary data. @@ -1869,20 +1867,16 @@ PathNativeNameCmd( int objc, Tcl_Obj *const objv[]) { - const char *fileName; Tcl_DString ds; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "name"); return TCL_ERROR; } - fileName = Tcl_TranslateFileName(interp, TclGetString(objv[1]), &ds); - if (fileName == NULL) { + if (Tcl_TranslateFileName(interp, TclGetString(objv[1]), &ds) == NULL) { return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewStringObj(fileName, - Tcl_DStringLength(&ds))); - Tcl_DStringFree(&ds); + Tcl_SetObjResult(interp, TclDStringToObj(&ds)); return TCL_OK; } diff --git a/generic/tclFileName.c b/generic/tclFileName.c index b6b89dd..5048308 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -445,8 +445,7 @@ TclpGetNativePathType( if ((rootEnd != path) && (driveNameLengthPtr != NULL)) { *driveNameLengthPtr = rootEnd - path; if (driveNameRef != NULL) { - *driveNameRef = Tcl_NewStringObj(Tcl_DStringValue(&ds), - Tcl_DStringLength(&ds)); + *driveNameRef = TclDStringToObj(&ds); Tcl_IncrRefCount(*driveNameRef); } } @@ -724,8 +723,7 @@ SplitWinPath( */ if (p != path) { - Tcl_ListObjAppendElement(NULL, result, Tcl_NewStringObj( - Tcl_DStringValue(&buf), Tcl_DStringLength(&buf))); + Tcl_ListObjAppendElement(NULL, result, TclDStringToObj(&buf)); } Tcl_DStringFree(&buf); @@ -1751,14 +1749,12 @@ TclGlob( if (head != Tcl_DStringValue(&buffer)) { Tcl_DStringAppend(&buffer, head, -1); } - pathPrefix = Tcl_NewStringObj(Tcl_DStringValue(&buffer), - Tcl_DStringLength(&buffer)); + pathPrefix = TclDStringToObj(&buffer); Tcl_IncrRefCount(pathPrefix); globFlags |= TCL_GLOBMODE_DIR; if (c != '\0') { tail++; } - Tcl_DStringFree(&buffer); } else { tail = pattern; } @@ -2423,8 +2419,7 @@ DoGlob( */ if (pathPtr == NULL) { - joinedPtr = Tcl_NewStringObj(Tcl_DStringValue(&append), - Tcl_DStringLength(&append)); + joinedPtr = TclDStringToObj(&append); } else if (flags) { joinedPtr = TclNewFSPathObj(pathPtr, Tcl_DStringValue(&append), Tcl_DStringLength(&append)); diff --git a/generic/tclInt.h b/generic/tclInt.h index 08b3f70..9068dfb 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2920,6 +2920,7 @@ MODULE_SCOPE void TclCreateLateExitHandler(Tcl_ExitProc *proc, ClientData clientData); MODULE_SCOPE void TclDeleteLateExitHandler(Tcl_ExitProc *proc, ClientData clientData); +MODULE_SCOPE Tcl_Obj * TclDStringToObj(Tcl_DString *dsPtr); MODULE_SCOPE void TclFinalizeAllocSubsystem(void); MODULE_SCOPE void TclFinalizeAsync(void); MODULE_SCOPE void TclFinalizeDoubleConversion(void); diff --git a/generic/tclMain.c b/generic/tclMain.c index 373e3f6..88b4e51 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -53,20 +53,23 @@ #endif /* - * Further on, in UNICODE mode, we need to use Tcl_NewUnicodeObj, - * while otherwise NewNativeObj is needed (which provides proper - * conversion from native encoding to UTF-8). + * Further on, in UNICODE mode we just use Tcl_NewUnicodeObj, otherwise + * NewNativeObj is needed (which provides proper conversion from native + * encoding to UTF-8). */ + #ifdef UNICODE # define NewNativeObj Tcl_NewUnicodeObj #else /* !UNICODE */ - static Tcl_Obj *NewNativeObj(char *string, int length) { - Tcl_Obj *obj; - Tcl_DString ds; - Tcl_ExternalToUtfDString(NULL, string, length, &ds); - obj = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); - return obj; +static inline Tcl_Obj * +NewNativeObj( + char *string, + int length) +{ + Tcl_DString ds; + + Tcl_ExternalToUtfDString(NULL, string, length, &ds); + return TclDStringToObj(&ds); } #endif /* !UNICODE */ diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index ba07808..4f86755 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2373,7 +2373,6 @@ SetFsPathFromAny( */ if (name[0] == '~') { - char *expandedUser; Tcl_DString temp; int split; char separator = '/'; @@ -2442,8 +2441,7 @@ SetFsPathFromAny( } } - expandedUser = Tcl_DStringValue(&temp); - transPtr = Tcl_NewStringObj(expandedUser, Tcl_DStringLength(&temp)); + transPtr = TclDStringToObj(&temp); if (split != len) { /* @@ -2488,7 +2486,6 @@ SetFsPathFromAny( transPtr = joined; } } - Tcl_DStringFree(&temp); } else { transPtr = TclJoinPath(1, &pathPtr); } diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index 5c5af7b..53d7153 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -947,10 +947,8 @@ CompileRegexp( */ if (TclReToGlob(NULL, string, length, &stringBuf, &exact) == TCL_OK) { - regexpPtr->globObjPtr = Tcl_NewStringObj(Tcl_DStringValue(&stringBuf), - Tcl_DStringLength(&stringBuf)); + regexpPtr->globObjPtr = TclDStringToObj(&stringBuf); Tcl_IncrRefCount(regexpPtr->globObjPtr); - Tcl_DStringFree(&stringBuf); } else { regexpPtr->globObjPtr = NULL; } diff --git a/generic/tclUtil.c b/generic/tclUtil.c index a1c1996..d5a3b94 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2715,6 +2715,64 @@ Tcl_DStringGetResult( /* *---------------------------------------------------------------------- * + * TclDStringToObj -- + * + * This function moves a dynamic string's contents to a new Tcl_Obj. Be + * aware that this function does *not* check that the encoding of the + * contents of the dynamic string is correct; this is the caller's + * responsibility to enforce. + * + * Results: + * The newly-allocated untyped (i.e., typePtr==NULL) Tcl_Obj with a + * reference count of zero. + * + * Side effects: + * The string is "moved" to the object. dsPtr is reinitialized to an + * empty string; it does not need to be Tcl_DStringFree'd after this if + * not used further. + * + *---------------------------------------------------------------------- + */ + +Tcl_Obj * +TclDStringToObj( + Tcl_DString *dsPtr) +{ + Tcl_Obj *result; + + if (dsPtr->length == 0) { + TclNewObj(result); + } else if (dsPtr->string == dsPtr->staticSpace) { + /* + * Static buffer, so must copy. + */ + + TclNewStringObj(result, dsPtr->string, dsPtr->length); + } else { + /* + * Dynamic buffer, so transfer ownership and reset. + */ + + TclNewObj(result); + result->bytes = dsPtr->string; + result->length = dsPtr->length; + } + + /* + * Re-establish the DString as empty with no buffer allocated. + */ + + dsPtr->string = dsPtr->staticSpace; + dsPtr->spaceAvl = TCL_DSTRING_STATIC_SIZE; + dsPtr->length = 0; + dsPtr->staticSpace[0] = '\0'; + + return result; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_DStringStartSublist -- * * This function adds the necessary information to a dynamic string diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 341f8e0..3673833 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -399,9 +399,7 @@ ExtractHeader( Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->comment, -1, &tmp); - SetValue(dictObj, "comment", Tcl_NewStringObj(Tcl_DStringValue(&tmp), - Tcl_DStringLength(&tmp))); - Tcl_DStringFree(&tmp); + SetValue(dictObj, "comment", TclDStringToObj(&tmp)); } SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc)); if (headerPtr->name != Z_NULL) { @@ -418,9 +416,7 @@ ExtractHeader( Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->name, -1, &tmp); - SetValue(dictObj, "filename", Tcl_NewStringObj(Tcl_DStringValue(&tmp), - Tcl_DStringLength(&tmp))); - Tcl_DStringFree(&tmp); + SetValue(dictObj, "filename", TclDStringToObj(&tmp)); } if (headerPtr->os != 255) { SetValue(dictObj, "os", Tcl_NewIntObj(headerPtr->os)); diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index e3d9022..fce071f 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -1387,11 +1387,9 @@ GetOwnerAttribute( *attributePtrPtr = Tcl_NewIntObj((int) statBuf.st_uid); } else { Tcl_DString ds; - const char *utf; - utf = Tcl_ExternalToUtfDString(NULL, pwPtr->pw_name, -1, &ds); - *attributePtrPtr = Tcl_NewStringObj(utf, Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); + (void) Tcl_ExternalToUtfDString(NULL, pwPtr->pw_name, -1, &ds); + *attributePtrPtr = TclDStringToObj(&ds); } return TCL_OK; } diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 05c8058..0b8aaf9 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1002,12 +1002,8 @@ TclpObjLink( } Tcl_ExternalToUtfDString(NULL, link, length, &ds); - linkPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), - Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); - if (linkPtr != NULL) { - Tcl_IncrRefCount(linkPtr); - } + linkPtr = TclDStringToObj(&ds); + Tcl_IncrRefCount(linkPtr); return linkPtr; } } @@ -1069,19 +1065,9 @@ TclpNativeToNormalized( ClientData clientData) { Tcl_DString ds; - Tcl_Obj *objPtr; - int len; - - const char *copy; - Tcl_ExternalToUtfDString(NULL, (const char*)clientData, -1, &ds); - - copy = Tcl_DStringValue(&ds); - len = Tcl_DStringLength(&ds); - - objPtr = Tcl_NewStringObj(copy,len); - Tcl_DStringFree(&ds); - return objPtr; + Tcl_ExternalToUtfDString(NULL, (const char *) clientData, -1, &ds); + return TclDStringToObj(&ds); } /* diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 8f872d5..bc1b0e7 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -454,8 +454,7 @@ TclpInitLibraryPath( * If TCL_LIBRARY is set, search there. */ - objPtr = Tcl_NewStringObj(str, -1); - Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); + Tcl_ListObjAppendElement(NULL, pathPtr, Tcl_NewStringObj(str, -1)); Tcl_SplitPath(str, &pathc, &pathv); if ((pathc > 0) && (strcasecmp(installLib + 4, pathv[pathc-1]) != 0)) { @@ -469,9 +468,7 @@ TclpInitLibraryPath( pathv[pathc - 1] = installLib + 4; str = Tcl_JoinPath(pathc, pathv, &ds); - objPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&ds)); - Tcl_ListObjAppendElement(NULL, pathPtr, objPtr); - Tcl_DStringFree(&ds); + Tcl_ListObjAppendElement(NULL, pathPtr, TclDStringToObj(&ds)); } ckfree(pathv); } diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index aa0d665..9d0131e 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1011,13 +1011,12 @@ TclpObjRemoveDirectory( } if (ret != TCL_OK) { - int len = Tcl_DStringLength(&ds); - if (len > 0) { + if (Tcl_DStringLength(&ds) > 0) { if (normPtr != NULL && !strcmp(Tcl_DStringValue(&ds), TclGetString(normPtr))) { *errorPtr = pathPtr; } else { - *errorPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), -1); + *errorPtr = TclDStringToObj(&ds); } Tcl_IncrRefCount(*errorPtr); } @@ -1762,6 +1761,7 @@ ConvertFileNameFormat( Tcl_DStringInit(&dsTemp); Tcl_WinTCharToUtf(nativeName, -1, &dsTemp); + Tcl_DStringFree(&ds); /* * Deal with issues of tildes being absolute. @@ -1771,13 +1771,11 @@ ConvertFileNameFormat( TclNewLiteralStringObj(tempPath, "./"); Tcl_AppendToObj(tempPath, Tcl_DStringValue(&dsTemp), Tcl_DStringLength(&dsTemp)); + Tcl_DStringFree(&dsTemp); } else { - tempPath = Tcl_NewStringObj(Tcl_DStringValue(&dsTemp), - Tcl_DStringLength(&dsTemp)); + tempPath = TclDStringToObj(&dsTemp); } Tcl_ListObjReplace(NULL, splitPath, i, 1, 1, &tempPath); - Tcl_DStringFree(&ds); - Tcl_DStringFree(&dsTemp); FindClose(handle); } } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index dcc05bb..2cc14ec 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -2350,13 +2350,9 @@ TclpFilesystemPathType( return NULL; } else { Tcl_DString ds; - Tcl_Obj *objPtr; Tcl_WinTCharToUtf(volType, -1, &ds); - objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), - Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); - return objPtr; + return TclDStringToObj(&ds); } #undef VOL_BUF_SIZE } diff --git a/win/tclWinInit.c b/win/tclWinInit.c index fb53685..3bfff63 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -299,9 +299,8 @@ AppendEnvironment( pathv[pathc - 1] = shortlib; Tcl_DStringInit(&ds); - str = Tcl_JoinPath(pathc, pathv, &ds); - objPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); + (void) Tcl_JoinPath(pathc, pathv, &ds); + objPtr = TclDStringToObj(&ds); } else { objPtr = Tcl_NewStringObj(buf, -1); } -- cgit v0.12 From 1de31d745e8ee5370417e15a8784bc72ac4f54dd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Apr 2012 10:43:30 +0000 Subject: fix crash on Mac OSX --- generic/tclStubInit.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 8a85919..787fd4a 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -221,9 +221,6 @@ Tcl_WinTCharToUtf( # define TclWinFlushDirtyChannels 0 # define TclWinResetInterfaces 0 # define TclpGetPid 0 -# define TclMacOSXGetFileAttribute 0 /* Only implemented in Tcl >= 8.5 */ -# define TclMacOSXMatchType 0 /* Only implemented in Tcl >= 8.5 */ -# define TclMacOSXNotifierAddRunLoopMode 0 /* Only implemented in Tcl >= 8.5 */ # ifndef MAC_OSX_TCL # define Tcl_MacOSXOpenBundleResources 0 # define Tcl_MacOSXOpenVersionedBundleResources 0 -- cgit v0.12 From 9d2e439a664858bfbe32eef058ab965b1e43ce4b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Apr 2012 12:59:43 +0000 Subject: fix Linux build ;-( --- generic/tclStubInit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 787fd4a..7ce50ba 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -222,6 +222,9 @@ Tcl_WinTCharToUtf( # define TclWinResetInterfaces 0 # define TclpGetPid 0 # ifndef MAC_OSX_TCL +# define TclMacOSXMatchType 0 +# define TclMacOSXNotifierAddRunLoopMode 0 +# define TclMacOSXGetFileAttribute 0 # define Tcl_MacOSXOpenBundleResources 0 # define Tcl_MacOSXOpenVersionedBundleResources 0 # endif -- cgit v0.12 From f9c3c819472813905c28f23456d1e94d8a167aa1 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 26 Apr 2012 13:21:01 +0000 Subject: Repair more build breakage. --- unix/tclUnixFile.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index c187e0e..b4a1012 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -43,13 +43,6 @@ TclpFindExecutable( int length; char buf[PATH_MAX * TCL_UTF_MAX + 1]; char name[PATH_MAX * TCL_UTF_MAX + 1]; -#else - const char *name, *p; - Tcl_StatBuf statBuf; - Tcl_DString buffer, nameString, cwd, utfName; -#endif - -#ifdef __CYGWIN__ /* Make some symbols available without including */ # define CP_UTF8 65001 @@ -69,6 +62,11 @@ TclpFindExecutable( TclSetObjNameOfExecutable( Tcl_NewStringObj(name, length), Tcl_GetEncoding(NULL, NULL)); #else + const char *name, *p; + Tcl_StatBuf statBuf; + Tcl_DString buffer, nameString, cwd, utfName; + Tcl_Encoding encoding; + if (argv0 == NULL) { return; } -- cgit v0.12