From 90b55a0053849e5a6c0483f716de14cb4639ce08 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 22 Mar 2012 16:02:48 +0000 Subject: many more cygwin functions present --- generic/tclInt.decls | 198 +++++++++++++++------------ generic/tclIntPlatDecls.h | 341 ++++++++++++++++++++++++++-------------------- generic/tclStubInit.c | 120 +++++++++++++--- 3 files changed, 412 insertions(+), 247 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 269cd81..3d84cb2 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. library tcl - + # Define the unsupported generic interfaces. interface tclInt @@ -37,7 +37,7 @@ declare 3 generic { void TclAllocateFreeObjects(void) } # Replaced by TclpChdir in 8.1: -# declare 4 generic { +# declare 4 generic { # int TclChdir(Tcl_Interp *interp, char *dirName) # } declare 5 {unix win} { @@ -63,7 +63,7 @@ declare 9 {unix win} { TclFile *errFilePtr) } declare 10 generic { - int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr, + int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr, CONST char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr) } @@ -109,7 +109,7 @@ declare 22 generic { int *sizePtr, int *bracePtr) } declare 23 generic { - Proc * TclFindProc(Interp *iPtr, CONST char *procName) + Proc *TclFindProc(Interp *iPtr, CONST char *procName) } declare 24 generic { int TclFormatInt(char *buffer, long n) @@ -118,8 +118,8 @@ declare 25 generic { void TclFreePackageInfo(Interp *iPtr) } # Removed in 8.1: -# declare 26 generic { -# char * TclGetCwd(Tcl_Interp *interp) +# declare 26 generic { +# char *TclGetCwd(Tcl_Interp *interp) # } declare 27 generic { int TclGetDate(char *p, Tcl_WideInt now, long zone, @@ -130,15 +130,15 @@ declare 28 generic { } # Removed in 8.4b2: #declare 29 generic { -# Tcl_Obj * TclGetElementOfIndexedArray(Tcl_Interp *interp, +# Tcl_Obj *TclGetElementOfIndexedArray(Tcl_Interp *interp, # int localIndex, Tcl_Obj *elemPtr, int flags) #} -# Replaced by char * TclGetEnv(CONST char *name, Tcl_DString *valuePtr) in 8.1: +# Replaced by char *TclGetEnv(CONST char *name, Tcl_DString *valuePtr) in 8.1: # declare 30 generic { -# char * TclGetEnv(CONST char *name) +# char *TclGetEnv(CONST char *name) # } declare 31 generic { - char * TclGetExtension(char *name) + char *TclGetExtension(char *name) } declare 32 generic { int TclGetFrame(Tcl_Interp *interp, CONST char *str, @@ -153,7 +153,7 @@ declare 34 generic { } # Removed in 8.4b2: #declare 35 generic { -# Tcl_Obj * TclGetIndexedScalar(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclGetIndexedScalar(Tcl_Interp *interp, int localIndex, # int flags) #} declare 36 generic { @@ -178,7 +178,7 @@ declare 41 generic { Tcl_Command TclGetOriginalCommand(Tcl_Command command) } declare 42 generic { - char * TclpGetUserHome(CONST char *name, Tcl_DString *bufferPtr) + char *TclpGetUserHome(CONST char *name, Tcl_DString *bufferPtr) } declare 43 generic { int TclGlobalInvoke(Tcl_Interp *interp, int argc, CONST84 char **argv, int flags) @@ -194,16 +194,16 @@ declare 46 generic { } # Removed in 8.4b2: #declare 47 generic { -# Tcl_Obj * TclIncrElementOfIndexedArray(Tcl_Interp *interp, +# Tcl_Obj *TclIncrElementOfIndexedArray(Tcl_Interp *interp, # int localIndex, Tcl_Obj *elemPtr, long incrAmount) #} # Removed in 8.4b2: #declare 48 generic { -# Tcl_Obj * TclIncrIndexedScalar(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclIncrIndexedScalar(Tcl_Interp *interp, int localIndex, # long incrAmount) #} declare 49 generic { - Tcl_Obj * TclIncrVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, + Tcl_Obj *TclIncrVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, long incrAmount, int part1NotParsed) } declare 50 generic { @@ -225,7 +225,7 @@ declare 54 generic { int objc, Tcl_Obj *CONST objv[]) } declare 55 generic { - Proc * TclIsProc(Command *cmdPtr) + Proc *TclIsProc(Command *cmdPtr) } # Replaced with TclpLoadFile in 8.1: # declare 56 generic { @@ -238,7 +238,7 @@ declare 55 generic { # int TclLooksLikeInt(char *p) # } declare 58 generic { - Var * TclLookupVar(Tcl_Interp *interp, CONST char *part1, CONST char *part2, + Var *TclLookupVar(Tcl_Interp *interp, CONST char *part1, CONST char *part2, int flags, CONST char *msg, int createPart1, int createPart2, Var **arrayPtrPtr) } @@ -251,7 +251,7 @@ declare 60 generic { int TclNeedSpace(CONST char *start, CONST char *end) } declare 61 generic { - Tcl_Obj * TclNewProcBodyObj(Proc *procPtr) + Tcl_Obj *TclNewProcBodyObj(Proc *procPtr) } declare 62 generic { int TclObjCommandComplete(Tcl_Obj *cmdPtr) @@ -279,7 +279,7 @@ declare 67 generic { # int TclpAccess(CONST char *path, int mode) #} declare 69 generic { - char * TclpAlloc(unsigned int size) + char *TclpAlloc(unsigned int size) } #declare 70 generic { # int TclpCopyFile(CONST char *source, CONST char *dest) @@ -308,7 +308,6 @@ declare 76 generic { declare 77 generic { void TclpGetTime(Tcl_Time *time) } - declare 78 generic { int TclpGetTimeZone(Tcl_WideInt time) } @@ -322,7 +321,7 @@ declare 78 generic { # char *modeString, int permissions) #} declare 81 generic { - char * TclpRealloc(char *ptr, unsigned int size) + char *TclpRealloc(char *ptr, unsigned int size) } #declare 82 generic { # int TclpRemoveDirectory(CONST char *path, int recursive, @@ -348,7 +347,7 @@ declare 81 generic { # void TclPlatformInit(Tcl_Interp *interp) # } declare 88 generic { - char * TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp, + char *TclPrecTraceProc(ClientData clientData, Tcl_Interp *interp, CONST char *name1, CONST char *name2, int flags) } declare 89 generic { @@ -389,16 +388,16 @@ declare 98 generic { } # Removed in 8.4b2: #declare 99 generic { -# Tcl_Obj * TclSetElementOfIndexedArray(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclSetElementOfIndexedArray(Tcl_Interp *interp, int localIndex, # Tcl_Obj *elemPtr, Tcl_Obj *objPtr, int flags) #} # Removed in 8.4b2: #declare 100 generic { -# Tcl_Obj * TclSetIndexedScalar(Tcl_Interp *interp, int localIndex, +# Tcl_Obj *TclSetIndexedScalar(Tcl_Interp *interp, int localIndex, # Tcl_Obj *objPtr, int flags) #} declare 101 generic { - char * TclSetPreInitScript(char *string) + char *TclSetPreInitScript(char *string) } declare 102 generic { void TclSetupEnv(Tcl_Interp *interp) @@ -428,7 +427,7 @@ declare 109 generic { } # Removed in 8.1: # declare 110 generic { -# char * TclWordEnd(char *start, char *lastChar, int nested, int *semiPtr) +# char *TclWordEnd(char *start, char *lastChar, int nested, int *semiPtr) # } # Procedures used in conjunction with Tcl namespaces. They are @@ -444,7 +443,7 @@ declare 112 generic { Tcl_Obj *objPtr) } declare 113 generic { - Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_CreateNamespace(Tcl_Interp *interp, CONST char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc) } declare 114 generic { @@ -459,7 +458,7 @@ declare 116 generic { Tcl_Namespace *contextNsPtr, int flags) } declare 117 generic { - Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, + Tcl_Namespace *Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, Tcl_Namespace *contextNsPtr, int flags) } declare 118 generic { @@ -486,10 +485,10 @@ declare 123 generic { Tcl_Obj *objPtr) } declare 124 generic { - Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp) + Tcl_Namespace *Tcl_GetCurrentNamespace(Tcl_Interp *interp) } declare 125 generic { - Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp) + Tcl_Namespace *Tcl_GetGlobalNamespace(Tcl_Interp *interp) } declare 126 generic { void Tcl_GetVariableFullName(Tcl_Interp *interp, Tcl_Var variable, @@ -500,12 +499,12 @@ declare 127 generic { CONST char *pattern, int allowOverwrite) } declare 128 generic { - void Tcl_PopCallFrame(Tcl_Interp* interp) + void Tcl_PopCallFrame(Tcl_Interp *interp) } declare 129 generic { - int Tcl_PushCallFrame(Tcl_Interp* interp, Tcl_CallFrame *framePtr, + int Tcl_PushCallFrame(Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame) -} +} declare 130 generic { int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, CONST char *name) } @@ -518,7 +517,7 @@ declare 132 generic { int TclpHasSockets(Tcl_Interp *interp) } declare 133 generic { - struct tm * TclpGetDate(TclpTime_t time, int useGMT) + struct tm *TclpGetDate(TclpTime_t time, int useGMT) } declare 134 generic { size_t TclpStrftime(char *s, size_t maxsize, CONST char *format, @@ -534,7 +533,7 @@ declare 135 generic { # int TclpChdir(CONST char *dirName) #} declare 138 generic { - CONST84_RETURN char * TclGetEnv(CONST char *name, Tcl_DString *valuePtr) + CONST84_RETURN char *TclGetEnv(CONST char *name, Tcl_DString *valuePtr) } #declare 139 generic { # int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1, @@ -563,19 +562,15 @@ declare 144 generic { declare 145 generic { struct AuxDataType *TclGetAuxDataType(char *typeName) } - declare 146 generic { TclHandle TclHandleCreate(VOID *ptr) } - declare 147 generic { void TclHandleFree(TclHandle handle) } - declare 148 generic { TclHandle TclHandlePreserve(TclHandle handle) } - declare 149 generic { void TclHandleRelease(TclHandle handle) } @@ -589,7 +584,6 @@ declare 151 generic { void TclRegExpRangeUniChar(Tcl_RegExp re, int index, int *startPtr, int *endPtr) } - declare 152 generic { void TclSetLibraryPath(Tcl_Obj *pathPtr) } @@ -608,11 +602,11 @@ declare 153 generic { #} declare 156 generic { - void TclRegError (Tcl_Interp *interp, CONST char *msg, + void TclRegError(Tcl_Interp *interp, CONST char *msg, int status) } declare 157 generic { - Var * TclVarTraceExists (Tcl_Interp *interp, CONST char *varName) + Var *TclVarTraceExists(Tcl_Interp *interp, CONST char *varName) } declare 158 generic { void TclSetStartupScriptFileName(CONST char *filename) @@ -622,7 +616,8 @@ declare 159 generic { } #declare 160 generic { # int TclpMatchFilesTypes(Tcl_Interp *interp, char *separators, -# Tcl_DString *dirPtr, char *pattern, char *tail, GlobTypeData *types) +# Tcl_DString *dirPtr, char *pattern, char *tail, +# GlobTypeData *types) #} # new in 8.3.2/8.4a2 @@ -634,7 +629,7 @@ declare 162 generic { void TclChannelEventScriptInvoker(ClientData clientData, int flags) } -# ALERT: The result of 'TclGetInstructionTable' is actually an +# ALERT: The result of 'TclGetInstructionTable' is actually a # "InstructionDesc*" but we do not want to describe this structure in # "tclInt.h". It is described in "tclCompile.h". Use a cast to the # correct type when calling this procedure. @@ -648,7 +643,7 @@ declare 163 generic { # "tclInt.h". It is described in "tclCompile.h". declare 164 generic { - void TclExpandCodeArray(VOID *envPtr) + void TclExpandCodeArray(VOID *envPtr) } # These functions are vfs aware, but are generally only useful internally. @@ -658,7 +653,7 @@ declare 165 generic { # New function due to TIP #33 declare 166 generic { - int TclListObjSetElement(Tcl_Interp *interp, Tcl_Obj *listPtr, + int TclListObjSetElement(Tcl_Interp *interp, Tcl_Obj *listPtr, int index, Tcl_Obj *valuePtr) } @@ -674,16 +669,15 @@ declare 169 generic { int TclpUtfNcmp2(CONST char *s1, CONST char *s2, unsigned long n) } declare 170 generic { - int TclCheckInterpTraces (Tcl_Interp *interp, CONST char *command, int numChars, \ - Command *cmdPtr, int result, int traceFlags, int objc, \ - Tcl_Obj *CONST objv[]) + int TclCheckInterpTraces(Tcl_Interp *interp, CONST char *command, + int numChars, Command *cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]) } declare 171 generic { - int TclCheckExecutionTraces (Tcl_Interp *interp, CONST char *command, int numChars, \ - Command *cmdPtr, int result, int traceFlags, int objc, \ - Tcl_Obj *CONST objv[]) + int TclCheckExecutionTraces (Tcl_Interp *interp, CONST char *command, + int numChars, Command *cmdPtr, int result, int traceFlags, + int objc, Tcl_Obj *CONST objv[]) } - declare 172 generic { int TclInThreadExit(void) } @@ -691,7 +685,7 @@ declare 172 generic { # added for 8.4.2 declare 173 generic { - int TclUniCharMatch (CONST Tcl_UniChar *string, int strLen, \ + int TclUniCharMatch(CONST Tcl_UniChar *string, int strLen, \ CONST Tcl_UniChar *pattern, int ptnLen, int nocase) } @@ -719,13 +713,13 @@ interface tclIntPlat # Mac specific internals declare 0 mac { - VOID * TclpSysAlloc(long size, int isBin) + VOID *TclpSysAlloc(long size, int isBin) } declare 1 mac { void TclpSysFree(VOID *ptr) } declare 2 mac { - VOID * TclpSysRealloc(VOID *cp, unsigned int size) + VOID *TclpSysRealloc(VOID *cp, unsigned int size) } declare 3 mac { void TclpExit(int status) @@ -809,14 +803,14 @@ declare 22 mac { int TclMacCreateEnv(void) } declare 23 mac { - FILE * TclMacFOpenHack(CONST char *path, CONST char *mode) + FILE *TclMacFOpenHack(CONST char *path, CONST char *mode) } # Replaced in 8.1 by TclpReadLink: # declare 24 mac { # int TclMacReadlink(char *path, char *buf, int size) # } declare 24 mac { - char * TclpGetTZName(int isdst) + char *TclpGetTZName(int isdst) } declare 25 mac { int TclMacChmod(CONST char *path, int mode) @@ -826,8 +820,8 @@ declare 26 mac { int FSpLLocationFromPath(int length, CONST char *path, FSSpecPtr theSpec) } -############################ -# Windows specific internals +################################ +# Windows specific functions declare 0 win { void TclWinConvertError(DWORD errCode) @@ -836,12 +830,12 @@ declare 1 win { void TclWinConvertWSAError(DWORD errCode) } declare 2 win { - struct servent * TclWinGetServByName(CONST char *nm, + struct servent *TclWinGetServByName(CONST char *nm, CONST char *proto) } declare 3 win { int TclWinGetSockOpt(SOCKET s, int level, int optname, - char FAR * optval, int FAR *optlen) + char FAR *optval, int FAR *optlen) } declare 4 win { HINSTANCE TclWinGetTclInstance(void) @@ -855,7 +849,7 @@ declare 6 win { } declare 7 win { int TclWinSetSockOpt(SOCKET s, int level, int optname, - CONST char FAR * optval, int optlen) + CONST char FAR *optval, int optlen) } declare 8 win { unsigned long TclpGetPid(Tcl_Pid pid) @@ -893,7 +887,7 @@ declare 15 win { # TclFile TclpCreateTempFile(char *contents, Tcl_DString *namePtr) # } # declare 17 win { -# char * TclpGetTZName(void) +# char *TclpGetTZName(void) # } declare 18 win { TclFile TclpMakeFile(Tcl_Channel channel, int direction) @@ -915,10 +909,10 @@ declare 22 win { TclFile TclpCreateTempFile(CONST char *contents) } declare 23 win { - char * TclpGetTZName(int isdst) + char *TclpGetTZName(int isdst) } declare 24 win { - char * TclWinNoBackslash(char *path) + char *TclWinNoBackslash(char *path) } declare 25 win { TclPlatformType *TclWinGetPlatform(void) @@ -930,7 +924,7 @@ declare 26 win { # Added in Tcl 8.3.3 / 8.4 declare 27 win { - void TclWinFlushDirtyChannels (void) + void TclWinFlushDirtyChannels(void) } # Added in 8.4.2 @@ -938,13 +932,12 @@ declare 27 win { declare 28 win { void TclWinResetInterfaces(void) } - declare 29 win { - int TclWinCPUID( unsigned int index, unsigned int *regs ) + int TclWinCPUID(unsigned int index, unsigned int *regs) } -######################### -# Unix specific internals +################################ +# Unix specific functions # Pipe channel functions @@ -961,20 +954,23 @@ declare 2 unix { declare 3 unix { int TclpCreatePipe(TclFile *readPipe, TclFile *writePipe) } +# On non-cygwin, this is actually a reference to TclpCreateProcess declare 4 unix { - int TclpCreateProcess(Tcl_Interp *interp, int argc, CONST char **argv, - TclFile inputFile, TclFile outputFile, TclFile errorFile, - Tcl_Pid *pidPtr) + int TclWinGetTclInstance(void) } # Signature changed in 8.1: # declare 5 unix { # TclFile TclpCreateTempFile(char *contents, Tcl_DString *namePtr) # } + +# On non-cygwin, this is actually a reference to TclpMakeFile declare 6 unix { - TclFile TclpMakeFile(Tcl_Channel channel, int direction) + unsigned short TclWinNToHS(unsigned short ns) } +# On non-cygwin, this is actually a reference to TclpOpenFile declare 7 unix { - TclFile TclpOpenFile(CONST char *fname, int mode) + int TclWinSetSockOpt(int s, int level, int optname, + CONST char *optval, int optlen) } declare 8 unix { int TclUnixWaitForFile(int fd, int mask, int timeout) @@ -990,28 +986,60 @@ declare 9 unix { # Added in 8.4: declare 10 unix { - Tcl_DirEntry * TclpReaddir(DIR * dir) + Tcl_DirEntry *TclpReaddir(DIR *dir) } - # Slots 11 and 12 are forwarders for functions that were promoted to # generic Stubs - declare 11 unix { - struct tm * TclpLocaltime_unix(TclpTime_t_CONST clock) + struct tm *TclpLocaltime_unix(TclpTime_t_CONST clock) } - declare 12 unix { - struct tm * TclpGmtime_unix(TclpTime_t_CONST clock) + struct tm *TclpGmtime_unix(TclpTime_t_CONST clock) } - declare 13 unix { - char * TclpInetNtoa(struct in_addr addr) + char *TclpInetNtoa(struct in_addr addr) +} +#On cygwin, TclpCreateProcess is here +declare 15 unix { + int TclMacOSXGetFileAttribute(Tcl_Interp *interp, int objIndex, + Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr) +} +#On cygwin, TclpMakeFile is here +declare 18 unix { + int TclMacOSXMatchType(Tcl_Interp *interp, CONST char *pathName, + CONST char *fileName, Tcl_StatBuf *statBufPtr, + Tcl_GlobTypeData *types) +} +#On cygwin, TclpOpenFile is here +declare 19 unix { + void TclMacOSXNotifierAddRunLoopMode(CONST void *runLoopMode) +} +declare 20 unix { + void TclWinAddProcess(void *hProcess, unsigned long id) } - declare 22 unix { TclFile TclpCreateTempFile(CONST char *contents) } +declare 23 unix { + char *TclpGetTZName(int isdst) +} +declare 24 unix { + char *TclWinNoBackslash(char *path) +} +declare 26 unix { + void TclWinSetInterfaces(int wide) +} +declare 27 unix { + void TclWinFlushDirtyChannels(void) +} +declare 28 unix { + void TclWinResetInterfaces(void) +} declare 29 unix { int TclWinCPUID(unsigned int index, unsigned int *regs) } + +# Local Variables: +# mode: tcl +# End: diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index ec474d4..3c967b0 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -13,6 +13,14 @@ #ifndef _TCLINTPLATDECLS #define _TCLINTPLATDECLS +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)); + /* * WARNING: This file is automatically generated by the tools/genStubs.tcl * script. Any modifications to the function declarations below should be made @@ -27,37 +35,33 @@ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ /* 0 */ -EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 1 */ EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); /* 2 */ EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_(( - TclFile readFile, TclFile writeFile, - TclFile errorFile, int numPids, - Tcl_Pid * pidPtr)); + TclFile readFile, TclFile writeFile, + TclFile errorFile, int numPids, + Tcl_Pid *pidPtr)); /* 3 */ -EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe, - TclFile * writePipe)); +EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, + TclFile *writePipe)); /* 4 */ -EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp, - int argc, CONST char ** argv, - TclFile inputFile, TclFile outputFile, - TclFile errorFile, Tcl_Pid * pidPtr)); +EXTERN int TclWinGetTclInstance _ANSI_ARGS_((void)); /* Slot 5 is reserved */ /* 6 */ -EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, - int direction)); +EXTERN unsigned short TclWinNToHS _ANSI_ARGS_((unsigned short ns)); /* 7 */ -EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char * fname, - int mode)); +EXTERN int TclWinSetSockOpt _ANSI_ARGS_((int s, int level, + int optname, CONST char *optval, int optlen)); /* 8 */ -EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask, +EXTERN int TclUnixWaitForFile _ANSI_ARGS_((int fd, int mask, int timeout)); /* 9 */ EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* 10 */ -EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR * dir)); +EXTERN Tcl_DirEntry * TclpReaddir _ANSI_ARGS_((DIR *dir)); /* 11 */ EXTERN struct tm * TclpLocaltime_unix _ANSI_ARGS_(( TclpTime_t_CONST clock)); @@ -66,25 +70,40 @@ EXTERN struct tm * TclpGmtime_unix _ANSI_ARGS_((TclpTime_t_CONST clock)); /* 13 */ EXTERN char * TclpInetNtoa _ANSI_ARGS_((struct in_addr addr)); /* Slot 14 is reserved */ -/* Slot 15 is reserved */ +/* 15 */ +EXTERN int TclMacOSXGetFileAttribute _ANSI_ARGS_(( + Tcl_Interp *interp, int objIndex, + Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* Slot 16 is reserved */ /* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ +/* 18 */ +EXTERN int TclMacOSXMatchType _ANSI_ARGS_((Tcl_Interp *interp, + CONST char *pathName, CONST char *fileName, + Tcl_StatBuf *statBufPtr, + Tcl_GlobTypeData *types)); +/* 19 */ +EXTERN void TclMacOSXNotifierAddRunLoopMode _ANSI_ARGS_(( + CONST void *runLoopMode)); +/* 20 */ +EXTERN void TclWinAddProcess _ANSI_ARGS_((void *hProcess, + unsigned long id)); /* Slot 21 is reserved */ /* 22 */ -EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_(( - CONST char * contents)); -/* Slot 23 is reserved */ -/* Slot 24 is reserved */ +EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((CONST char *contents)); +/* 23 */ +EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); +/* 24 */ +EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char *path)); /* Slot 25 is reserved */ -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -/* Slot 28 is reserved */ +/* 26 */ +EXTERN void TclWinSetInterfaces _ANSI_ARGS_((int wide)); +/* 27 */ +EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void)); +/* 28 */ +EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void)); /* 29 */ -EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, - unsigned int * regs)); +EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, + unsigned int *regs)); #endif /* UNIX */ #ifdef __WIN32__ /* 0 */ @@ -92,20 +111,20 @@ EXTERN void TclWinConvertError _ANSI_ARGS_((DWORD errCode)); /* 1 */ EXTERN void TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode)); /* 2 */ -EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char * nm, - CONST char * proto)); +EXTERN struct servent * TclWinGetServByName _ANSI_ARGS_((CONST char *nm, + CONST char *proto)); /* 3 */ -EXTERN int TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level, - int optname, char FAR * optval, - int FAR * optlen)); +EXTERN int TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level, + int optname, char FAR *optval, + int FAR *optlen)); /* 4 */ EXTERN HINSTANCE TclWinGetTclInstance _ANSI_ARGS_((void)); /* Slot 5 is reserved */ /* 6 */ EXTERN u_short TclWinNToHS _ANSI_ARGS_((u_short ns)); /* 7 */ -EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level, - int optname, CONST char FAR * optval, +EXTERN int TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level, + int optname, CONST char FAR *optval, int optlen)); /* 8 */ EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); @@ -113,42 +132,41 @@ EXTERN unsigned long TclpGetPid _ANSI_ARGS_((Tcl_Pid pid)); EXTERN int TclWinGetPlatformId _ANSI_ARGS_((void)); /* Slot 10 is reserved */ /* 11 */ -EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp * interp, +EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 12 */ EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); /* 13 */ EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_(( - TclFile readFile, TclFile writeFile, - TclFile errorFile, int numPids, - Tcl_Pid * pidPtr)); + TclFile readFile, TclFile writeFile, + TclFile errorFile, int numPids, + Tcl_Pid *pidPtr)); /* 14 */ -EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile * readPipe, - TclFile * writePipe)); +EXTERN int TclpCreatePipe _ANSI_ARGS_((TclFile *readPipe, + TclFile *writePipe)); /* 15 */ -EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp * interp, - int argc, CONST char ** argv, - TclFile inputFile, TclFile outputFile, - TclFile errorFile, Tcl_Pid * pidPtr)); +EXTERN int TclpCreateProcess _ANSI_ARGS_((Tcl_Interp *interp, + int argc, CONST char **argv, + TclFile inputFile, TclFile outputFile, + TclFile errorFile, Tcl_Pid *pidPtr)); /* Slot 16 is reserved */ /* Slot 17 is reserved */ /* 18 */ -EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, +EXTERN TclFile TclpMakeFile _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 19 */ -EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char * fname, +EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, int mode)); /* 20 */ -EXTERN void TclWinAddProcess _ANSI_ARGS_((HANDLE hProcess, +EXTERN void TclWinAddProcess _ANSI_ARGS_((HANDLE hProcess, DWORD id)); /* Slot 21 is reserved */ /* 22 */ -EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_(( - CONST char * contents)); +EXTERN TclFile TclpCreateTempFile _ANSI_ARGS_((CONST char *contents)); /* 23 */ EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); /* 24 */ -EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char * path)); +EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char *path)); /* 25 */ EXTERN TclPlatformType * TclWinGetPlatform _ANSI_ARGS_((void)); /* 26 */ @@ -158,16 +176,16 @@ EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void)); /* 28 */ EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void)); /* 29 */ -EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, - unsigned int * regs)); +EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, + unsigned int *regs)); #endif /* __WIN32__ */ #ifdef MAC_TCL /* 0 */ EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin)); /* 1 */ -EXTERN void TclpSysFree _ANSI_ARGS_((VOID * ptr)); +EXTERN void TclpSysFree _ANSI_ARGS_((VOID *ptr)); /* 2 */ -EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID * cp, +EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID *cp, unsigned int size)); /* 3 */ EXTERN void TclpExit _ANSI_ARGS_((int status)); @@ -176,28 +194,27 @@ EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec)); /* 5 */ EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec)); /* 6 */ -EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, - OSType folderType, Boolean createFolder, - FSSpec * spec)); +EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, + OSType folderType, Boolean createFolder, + FSSpec *spec)); /* 7 */ -EXTERN void GetGlobalMouseTcl _ANSI_ARGS_((Point * mouse)); +EXTERN void GetGlobalMouseTcl _ANSI_ARGS_((Point *mouse)); /* 8 */ -EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_(( - CONST FSSpec * spec, long * theDirID, - Boolean * isDirectory)); +EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_((CONST FSSpec *spec, + long *theDirID, Boolean *isDirectory)); /* 9 */ EXTERN pascal short FSpOpenResFileCompatTcl _ANSI_ARGS_(( - CONST FSSpec * spec, SignedByte permission)); + CONST FSSpec *spec, SignedByte permission)); /* 10 */ EXTERN pascal void FSpCreateResFileCompatTcl _ANSI_ARGS_(( - CONST FSSpec * spec, OSType creator, + CONST FSSpec *spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 11 */ -EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, - CONST char * path, FSSpecPtr theSpec)); +EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, + CONST char *path, FSSpecPtr theSpec)); /* 12 */ -EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec, - int * length, Handle * fullPath)); +EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec, + int *length, Handle *fullPath)); /* 13 */ EXTERN void TclMacExitHandler _ANSI_ARGS_((void)); /* 14 */ @@ -208,30 +225,29 @@ EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_(( /* 16 */ EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error)); /* 17 */ -EXTERN void TclMacRemoveTimer _ANSI_ARGS_((VOID * timerToken)); +EXTERN void TclMacRemoveTimer _ANSI_ARGS_((VOID *timerToken)); /* 18 */ EXTERN VOID * TclMacStartTimer _ANSI_ARGS_((long ms)); /* 19 */ -EXTERN int TclMacTimerExpired _ANSI_ARGS_((VOID * timerToken)); +EXTERN int TclMacTimerExpired _ANSI_ARGS_((VOID *timerToken)); /* 20 */ EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_(( - short fileRef, Tcl_Obj * tokenPtr, - int insert)); + short fileRef, Tcl_Obj *tokenPtr, int insert)); /* 21 */ EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_(( - char * tokenPtr, Tcl_Obj * resultPtr)); + char *tokenPtr, Tcl_Obj *resultPtr)); /* 22 */ EXTERN int TclMacCreateEnv _ANSI_ARGS_((void)); /* 23 */ -EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char * path, - CONST char * mode)); +EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char *path, + CONST char *mode)); /* 24 */ EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); /* 25 */ -EXTERN int TclMacChmod _ANSI_ARGS_((CONST char * path, int mode)); +EXTERN int TclMacChmod _ANSI_ARGS_((CONST char *path, int mode)); /* 26 */ -EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length, - CONST char * path, FSSpecPtr theSpec)); +EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length, + CONST char *path, FSSpecPtr theSpec)); #endif /* MAC_TCL */ typedef struct TclIntPlatStubs { @@ -239,97 +255,97 @@ typedef struct TclIntPlatStubs { struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 0 */ + void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 0 */ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 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 */ - int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 4 */ + 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 */ + int (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ void *reserved5; - TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 6 */ - TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode)); /* 7 */ + unsigned short (*tclWinNToHS) _ANSI_ARGS_((unsigned short ns)); /* 6 */ + int (*tclWinSetSockOpt) _ANSI_ARGS_((int s, int level, int optname, CONST char *optval, int optlen)); /* 7 */ int (*tclUnixWaitForFile) _ANSI_ARGS_((int fd, int mask, int timeout)); /* 8 */ int (*tclWinGetPlatformId) _ANSI_ARGS_((void)); /* 9 */ - Tcl_DirEntry * (*tclpReaddir) _ANSI_ARGS_((DIR * dir)); /* 10 */ + 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 *reserved14; - void *reserved15; + int (*tclMacOSXGetFileAttribute) _ANSI_ARGS_((Tcl_Interp *interp, int objIndex, Tcl_Obj *fileName, Tcl_Obj **attributePtrPtr)); /* 15 */ void *reserved16; void *reserved17; - void *reserved18; - void *reserved19; - void *reserved20; + int (*tclMacOSXMatchType) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *pathName, CONST char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types)); /* 18 */ + void (*tclMacOSXNotifierAddRunLoopMode) _ANSI_ARGS_((CONST void *runLoopMode)); /* 19 */ + void (*tclWinAddProcess) _ANSI_ARGS_((void *hProcess, unsigned long id)); /* 20 */ void *reserved21; - TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 22 */ - void *reserved23; - void *reserved24; + TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char *contents)); /* 22 */ + char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 23 */ + char * (*tclWinNoBackslash) _ANSI_ARGS_((char *path)); /* 24 */ void *reserved25; - void *reserved26; - void *reserved27; - void *reserved28; - int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int * regs)); /* 29 */ + void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */ + void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ + void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ + int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */ void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode)); /* 1 */ - struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char * nm, CONST char * proto)); /* 2 */ - int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR * optval, int FAR * optlen)); /* 3 */ + struct servent * (*tclWinGetServByName) _ANSI_ARGS_((CONST char *nm, CONST char *proto)); /* 2 */ + int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR *optval, int FAR *optlen)); /* 3 */ HINSTANCE (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ void *reserved5; u_short (*tclWinNToHS) _ANSI_ARGS_((u_short ns)); /* 6 */ - int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char FAR * optval, int optlen)); /* 7 */ + int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, CONST char FAR *optval, int optlen)); /* 7 */ unsigned long (*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 */ + void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 11 */ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 12 */ - Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 13 */ - int (*tclpCreatePipe) _ANSI_ARGS_((TclFile * readPipe, TclFile * writePipe)); /* 14 */ - int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST char ** argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid * pidPtr)); /* 15 */ + Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid *pidPtr)); /* 13 */ + int (*tclpCreatePipe) _ANSI_ARGS_((TclFile *readPipe, TclFile *writePipe)); /* 14 */ + int (*tclpCreateProcess) _ANSI_ARGS_((Tcl_Interp *interp, int argc, CONST char **argv, TclFile inputFile, TclFile outputFile, TclFile errorFile, Tcl_Pid *pidPtr)); /* 15 */ void *reserved16; void *reserved17; TclFile (*tclpMakeFile) _ANSI_ARGS_((Tcl_Channel channel, int direction)); /* 18 */ - TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char * fname, int mode)); /* 19 */ + TclFile (*tclpOpenFile) _ANSI_ARGS_((CONST char *fname, int mode)); /* 19 */ void (*tclWinAddProcess) _ANSI_ARGS_((HANDLE hProcess, DWORD id)); /* 20 */ void *reserved21; - TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char * contents)); /* 22 */ + TclFile (*tclpCreateTempFile) _ANSI_ARGS_((CONST char *contents)); /* 22 */ char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 23 */ - char * (*tclWinNoBackslash) _ANSI_ARGS_((char * path)); /* 24 */ + char * (*tclWinNoBackslash) _ANSI_ARGS_((char *path)); /* 24 */ TclPlatformType * (*tclWinGetPlatform) _ANSI_ARGS_((void)); /* 25 */ void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */ void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ - int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int * regs)); /* 29 */ + int (*tclWinCPUID) _ANSI_ARGS_((unsigned int index, unsigned int *regs)); /* 29 */ #endif /* __WIN32__ */ #ifdef MAC_TCL VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 0 */ - void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr)); /* 1 */ - VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size)); /* 2 */ + void (*tclpSysFree) _ANSI_ARGS_((VOID *ptr)); /* 1 */ + VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID *cp, unsigned int size)); /* 2 */ void (*tclpExit) _ANSI_ARGS_((int status)); /* 3 */ int (*fSpGetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 4 */ int (*fSpSetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 5 */ - OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec * spec)); /* 6 */ - void (*getGlobalMouseTcl) _ANSI_ARGS_((Point * mouse)); /* 7 */ - pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec * spec, long * theDirID, Boolean * isDirectory)); /* 8 */ - pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, SignedByte permission)); /* 9 */ - pascal void (*fSpCreateResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 10 */ - int (*fSpLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 11 */ - OSErr (*fSpPathFromLocation) _ANSI_ARGS_((FSSpecPtr theSpec, int * length, Handle * fullPath)); /* 12 */ + OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec *spec)); /* 6 */ + void (*getGlobalMouseTcl) _ANSI_ARGS_((Point *mouse)); /* 7 */ + pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec *spec, long *theDirID, Boolean *isDirectory)); /* 8 */ + pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec *spec, SignedByte permission)); /* 9 */ + pascal void (*fSpCreateResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec *spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 10 */ + int (*fSpLocationFromPath) _ANSI_ARGS_((int length, CONST char *path, FSSpecPtr theSpec)); /* 11 */ + OSErr (*fSpPathFromLocation) _ANSI_ARGS_((FSSpecPtr theSpec, int *length, Handle *fullPath)); /* 12 */ void (*tclMacExitHandler) _ANSI_ARGS_((void)); /* 13 */ void (*tclMacInitExitToShell) _ANSI_ARGS_((int usePatch)); /* 14 */ OSErr (*tclMacInstallExitToShellPatch) _ANSI_ARGS_((ExitToShellProcPtr newProc)); /* 15 */ int (*tclMacOSErrorToPosixError) _ANSI_ARGS_((int error)); /* 16 */ - void (*tclMacRemoveTimer) _ANSI_ARGS_((VOID * timerToken)); /* 17 */ + void (*tclMacRemoveTimer) _ANSI_ARGS_((VOID *timerToken)); /* 17 */ VOID * (*tclMacStartTimer) _ANSI_ARGS_((long ms)); /* 18 */ - int (*tclMacTimerExpired) _ANSI_ARGS_((VOID * timerToken)); /* 19 */ - int (*tclMacRegisterResourceFork) _ANSI_ARGS_((short fileRef, Tcl_Obj * tokenPtr, int insert)); /* 20 */ - short (*tclMacUnRegisterResourceFork) _ANSI_ARGS_((char * tokenPtr, Tcl_Obj * resultPtr)); /* 21 */ + int (*tclMacTimerExpired) _ANSI_ARGS_((VOID *timerToken)); /* 19 */ + int (*tclMacRegisterResourceFork) _ANSI_ARGS_((short fileRef, Tcl_Obj *tokenPtr, int insert)); /* 20 */ + short (*tclMacUnRegisterResourceFork) _ANSI_ARGS_((char *tokenPtr, Tcl_Obj *resultPtr)); /* 21 */ int (*tclMacCreateEnv) _ANSI_ARGS_((void)); /* 22 */ - FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char * path, CONST char * mode)); /* 23 */ + FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char *path, CONST char *mode)); /* 23 */ char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 24 */ - int (*tclMacChmod) _ANSI_ARGS_((CONST char * path, int mode)); /* 25 */ - int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 26 */ + int (*tclMacChmod) _ANSI_ARGS_((CONST char *path, int mode)); /* 25 */ + int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char *path, FSSpecPtr theSpec)); /* 26 */ #endif /* MAC_TCL */ } TclIntPlatStubs; @@ -364,18 +380,18 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclpCreatePipe \ (tclIntPlatStubsPtr->tclpCreatePipe) /* 3 */ #endif -#ifndef TclpCreateProcess -#define TclpCreateProcess \ - (tclIntPlatStubsPtr->tclpCreateProcess) /* 4 */ +#ifndef TclWinGetTclInstance +#define TclWinGetTclInstance \ + (tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */ #endif /* Slot 5 is reserved */ -#ifndef TclpMakeFile -#define TclpMakeFile \ - (tclIntPlatStubsPtr->tclpMakeFile) /* 6 */ +#ifndef TclWinNToHS +#define TclWinNToHS \ + (tclIntPlatStubsPtr->tclWinNToHS) /* 6 */ #endif -#ifndef TclpOpenFile -#define TclpOpenFile \ - (tclIntPlatStubsPtr->tclpOpenFile) /* 7 */ +#ifndef TclWinSetSockOpt +#define TclWinSetSockOpt \ + (tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */ #endif #ifndef TclUnixWaitForFile #define TclUnixWaitForFile \ @@ -402,23 +418,50 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; (tclIntPlatStubsPtr->tclpInetNtoa) /* 13 */ #endif /* Slot 14 is reserved */ -/* Slot 15 is reserved */ +#ifndef TclMacOSXGetFileAttribute +#define TclMacOSXGetFileAttribute \ + (tclIntPlatStubsPtr->tclMacOSXGetFileAttribute) /* 15 */ +#endif /* Slot 16 is reserved */ /* Slot 17 is reserved */ -/* Slot 18 is reserved */ -/* Slot 19 is reserved */ -/* Slot 20 is reserved */ +#ifndef TclMacOSXMatchType +#define TclMacOSXMatchType \ + (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ +#endif +#ifndef TclMacOSXNotifierAddRunLoopMode +#define TclMacOSXNotifierAddRunLoopMode \ + (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ +#endif +#ifndef TclWinAddProcess +#define TclWinAddProcess \ + (tclIntPlatStubsPtr->tclWinAddProcess) /* 20 */ +#endif /* Slot 21 is reserved */ #ifndef TclpCreateTempFile #define TclpCreateTempFile \ (tclIntPlatStubsPtr->tclpCreateTempFile) /* 22 */ #endif -/* Slot 23 is reserved */ -/* Slot 24 is reserved */ +#ifndef TclpGetTZName +#define TclpGetTZName \ + (tclIntPlatStubsPtr->tclpGetTZName) /* 23 */ +#endif +#ifndef TclWinNoBackslash +#define TclWinNoBackslash \ + (tclIntPlatStubsPtr->tclWinNoBackslash) /* 24 */ +#endif /* Slot 25 is reserved */ -/* Slot 26 is reserved */ -/* Slot 27 is reserved */ -/* Slot 28 is reserved */ +#ifndef TclWinSetInterfaces +#define TclWinSetInterfaces \ + (tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */ +#endif +#ifndef TclWinFlushDirtyChannels +#define TclWinFlushDirtyChannels \ + (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */ +#endif +#ifndef TclWinResetInterfaces +#define TclWinResetInterfaces \ + (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ +#endif #ifndef TclWinCPUID #define TclWinCPUID \ (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ @@ -651,8 +694,18 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #if !defined(__WIN32__) && !defined(MAC_TCL) && !defined(__CYGWIN__) && defined(USE_TCL_STUBS) #undef TclpCreateTempFile -#define TclpCreateTempFile \ - ((TclFile (*)_ANSI_ARGS_((CONST char *))) tclIntPlatStubsPtr->tclWinGetPlatformId) +#define TclpCreateTempFile ((TclFile (*) _ANSI_ARGS_((CONST char *))) \ + tclIntPlatStubsPtr->tclWinGetPlatformId) +#undef TclpCreateProcess +#define TclpCreateProcess ((int (*) _ANSI_ARGS_((Tcl_Interp *, int, \ + CONST char **, TclFile, TclFile, TclFile, Tcl_Pid *))) \ + tclIntPlatStubsPtr->tclWinGetTclInstance) +#undef TclpMakeFile +#define TclpMakeFile ((TclFile (*) _ANSI_ARGS_((Tcl_Channel channel, \ + int direction))) tclIntPlatStubsPtr->tclWinNToHS) +#undef TclpOpenFile +#define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ + tclIntPlatStubsPtr->tclWinNToHS) #endif #endif /* _TCLINTPLATDECLS */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 8979119..9ca1750 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -62,6 +62,15 @@ Tcl_NotifierProcs tclOriginalNotifier = { #define TclWinGetPlatformId winGetPlatformId #define Tcl_WinUtfToTChar winUtfToTChar #define Tcl_WinTCharToUtf winTCharToUtf +#define TclWinGetTclInstance winGetTclInstance +#define TclWinNToHS winNToHS +#define TclWinSetSockOpt winSetSockOpt +#define TclWinAddProcess winAddProcess +#define TclpGetTZName pGetTZName +#define TclWinNoBackslash winNoBackslash +#define TclWinSetInterfaces winSetInterfaces +#define TclWinFlushDirtyChannels winFlushDirtyChannels +#define TclWinResetInterfaces winResetInterfaces static Tcl_Encoding winTCharEncoding; @@ -73,6 +82,64 @@ TclWinGetPlatformId() return 2; /* VER_PLATFORM_WIN32_NT */; } +static int TclWinGetTclInstance() +{ + /* TODO: implementation */ + return 0; +} + +static unsigned short +TclWinNToHS(unsigned short ns) +{ + /* TODO: implementation */ + return (unsigned short) -1; +} +static int +TclWinSetSockOpt(int s, int level, int optname, + const char *optval, int optlen) +{ + /* TODO: implementation */ + return -1; +} + +static void +TclWinAddProcess(void *hProcess, unsigned long id) +{ + /* TODO: implementation */ +} + +static char * +TclpGetTZName(int isdst) +{ + /* TODO: implementation */ + return 0; +} + +static char * +TclWinNoBackslash(char *path) +{ + /* TODO: implementation */ + return 0; +} + +static void +TclWinSetInterfaces(int wide) +{ + /* TODO: implementation */ +} + +static void +TclWinFlushDirtyChannels(void) +{ + /* TODO: implementation */ +} + +static void +TclWinResetInterfaces(void) +{ + /* TODO: implementation */ +} + static char * Tcl_WinUtfToTChar(string, len, dsPtr) CONST char *string; @@ -80,20 +147,20 @@ Tcl_WinUtfToTChar(string, len, dsPtr) Tcl_DString *dsPtr; { if (!winTCharEncoding) { - winTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); + winTCharEncoding = Tcl_GetEncoding(0, "unicode"); } return Tcl_UtfToExternalDString(winTCharEncoding, string, len, dsPtr); } static char * -Tcl_WinTCharToUtf(string, len, dsPtr) - CONST char *string; - int len; - Tcl_DString *dsPtr; +Tcl_WinTCharToUtf( + CONST char *string, + int len, + Tcl_DString *dsPtr) { if (!winTCharEncoding) { - winTCharEncoding = Tcl_GetEncoding(NULL, "unicode"); + winTCharEncoding = Tcl_GetEncoding(0, "unicode"); } return Tcl_ExternalToUtfDString(winTCharEncoding, string, len, dsPtr); @@ -103,9 +170,26 @@ Tcl_WinTCharToUtf(string, len, dsPtr) Tcl_Interp *, CONST char *, int, int, char *))) Tcl_WinUtfToTChar #define Tcl_MacOSXOpenVersionedBundleResources (int (*) _ANSI_ARGS_(( \ Tcl_Interp *, CONST char *, CONST char *, int, int, char *))) Tcl_WinTCharToUtf +#define TclMacOSXGetFileAttribute (int(*) _ANSI_ARGS_((Tcl_Interp *, \ + int, Tcl_Obj *, Tcl_Obj **))) TclpCreateProcess +#define TclMacOSXMatchType (int (*) _ANSI_ARGS_((Tcl_Interp *, CONST char *, \ + CONST char *, Tcl_StatBuf *, Tcl_GlobTypeData *))) TclpMakeFile +#define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((CONST void *))) TclpOpenFile #elif !defined(__WIN32__) /* UNIX and MAC */ # define TclWinGetPlatformId (int (*)()) TclpCreateTempFile +# define TclWinGetTclInstance (int (*)()) TclpCreateProcess +# define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile +# define TclWinSetSockOpt (int (*) _ANSI_ARGS_((int, int, int, const char *, int))) TclpOpenFile +# define TclWinAddProcess 0 +# define TclpGetTZName 0 +# define TclWinNoBackslash 0 +# define TclWinSetInterfaces 0 +# define TclWinFlushDirtyChannels 0 +# define TclWinResetInterfaces 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 @@ -357,10 +441,10 @@ TclIntPlatStubs tclIntPlatStubs = { TclpCloseFile, /* 1 */ TclpCreateCommandChannel, /* 2 */ TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ + TclWinGetTclInstance, /* 4 */ NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ TclUnixWaitForFile, /* 8 */ TclWinGetPlatformId, /* 9 */ TclpReaddir, /* 10 */ @@ -368,20 +452,20 @@ TclIntPlatStubs tclIntPlatStubs = { TclpGmtime_unix, /* 12 */ TclpInetNtoa, /* 13 */ NULL, /* 14 */ - NULL, /* 15 */ + TclMacOSXGetFileAttribute, /* 15 */ NULL, /* 16 */ NULL, /* 17 */ - NULL, /* 18 */ - NULL, /* 19 */ - NULL, /* 20 */ + TclMacOSXMatchType, /* 18 */ + TclMacOSXNotifierAddRunLoopMode, /* 19 */ + TclWinAddProcess, /* 20 */ NULL, /* 21 */ TclpCreateTempFile, /* 22 */ - NULL, /* 23 */ - NULL, /* 24 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ NULL, /* 25 */ - NULL, /* 26 */ - NULL, /* 27 */ - NULL, /* 28 */ + TclWinSetInterfaces, /* 26 */ + TclWinFlushDirtyChannels, /* 27 */ + TclWinResetInterfaces, /* 28 */ TclWinCPUID, /* 29 */ #endif /* UNIX */ #ifdef __WIN32__ -- cgit v0.12 From 6efd3e5fb18780e9e765151e807ed04c34293aa6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 22 Mar 2012 21:34:27 +0000 Subject: add TclWinConvertError and TclWinConvertWSAError for cygwin --- generic/tclInt.decls | 12 +- generic/tclIntPlatDecls.h | 45 ++- generic/tclStubInit.c | 47 ++-- unix/Makefile.in | 6 +- unix/configure | 704 +++++++++++++++++++++++----------------------- unix/tcl.m4 | 4 +- win/tclWinError.c | 27 +- 7 files changed, 441 insertions(+), 404 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 3d84cb2..0595050 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -941,11 +941,13 @@ declare 29 win { # Pipe channel functions +# On non-cygwin, this is actually a reference to TclGetAndDetachPids declare 0 unix { - void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan) + void TclWinConvertError(unsigned int errCode) } +# On non-cygwin, this is actually a reference to TclpCloseFile declare 1 unix { - int TclpCloseFile(TclFile file) + void TclWinConvertWSAError(unsigned int errCode) } declare 2 unix { Tcl_Channel TclpCreateCommandChannel(TclFile readFile, @@ -1038,6 +1040,12 @@ declare 28 unix { declare 29 unix { int TclWinCPUID(unsigned int index, unsigned int *regs) } +declare 30 unix { + void TclGetAndDetachPids(Tcl_Interp *interp, Tcl_Channel chan) +} +declare 31 unix { + int TclpCloseFile(TclFile file) +} # Local Variables: diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 3c967b0..297895f 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -13,6 +13,7 @@ #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)); @@ -20,6 +21,7 @@ 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 @@ -35,10 +37,10 @@ EXTERN TclFile TclpOpenFile _ANSI_ARGS_((CONST char *fname, #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ /* 0 */ -EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, - Tcl_Channel chan)); +EXTERN void TclWinConvertError _ANSI_ARGS_((unsigned int errCode)); /* 1 */ -EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); +EXTERN void TclWinConvertWSAError _ANSI_ARGS_(( + unsigned int errCode)); /* 2 */ EXTERN Tcl_Channel TclpCreateCommandChannel _ANSI_ARGS_(( TclFile readFile, TclFile writeFile, @@ -104,6 +106,11 @@ EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void)); /* 29 */ EXTERN int TclWinCPUID _ANSI_ARGS_((unsigned int index, unsigned int *regs)); +/* 30 */ +EXTERN void TclGetAndDetachPids _ANSI_ARGS_((Tcl_Interp *interp, + Tcl_Channel chan)); +/* 31 */ +EXTERN int TclpCloseFile _ANSI_ARGS_((TclFile file)); #endif /* UNIX */ #ifdef __WIN32__ /* 0 */ @@ -255,8 +262,8 @@ typedef struct TclIntPlatStubs { struct TclIntPlatStubHooks *hooks; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan)); /* 0 */ - int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 1 */ + 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 */ int (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */ @@ -285,6 +292,8 @@ typedef struct TclIntPlatStubs { void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ 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 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */ @@ -364,13 +373,13 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ -#ifndef TclGetAndDetachPids -#define TclGetAndDetachPids \ - (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ +#ifndef TclWinConvertError +#define TclWinConvertError \ + (tclIntPlatStubsPtr->tclWinConvertError) /* 0 */ #endif -#ifndef TclpCloseFile -#define TclpCloseFile \ - (tclIntPlatStubsPtr->tclpCloseFile) /* 1 */ +#ifndef TclWinConvertWSAError +#define TclWinConvertWSAError \ + (tclIntPlatStubsPtr->tclWinConvertWSAError) /* 1 */ #endif #ifndef TclpCreateCommandChannel #define TclpCreateCommandChannel \ @@ -466,6 +475,14 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #define TclWinCPUID \ (tclIntPlatStubsPtr->tclWinCPUID) /* 29 */ #endif +#ifndef TclGetAndDetachPids +#define TclGetAndDetachPids \ + (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 30 */ +#endif +#ifndef TclpCloseFile +#define TclpCloseFile \ + (tclIntPlatStubsPtr->tclpCloseFile) /* 31 */ +#endif #endif /* UNIX */ #ifdef __WIN32__ #ifndef TclWinConvertError @@ -706,6 +723,12 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; #undef TclpOpenFile #define TclpOpenFile ((TclFile (*) _ANSI_ARGS_((CONST char *, int))) \ tclIntPlatStubsPtr->tclWinNToHS) +#undef TclGetAndDetachPids +#define TclGetAndDetachPids ((void (*) _ANSI_ARGS_((Tcl_Interp *, Tcl_Channel))) \ + tclIntPlatStubsPtr->tclWinConvertError) +#undef TclpCloseFile +#define TclpCloseFile ((int (*) _ANSI_ARGS_((TclFile))) \ + tclIntPlatStubsPtr->tclWinConvertWSAError) #endif #endif /* _TCLINTPLATDECLS */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 9ca1750..b363f24 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -68,9 +68,9 @@ Tcl_NotifierProcs tclOriginalNotifier = { #define TclWinAddProcess winAddProcess #define TclpGetTZName pGetTZName #define TclWinNoBackslash winNoBackslash -#define TclWinSetInterfaces winSetInterfaces -#define TclWinFlushDirtyChannels winFlushDirtyChannels -#define TclWinResetInterfaces winResetInterfaces +#define TclWinSetInterfaces (void (*) _ANSI_ARGS_((int))) doNothing +#define TclWinFlushDirtyChannels doNothing +#define TclWinResetInterfaces doNothing static Tcl_Encoding winTCharEncoding; @@ -84,60 +84,55 @@ TclWinGetPlatformId() static int TclWinGetTclInstance() { - /* TODO: implementation */ + Tcl_Panic("TclWinGetTclInstance not yet implemented for CYGWIN"); return 0; } static unsigned short TclWinNToHS(unsigned short ns) { - /* TODO: implementation */ + Tcl_Panic("TclWinNToHS not yet implemented for CYGWIN"); return (unsigned short) -1; } static int TclWinSetSockOpt(int s, int level, int optname, const char *optval, int optlen) { - /* TODO: implementation */ + Tcl_Panic("TclWinSetSockOpt not yet implemented for CYGWIN"); return -1; } static void TclWinAddProcess(void *hProcess, unsigned long id) { - /* TODO: implementation */ + Tcl_Panic("TclWinAddProcess not yet implemented for CYGWIN"); } static char * TclpGetTZName(int isdst) { /* TODO: implementation */ + Tcl_Panic("TclpGetTZName not yet implemented for CYGWIN"); return 0; } static char * TclWinNoBackslash(char *path) { - /* TODO: implementation */ - return 0; -} + char *p; -static void -TclWinSetInterfaces(int wide) -{ - /* TODO: implementation */ -} - -static void -TclWinFlushDirtyChannels(void) -{ - /* TODO: implementation */ + for (p = path; *p != '\0'; p++) { + if (*p == '\\') { + *p = '/'; + } + } + return path; } static void -TclWinResetInterfaces(void) +doNothing(void) { - /* TODO: implementation */ + /* dummy implementation, no need to do anything */ } static char * @@ -177,6 +172,8 @@ Tcl_WinTCharToUtf( #define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((CONST void *))) TclpOpenFile #elif !defined(__WIN32__) /* UNIX and MAC */ +# define TclWinConvertError (void (*) _ANSI_ARGS_((unsigned int))) TclGetAndDetachPids +# define TclWinConvertWSAError (void (*) _ANSI_ARGS_((unsigned int))) TclpCloseFile # define TclWinGetPlatformId (int (*)()) TclpCreateTempFile # define TclWinGetTclInstance (int (*)()) TclpCreateProcess # define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile @@ -437,8 +434,8 @@ TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ TclpCreateCommandChannel, /* 2 */ TclpCreatePipe, /* 3 */ TclWinGetTclInstance, /* 4 */ @@ -467,6 +464,8 @@ TclIntPlatStubs tclIntPlatStubs = { TclWinFlushDirtyChannels, /* 27 */ TclWinResetInterfaces, /* 28 */ TclWinCPUID, /* 29 */ + TclGetAndDetachPids, /* 30 */ + TclpCloseFile, /* 31 */ #endif /* UNIX */ #ifdef __WIN32__ TclWinConvertError, /* 0 */ diff --git a/unix/Makefile.in b/unix/Makefile.in index e741ea7..b066e56 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -258,7 +258,7 @@ TOP_DIR = $(SRC_DIR)/.. GENERIC_DIR = $(TOP_DIR)/generic COMPAT_DIR = $(TOP_DIR)/compat TOOL_DIR = $(TOP_DIR)/tools -UNIX_DIR = $(SRC_DIR) +UNIX_DIR = $(TOP_DIR)/unix MAC_OSX_DIR = $(TOP_DIR)/macosx # Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below. DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest @@ -1102,6 +1102,10 @@ tclMacOSXBundle.o: $(MAC_OSX_DIR)/tclMacOSXBundle.c tclMacOSXNotify.o: $(MAC_OSX_DIR)/tclMacOSXNotify.c $(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tclMacOSXNotify.c +# The following is a CYGWIN only source: +tclWinError.o: $(TOP_DIR)/win/tclWinError.c + $(CC) -c $(CC_SWITCHES) $(TOP_DIR)/win/tclWinError.c + # DTrace support $(TCL_OBJS) $(STUB_LIB_OBJS) $(TCLSH_OBJS) $(TCLTEST_OBJS) $(XTTEST_OBJS): @DTRACE_HDR@ diff --git a/unix/configure b/unix/configure index e77c05b..792d3c3 100755 --- a/unix/configure +++ b/unix/configure @@ -2842,12 +2842,10 @@ fi SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" - DL_OBJS="tclLoadDl.o" + DL_OBJS="tclLoadDl.o tclWinError.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a' TCL_SHLIB_LD_EXTRAS='-Wl,--out-implib,$@.a' ;; dgux*) @@ -2868,7 +2866,7 @@ fi DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" echo $ac_n "checking for inet_ntoa in -lnetwork""... $ac_c" 1>&6 -echo "configure:2872: checking for inet_ntoa in -lnetwork" >&5 +echo "configure:2870: checking for inet_ntoa in -lnetwork" >&5 ac_lib_var=`echo network'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2876,7 +2874,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnetwork $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2889: \"$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 @@ -2926,7 +2924,7 @@ EOF SHLIB_SUFFIX=".sl" fi echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2930: checking for shl_load in -ldld" >&5 +echo "configure:2928: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2934,7 +2932,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2947: \"$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 @@ -3011,7 +3009,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:3015: checking for shl_load in -ldld" >&5 +echo "configure:3013: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3019,7 +3017,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3032: \"$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 @@ -3157,17 +3155,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:3161: checking for dld.h" >&5 +echo "configure:3159: 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:3171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3169: \"$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* @@ -3199,7 +3197,7 @@ fi fi if test $do64bit = yes; then echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6 -echo "configure:3203: checking if compiler accepts -m64 flag" >&5 +echo "configure:3201: checking if compiler accepts -m64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_m64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3207,14 +3205,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_m64=yes else @@ -3266,17 +3264,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:3270: checking for dld.h" >&5 +echo "configure:3268: 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:3280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3278: \"$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* @@ -3345,17 +3343,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:3349: checking for dlfcn.h" >&5 +echo "configure:3347: 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:3359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3357: \"$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* @@ -3383,13 +3381,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:3387: checking for ELF" >&5 +echo "configure:3385: 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:3472: checking for ELF" >&5 +echo "configure:3470: 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:3580: checking if compiler accepts -arch ppc64 flag" >&5 +echo "configure:3578: 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 @@ -3584,14 +3582,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:3593: \"$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 @@ -3611,7 +3609,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:3615: checking if compiler accepts -arch x86_64 flag" >&5 +echo "configure:3613: 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 @@ -3619,14 +3617,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:3628: \"$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 @@ -3655,7 +3653,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:3659: checking if ld accepts -single_module flag" >&5 +echo "configure:3657: 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 @@ -3663,14 +3661,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:3672: \"$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 @@ -3696,7 +3694,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:3700: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:3698: 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 @@ -3704,14 +3702,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:3713: \"$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 @@ -3734,7 +3732,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:3738: checking whether to use CoreFoundation" >&5 +echo "configure:3736: 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" @@ -3746,7 +3744,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:3750: checking for CoreFoundation.framework" >&5 +echo "configure:3748: 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 @@ -3760,14 +3758,14 @@ else done; fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -3794,7 +3792,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:3798: checking for 64-bit CoreFoundation" >&5 +echo "configure:3796: 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 @@ -3803,14 +3801,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:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3812: \"$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 @@ -4139,7 +4137,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:4143: checking for ld accepts -Bexport flag" >&5 +echo "configure:4141: 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 @@ -4147,14 +4145,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:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -4204,13 +4202,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:4208: checking sys/exec.h" >&5 +echo "configure:4206: 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() { @@ -4228,7 +4226,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -4248,13 +4246,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:4252: checking a.out.h" >&5 +echo "configure:4250: 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() { @@ -4272,7 +4270,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -4292,13 +4290,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:4296: checking sys/exec_aout.h" >&5 +echo "configure:4294: 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() { @@ -4316,7 +4314,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -4457,7 +4455,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:4461: checking for build with symbols" >&5 +echo "configure:4459: 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" @@ -4518,21 +4516,21 @@ TCL_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:4522: checking for required early compiler flags" >&5 +echo "configure:4520: 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:4536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -4540,7 +4538,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4548,7 +4546,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -4575,14 +4573,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:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -4590,7 +4588,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4598,7 +4596,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -4625,14 +4623,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:4636: \"$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__largefile_source64=no else @@ -4640,7 +4638,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4648,7 +4646,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4679,7 +4677,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4683: checking for 64-bit integer type" >&5 +echo "configure:4681: 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 @@ -4687,14 +4685,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:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4708,7 +4706,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:4719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4742,13 +4740,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4746: checking for struct dirent64" >&5 +echo "configure:4744: 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 @@ -4756,7 +4754,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4777,13 +4775,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4781: checking for struct stat64" >&5 +echo "configure:4779: 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() { @@ -4791,7 +4789,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4814,12 +4812,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4818: checking for $ac_func" >&5 +echo "configure:4816: 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:4844: \"$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 @@ -4867,13 +4865,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4871: checking for off64_t" >&5 +echo "configure:4869: 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() { @@ -4881,7 +4879,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4913,14 +4911,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4917: checking whether byte ordering is bigendian" >&5 +echo "configure:4915: 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 @@ -4931,11 +4929,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4933: \"$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 @@ -4946,7 +4944,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4966,7 +4964,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:4981: \"$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 @@ -5012,12 +5010,12 @@ fi for ac_func in getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5016: checking for $ac_func" >&5 +echo "configure:5014: 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:5042: \"$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 @@ -5074,12 +5072,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:5078: checking for $ac_func" >&5 +echo "configure:5076: 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:5104: \"$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 @@ -5129,12 +5127,12 @@ done echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:5133: checking for strerror" >&5 +echo "configure:5131: 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:5159: \"$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 @@ -5181,12 +5179,12 @@ EOF fi echo $ac_n "checking for getwd""... $ac_c" 1>&6 -echo "configure:5185: checking for getwd" >&5 +echo "configure:5183: 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:5211: \"$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 @@ -5233,12 +5231,12 @@ EOF fi echo $ac_n "checking for wait3""... $ac_c" 1>&6 -echo "configure:5237: checking for wait3" >&5 +echo "configure:5235: 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:5263: \"$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 @@ -5285,12 +5283,12 @@ EOF fi echo $ac_n "checking for uname""... $ac_c" 1>&6 -echo "configure:5289: checking for uname" >&5 +echo "configure:5287: 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:5315: \"$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 @@ -5344,12 +5342,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:5348: checking for realpath" >&5 +echo "configure:5346: 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:5374: \"$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 @@ -5402,12 +5400,12 @@ fi if test "${TCL_THREADS}" = 1; then echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6 -echo "configure:5406: checking for getpwuid_r" >&5 +echo "configure:5404: 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:5432: \"$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 @@ -5446,13 +5444,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:5450: checking for getpwuid_r with 5 args" >&5 +echo "configure:5448: 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 < @@ -5469,7 +5467,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwuid_r_5=yes else @@ -5490,13 +5488,13 @@ EOF else echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6 -echo "configure:5494: checking for getpwuid_r with 4 args" >&5 +echo "configure:5492: 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 < @@ -5513,7 +5511,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwuid_r_4=yes else @@ -5546,12 +5544,12 @@ else fi echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6 -echo "configure:5550: checking for getpwnam_r" >&5 +echo "configure:5548: 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:5576: \"$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 @@ -5590,13 +5588,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:5594: checking for getpwnam_r with 5 args" >&5 +echo "configure:5592: 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 < @@ -5613,7 +5611,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwnam_r_5=yes else @@ -5634,13 +5632,13 @@ EOF else echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6 -echo "configure:5638: checking for getpwnam_r with 4 args" >&5 +echo "configure:5636: 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 < @@ -5657,7 +5655,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getpwnam_r_4=yes else @@ -5690,12 +5688,12 @@ else fi echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6 -echo "configure:5694: checking for getgrgid_r" >&5 +echo "configure:5692: 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:5720: \"$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 @@ -5734,13 +5732,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:5738: checking for getgrgid_r with 5 args" >&5 +echo "configure:5736: 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 < @@ -5757,7 +5755,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrgid_r_5=yes else @@ -5778,13 +5776,13 @@ EOF else echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6 -echo "configure:5782: checking for getgrgid_r with 4 args" >&5 +echo "configure:5780: 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 < @@ -5801,7 +5799,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrgid_r_4=yes else @@ -5834,12 +5832,12 @@ else fi echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6 -echo "configure:5838: checking for getgrnam_r" >&5 +echo "configure:5836: 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:5864: \"$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 @@ -5878,13 +5876,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:5882: checking for getgrnam_r with 5 args" >&5 +echo "configure:5880: 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 < @@ -5901,7 +5899,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrnam_r_5=yes else @@ -5922,13 +5920,13 @@ EOF else echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6 -echo "configure:5926: checking for getgrnam_r with 4 args" >&5 +echo "configure:5924: 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 < @@ -5945,7 +5943,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_getgrnam_r_4=yes else @@ -6005,12 +6003,12 @@ EOF else echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 -echo "configure:6009: checking for gethostbyname_r" >&5 +echo "configure:6007: 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:6035: \"$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 @@ -6049,13 +6047,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:6053: checking for gethostbyname_r with 6 args" >&5 +echo "configure:6051: 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 < @@ -6072,7 +6070,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyname_r_6=yes else @@ -6093,13 +6091,13 @@ EOF else echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6 -echo "configure:6097: checking for gethostbyname_r with 5 args" >&5 +echo "configure:6095: 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 < @@ -6116,7 +6114,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyname_r_5=yes else @@ -6137,13 +6135,13 @@ EOF else echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6 -echo "configure:6141: checking for gethostbyname_r with 3 args" >&5 +echo "configure:6139: 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 < @@ -6158,7 +6156,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyname_r_3=yes else @@ -6192,12 +6190,12 @@ else fi echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6 -echo "configure:6196: checking for gethostbyaddr_r" >&5 +echo "configure:6194: 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:6222: \"$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 @@ -6236,13 +6234,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:6240: checking for gethostbyaddr_r with 7 args" >&5 +echo "configure:6238: 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 < @@ -6262,7 +6260,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyaddr_r_7=yes else @@ -6283,13 +6281,13 @@ EOF else echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6 -echo "configure:6287: checking for gethostbyaddr_r with 8 args" >&5 +echo "configure:6285: 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 < @@ -6309,7 +6307,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_api_gethostbyaddr_r_8=yes else @@ -6355,17 +6353,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6359: checking for $ac_hdr" >&5 +echo "configure:6357: 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:6369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6367: \"$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* @@ -6392,7 +6390,7 @@ fi done echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6 -echo "configure:6396: checking termios vs. termio vs. sgtty" >&5 +echo "configure:6394: 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 @@ -6401,7 +6399,7 @@ else tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6416,7 +6414,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6418: \"$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 @@ -6433,7 +6431,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6447,7 +6445,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6449: \"$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 @@ -6465,7 +6463,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6480,7 +6478,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6482: \"$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 @@ -6498,7 +6496,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6515,7 +6513,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6517: \"$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 @@ -6533,7 +6531,7 @@ fi tcl_cv_api_serial=no else cat > conftest.$ac_ext < @@ -6549,7 +6547,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6551: \"$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 @@ -6567,7 +6565,7 @@ fi tcl_cv_api_serial=none else cat > conftest.$ac_ext < @@ -6584,7 +6582,7 @@ int main() { return 1; } EOF -if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6586: \"$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 @@ -6627,20 +6625,20 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:6631: checking for fd_set in sys/types" >&5 +echo "configure:6629: 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:6644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -6656,13 +6654,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:6660: checking for fd_mask in sys/select" >&5 +echo "configure:6658: 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 @@ -6699,12 +6697,12 @@ fi #------------------------------------------------------------------------------ echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:6703: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:6701: 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 @@ -6712,7 +6710,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:6716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -6737,17 +6735,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6741: checking for $ac_hdr" >&5 +echo "configure:6739: 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:6751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6749: \"$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* @@ -6774,12 +6772,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:6778: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:6776: 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 @@ -6788,7 +6786,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:6792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -6809,12 +6807,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:6813: checking for tm_zone in struct tm" >&5 +echo "configure:6811: 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> @@ -6822,7 +6820,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:6826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -6842,12 +6840,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:6846: checking for tzname" >&5 +echo "configure:6844: 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. */ @@ -6857,7 +6855,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:6861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -6882,12 +6880,12 @@ fi for ac_func in gmtime_r localtime_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6886: checking for $ac_func" >&5 +echo "configure:6884: 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:6912: \"$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 @@ -6936,20 +6934,20 @@ done echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6 -echo "configure:6940: checking tm_tzadj in struct tm" >&5 +echo "configure:6938: 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:6953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_member_tm_tzadj=yes else @@ -6970,20 +6968,20 @@ EOF fi echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:6974: checking tm_gmtoff in struct tm" >&5 +echo "configure:6972: 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:6987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_member_tm_gmtoff=yes else @@ -7008,13 +7006,13 @@ EOF # (like convex) have timezone functions, etc. # echo $ac_n "checking long timezone variable""... $ac_c" 1>&6 -echo "configure:7012: checking long timezone variable" >&5 +echo "configure:7010: 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() { @@ -7023,7 +7021,7 @@ extern long timezone; exit (0); ; return 0; } EOF -if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_timezone_long=yes else @@ -7046,13 +7044,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:7050: checking time_t timezone variable" >&5 +echo "configure:7048: 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() { @@ -7061,7 +7059,7 @@ extern time_t timezone; exit (0); ; return 0; } EOF -if { (eval echo configure:7065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_timezone_time=yes else @@ -7088,12 +7086,12 @@ EOF # in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:7092: checking for st_blksize in struct stat" >&5 +echo "configure:7090: 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 @@ -7101,7 +7099,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:7105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -7122,12 +7120,12 @@ EOF fi echo $ac_n "checking for fstatfs""... $ac_c" 1>&6 -echo "configure:7126: checking for fstatfs" >&5 +echo "configure:7124: 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:7152: \"$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 @@ -7179,7 +7177,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:7183: checking for 8-bit clean memcmp" >&5 +echo "configure:7181: 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 @@ -7187,7 +7185,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:7199: \"$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 @@ -7221,12 +7219,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:7225: checking for memmove" >&5 +echo "configure:7223: 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:7251: \"$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 @@ -7282,7 +7280,7 @@ fi #-------------------------------------------------------------------- if test "x${ac_cv_func_strstr}" = "xyes"; then echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6 -echo "configure:7286: checking proper strstr implementation" >&5 +echo "configure:7284: 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 @@ -7291,7 +7289,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:7302: \"$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 @@ -7327,12 +7325,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strtoul""... $ac_c" 1>&6 -echo "configure:7331: checking for strtoul" >&5 +echo "configure:7329: 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:7357: \"$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 @@ -7377,7 +7375,7 @@ fi if test $tcl_ok = 1; then echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6 -echo "configure:7381: checking proper strtoul implementation" >&5 +echo "configure:7379: 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 @@ -7386,7 +7384,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:7404: \"$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 @@ -7431,12 +7429,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:7435: checking for strtod" >&5 +echo "configure:7433: 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:7461: \"$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 @@ -7481,7 +7479,7 @@ fi if test $tcl_ok = 1; then echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6 -echo "configure:7485: checking proper strtod implementation" >&5 +echo "configure:7483: 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 @@ -7490,7 +7488,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:7508: \"$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 @@ -7538,12 +7536,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:7542: checking for strtod" >&5 +echo "configure:7540: 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:7568: \"$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 @@ -7588,7 +7586,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:7592: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:7590: 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 @@ -7597,7 +7595,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:7622: \"$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 @@ -7651,12 +7649,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:7655: checking for ANSI C header files" >&5 +echo "configure:7653: 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 @@ -7664,7 +7662,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7666: \"$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* @@ -7681,7 +7679,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 @@ -7699,7 +7697,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 @@ -7720,7 +7718,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -7731,7 +7729,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:7735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -7755,12 +7753,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:7759: checking for mode_t" >&5 +echo "configure:7757: 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 @@ -7788,12 +7786,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:7792: checking for pid_t" >&5 +echo "configure:7790: 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 @@ -7821,12 +7819,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:7825: checking for size_t" >&5 +echo "configure:7823: 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 @@ -7854,12 +7852,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:7858: checking for uid_t in sys/types.h" >&5 +echo "configure:7856: 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 @@ -7889,13 +7887,13 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:7893: checking for socklen_t" >&5 +echo "configure:7891: 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 < @@ -7934,12 +7932,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for opendir""... $ac_c" 1>&6 -echo "configure:7938: checking for opendir" >&5 +echo "configure:7936: 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:7964: \"$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 @@ -7995,13 +7993,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking union wait""... $ac_c" 1>&6 -echo "configure:7999: checking union wait" >&5 +echo "configure:7997: 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 @@ -8013,7 +8011,7 @@ WIFEXITED(x); /* Generates compiler error if WIFEXITED ; return 0; } EOF -if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_union_wait=yes else @@ -8040,12 +8038,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6 -echo "configure:8044: checking for strncasecmp" >&5 +echo "configure:8042: 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:8070: \"$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 @@ -8090,7 +8088,7 @@ fi if test "$tcl_ok" = 0; then echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6 -echo "configure:8094: checking for strncasecmp in -lsocket" >&5 +echo "configure:8092: 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 @@ -8098,7 +8096,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:8111: \"$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 @@ -8133,7 +8131,7 @@ fi fi if test "$tcl_ok" = 0; then echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6 -echo "configure:8137: checking for strncasecmp in -linet" >&5 +echo "configure:8135: 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 @@ -8141,7 +8139,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:8154: \"$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 @@ -8190,12 +8188,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 -echo "configure:8194: checking for BSDgettimeofday" >&5 +echo "configure:8192: 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:8220: \"$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 @@ -8240,12 +8238,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 -echo "configure:8244: checking for gettimeofday" >&5 +echo "configure:8242: 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:8270: \"$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 @@ -8295,13 +8293,13 @@ fi fi echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 -echo "configure:8299: checking for gettimeofday declaration" >&5 +echo "configure:8297: 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 @@ -8332,14 +8330,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:8336: checking whether char is unsigned" >&5 +echo "configure:8334: 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:8373: \"$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 @@ -8395,13 +8393,13 @@ EOF fi echo $ac_n "checking signed char declarations""... $ac_c" 1>&6 -echo "configure:8399: checking signed char declarations" >&5 +echo "configure:8397: 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:8413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_char_signed=yes else @@ -8436,7 +8434,7 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6 -echo "configure:8440: checking for a putenv() that copies the buffer" >&5 +echo "configure:8438: 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 @@ -8445,7 +8443,7 @@ else tcl_cv_putenv_copy=no else cat > conftest.$ac_ext < @@ -8467,7 +8465,7 @@ else } EOF -if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8469: \"$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 @@ -8507,17 +8505,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:8511: checking for langinfo.h" >&5 +echo "configure:8509: 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:8521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8519: \"$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* @@ -8541,21 +8539,21 @@ fi fi echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6 -echo "configure:8545: checking whether to use nl_langinfo" >&5 +echo "configure:8543: 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:8559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_langinfo_h=yes else @@ -8588,17 +8586,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:8592: checking for $ac_hdr" >&5 +echo "configure:8590: 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:8602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8600: \"$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* @@ -8627,12 +8625,12 @@ done for ac_func in copyfile do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8631: checking for $ac_func" >&5 +echo "configure:8629: 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:8657: \"$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 @@ -8684,17 +8682,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8688: checking for $ac_hdr" >&5 +echo "configure:8686: 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:8698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8696: \"$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* @@ -8723,12 +8721,12 @@ done for ac_func in OSSpinLockLock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8727: checking for $ac_func" >&5 +echo "configure:8725: 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:8753: \"$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 @@ -8778,12 +8776,12 @@ done for ac_func in pthread_atfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8782: checking for $ac_func" >&5 +echo "configure:8780: 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:8808: \"$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 @@ -8847,17 +8845,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8851: checking for $ac_hdr" >&5 +echo "configure:8849: 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:8861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8859: \"$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* @@ -8885,14 +8883,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:8889: checking if weak import is available" >&5 +echo "configure:8887: 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:8910: \"$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 @@ -8936,13 +8934,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fts""... $ac_c" 1>&6 -echo "configure:8940: checking for fts" >&5 +echo "configure:8938: 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 < @@ -8957,7 +8955,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_api_fts=yes else @@ -8989,17 +8987,17 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8993: checking for $ac_hdr" >&5 +echo "configure:8991: 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:9003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9001: \"$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* @@ -9029,17 +9027,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9033: checking for $ac_hdr" >&5 +echo "configure:9031: 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:9043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9041: \"$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* @@ -9067,7 +9065,7 @@ done echo $ac_n "checking system version""... $ac_c" 1>&6 -echo "configure:9071: checking system version" >&5 +echo "configure:9069: checking system version" >&5 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9098,7 +9096,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:9102: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo "configure:9100: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 case $system in OSF*) cat >> confdefs.h <<\EOF @@ -9142,17 +9140,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:9146: checking for sys/sdt.h" >&5 +echo "configure:9144: 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:9156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9154: \"$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* @@ -9179,7 +9177,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:9183: checking for $ac_word" >&5 +echo "configure:9181: 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 @@ -9214,7 +9212,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:9218: checking whether to enable DTrace support" >&5 +echo "configure:9216: checking whether to enable DTrace support" >&5 MAKEFILE_SHELL='/bin/sh' if test $tcl_ok = yes; then cat >> confdefs.h <<\EOF @@ -9268,7 +9266,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:9272: checking how to package libraries" >&5 +echo "configure:9270: 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" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0d5d698..c248686 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1207,12 +1207,10 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" - DL_OBJS="tclLoadDl.o" + DL_OBJS="tclLoadDl.o tclWinError.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a' TCL_SHLIB_LD_EXTRAS='-Wl,--out-implib,$[@].a' ;; dgux*) diff --git a/win/tclWinError.c b/win/tclWinError.c index da1e335..d718584 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.c @@ -10,14 +10,22 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include "tclWinInt.h" +#include "tclPort.h" + +#ifndef WSAEWOULDBLOCK +# define WSAEWOULDBLOCK 10035L +#endif + +#ifndef __WIN32__ +# define DWORD unsigned int +#endif /* * The following table contains the mapping from Win32 errors to * errno errors. */ -static char errorTable[] = { +static CONST unsigned char errorTable[] = { 0, EINVAL, /* ERROR_INVALID_FUNCTION 1 */ ENOENT, /* ERROR_FILE_NOT_FOUND 2 */ @@ -285,17 +293,15 @@ static char errorTable[] = { EINVAL, /* 264 */ EINVAL, /* 265 */ EINVAL, /* 266 */ - ENOTDIR, /* ERROR_DIRECTORY 267 */ + ENOTDIR /* ERROR_DIRECTORY 267 */ }; -static const unsigned int tableLen = sizeof(errorTable); - /* * The following table contains the mapping from WinSock errors to * errno errors. */ -static int wsaErrorTable[] = { +static CONST unsigned char wsaErrorTable[] = { EWOULDBLOCK, /* WSAEWOULDBLOCK */ EINPROGRESS, /* WSAEINPROGRESS */ EALREADY, /* WSAEALREADY */ @@ -332,7 +338,7 @@ static int wsaErrorTable[] = { EUSERS, /* WSAEUSERS */ EDQUOT, /* WSAEDQUOT */ ESTALE, /* WSAESTALE */ - EREMOTE, /* WSAEREMOTE */ + EREMOTE /* WSAEREMOTE */ }; /* @@ -355,7 +361,7 @@ void TclWinConvertError(errCode) DWORD errCode; /* Win32 error code. */ { - if (errCode >= tableLen) { + if (errCode >= sizeof(errorTable)) { Tcl_SetErrno(EINVAL); } else { Tcl_SetErrno(errorTable[errCode]); @@ -382,8 +388,9 @@ void TclWinConvertWSAError(errCode) DWORD errCode; /* Win32 error code. */ { - if ((errCode >= WSAEWOULDBLOCK) && (errCode <= WSAEREMOTE)) { - Tcl_SetErrno(wsaErrorTable[errCode - WSAEWOULDBLOCK]); + errCode -= WSAEWOULDBLOCK; + if ((errCode <= (DWORD) sizeof(wsaErrorTable))) { + Tcl_SetErrno(wsaErrorTable[errCode]); } else { Tcl_SetErrno(EINVAL); } -- cgit v0.12 From af8da26b34bd282986b54a9da8618c6c3f617c7a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 23 Mar 2012 14:15:29 +0000 Subject: add TclGetAndDetachPids and TclpCloseFile to cygwin port --- generic/tclInt.decls | 2 ++ generic/tclStubInit.c | 8 +++++--- win/tclWinError.c | 43 ++++++++++++++++++++++++++----------------- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 0595050..36198a4 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -992,9 +992,11 @@ declare 10 unix { } # Slots 11 and 12 are forwarders for functions that were promoted to # generic Stubs +# On cygwin, this is actually a reference to TclGetAndDetachPids declare 11 unix { struct tm *TclpLocaltime_unix(TclpTime_t_CONST clock) } +# On cygwin, this is actually a reference to TclpCloseFile declare 12 unix { struct tm *TclpGmtime_unix(TclpTime_t_CONST clock) } diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index b363f24..347bdcb 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -31,8 +31,6 @@ #undef Tcl_ValidateAllMemory #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry -#define TclpLocaltime_unix TclpLocaltime -#define TclpGmtime_unix TclpGmtime /* * Keep a record of the original Notifier procedures, created in the @@ -165,11 +163,13 @@ Tcl_WinTCharToUtf( Tcl_Interp *, CONST char *, int, int, char *))) Tcl_WinUtfToTChar #define Tcl_MacOSXOpenVersionedBundleResources (int (*) _ANSI_ARGS_(( \ Tcl_Interp *, CONST char *, CONST char *, int, int, char *))) Tcl_WinTCharToUtf -#define TclMacOSXGetFileAttribute (int(*) _ANSI_ARGS_((Tcl_Interp *, \ +#define TclMacOSXGetFileAttribute (int (*) _ANSI_ARGS_((Tcl_Interp *, \ int, Tcl_Obj *, Tcl_Obj **))) TclpCreateProcess #define TclMacOSXMatchType (int (*) _ANSI_ARGS_((Tcl_Interp *, CONST char *, \ CONST char *, Tcl_StatBuf *, Tcl_GlobTypeData *))) TclpMakeFile #define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((CONST void *))) TclpOpenFile +#define TclpLocaltime_unix (struct tm *(*) _ANSI_ARGS_((TclpTime_t_CONST))) TclGetAndDetachPids +#define TclpGmtime_unix (struct tm *(*) _ANSI_ARGS_((TclpTime_t_CONST))) TclpCloseFile #elif !defined(__WIN32__) /* UNIX and MAC */ # define TclWinConvertError (void (*) _ANSI_ARGS_((unsigned int))) TclGetAndDetachPids @@ -191,6 +191,8 @@ Tcl_WinTCharToUtf( # define Tcl_MacOSXOpenBundleResources 0 # define Tcl_MacOSXOpenVersionedBundleResources 0 # endif +# define TclpLocaltime_unix TclpLocaltime +# define TclpGmtime_unix TclpGmtime #endif /* diff --git a/win/tclWinError.c b/win/tclWinError.c index d718584..b49271e 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.c @@ -1,15 +1,16 @@ -/* +/* * tclWinError.c -- * - * This file contains code for converting from Win32 errors to - * errno errors. + * This file contains code for converting from Win32 errors to errno + * errors. * * Copyright (c) 1995-1996 by Sun Microsystems, Inc. * - * See the file "license.terms" for information on usage and redistribution - * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * See the file "license.terms" for information on usage and redistribution of + * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#include "tclInt.h" #include "tclPort.h" #ifndef WSAEWOULDBLOCK @@ -21,8 +22,7 @@ #endif /* - * The following table contains the mapping from Win32 errors to - * errno errors. + * The following table contains the mapping from Win32 errors to errno errors. */ static CONST unsigned char errorTable[] = { @@ -301,7 +301,7 @@ static CONST unsigned char errorTable[] = { * errno errors. */ -static CONST unsigned char wsaErrorTable[] = { +static CONST int wsaErrorTable[] = { EWOULDBLOCK, /* WSAEWOULDBLOCK */ EINPROGRESS, /* WSAEINPROGRESS */ EALREADY, /* WSAEALREADY */ @@ -358,10 +358,10 @@ static CONST unsigned char wsaErrorTable[] = { */ void -TclWinConvertError(errCode) - DWORD errCode; /* Win32 error code. */ +TclWinConvertError( + DWORD errCode) /* Win32 error code. */ { - if (errCode >= sizeof(errorTable)) { + if (errCode >= sizeof(errorTable)/sizeof(errorTable[0])) { Tcl_SetErrno(EINVAL); } else { Tcl_SetErrno(errorTable[errCode]); @@ -385,13 +385,22 @@ TclWinConvertError(errCode) */ void -TclWinConvertWSAError(errCode) - DWORD errCode; /* Win32 error code. */ +TclWinConvertWSAError( + DWORD errCode) /* Win32 error code. */ { - errCode -= WSAEWOULDBLOCK; - if ((errCode <= (DWORD) sizeof(wsaErrorTable))) { - Tcl_SetErrno(wsaErrorTable[errCode]); - } else { + errCode -= WSAEWOULDBLOCK; + if (errCode >= sizeof(wsaErrorTable)/sizeof(wsaErrorTable[0])) { Tcl_SetErrno(EINVAL); + } else { + Tcl_SetErrno(wsaErrorTable[errCode]); } } + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * tab-width: 8 + * End: + */ -- cgit v0.12 From cf90f82aa4b9f654552f8ed37e05d615311e7f57 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 23 Mar 2012 23:04:36 +0000 Subject: use mingw-w64 as compiler in cygwin /win mode (cygwin itself cannot do that, as the -no-cygwin flag doesn't exist anymore) --- win/configure | 1602 +++++++++++++++++++++++++++--------------------------- win/configure.in | 61 +-- win/tcl.m4 | 38 +- 3 files changed, 846 insertions(+), 855 deletions(-) diff --git a/win/configure b/win/configure index 57bc8e6..2cbdd29 100755 --- a/win/configure +++ b/win/configure @@ -937,16 +937,40 @@ fi #-------------------------------------------------------------------- -# Perform additinal compiler tests. +# Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:945: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:945: checking for Cygwin environment" >&5 +echo "configure:969: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+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:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -973,952 +997,924 @@ fi echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes - -if test "$ac_cv_cygwin" = "yes" ; then - { echo "configure: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." 1>&2; exit 1; } -fi - - -echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6 -echo "configure:986: checking for SEH support in compiler" >&5 -if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:1002: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$cross_compiling" = yes; then - tcl_cv_seh=no -else cat > conftest.$ac_ext < -#undef WIN32_LEAN_AND_MEAN - -int main(int argc, char** argv) { - int a, b = 0; - __try { - a = 666 / b; - } - __except (EXCEPTION_EXECUTE_HANDLER) { - return 0; - } - return 1; -} - +int main() { +return __MINGW32__; +; return 0; } EOF -if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - tcl_cv_seh=yes +if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -fr conftest* - tcl_cv_seh=no -fi -rm -fr conftest* + rm -rf conftest* + ac_cv_mingw32=no fi - - +rm -f conftest* +rm -f conftest* fi -echo "$ac_t""$tcl_cv_seh" 1>&6 -if test "$tcl_cv_seh" = "no" ; then - cat >> confdefs.h <<\EOF -#define HAVE_NO_SEH 1 -EOF +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes -fi -# -# Check to see if the excpt.h include file provided contains the -# definition for EXCEPTION_DISPOSITION; if not, which is the case -# with Cygwin's version as of 2002-04-10, define it to be int, -# sufficient for getting the current code to work. -# -echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6 -echo "configure:1043: checking for EXCEPTION_DISPOSITION support in include files" >&5 -if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1033: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT -int main() { - EXCEPTION_DISPOSITION x; +#-------------------------------------------------------------------- +# Check whether --enable-threads or --disable-threads was given. +#-------------------------------------------------------------------- -; return 0; } -EOF -if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_eh_disposition=yes + + echo $ac_n "checking for building with threads""... $ac_c" 1>&6 +echo "configure:1070: checking for building with threads" >&5 + # Check whether --enable-threads or --disable-threads was given. +if test "${enable_threads+set}" = set; then + enableval="$enable_threads" + tcl_ok=$enableval else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_cv_eh_disposition=no + tcl_ok=no fi -rm -f conftest* -fi -echo "$ac_t""$tcl_cv_eh_disposition" 1>&6 -if test "$tcl_cv_eh_disposition" = "no" ; then - cat >> confdefs.h <<\EOF -#define EXCEPTION_DISPOSITION int + if test "$tcl_ok" = "yes"; then + echo "$ac_t""yes" 1>&6 + TCL_THREADS=1 + cat >> confdefs.h <<\EOF +#define TCL_THREADS 1 EOF -fi - + # USE_THREAD_ALLOC tells us to try the special thread-based + # allocator that significantly reduces lock contention + cat >> confdefs.h <<\EOF +#define USE_THREAD_ALLOC 1 +EOF -# Check to see if the winsock2.h include file provided contains -# typedefs like LPFN_ACCEPT and friends. -# -echo $ac_n "checking for LPFN_ACCEPT support in winsock2.h""... $ac_c" 1>&6 -echo "configure:1087: checking for LPFN_ACCEPT support in winsock2.h" >&5 -if eval "test \"`echo '$''{'tcl_cv_lpfn_decls'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&6 + fi + -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#include -int main() { +#-------------------------------------------------------------------- +# The statements below define a collection of symbols related to +# building libtcl as a shared library instead of a static library. +#-------------------------------------------------------------------- - LPFN_ACCEPT accept; -; return 0; } -EOF -if { (eval echo configure:1106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_lpfn_decls=yes + echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 +echo "configure:1107: checking how to build libraries" >&5 + # Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_cv_lpfn_decls=no + tcl_ok=yes fi -rm -f conftest* -fi -echo "$ac_t""$tcl_cv_lpfn_decls" 1>&6 -if test "$tcl_cv_lpfn_decls" = "no" ; then - cat >> confdefs.h <<\EOF -#define HAVE_NO_LPFN_DECLS 1 + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + echo "$ac_t""shared" 1>&6 + SHARED_BUILD=1 + else + echo "$ac_t""static" 1>&6 + SHARED_BUILD=0 + cat >> confdefs.h <<\EOF +#define STATIC_BUILD 1 EOF -fi + fi -# Check to see if winnt.h defines CHAR, SHORT, and LONG -# even if VOID has already been #defined. The win32api -# used by mingw and cygwin is known to do this. -echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6 -echo "configure:1132: checking for winnt.h that ignores VOID define" >&5 -if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#undef WIN32_LEAN_AND_MEAN -int main() { - CHAR c; - SHORT s; - LONG l; + # Step 0: Enable 64 bit support? -; return 0; } -EOF -if { (eval echo configure:1153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_winnt_ignore_void=yes + echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 +echo "configure:1148: checking if 64bit support is requested" >&5 + # Check whether --enable-64bit or --disable-64bit was given. +if test "${enable_64bit+set}" = set; then + enableval="$enable_64bit" + do64bit=$enableval else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_cv_winnt_ignore_void=no + do64bit=no fi -rm -f conftest* -fi + echo "$ac_t""$do64bit" 1>&6 -echo "$ac_t""$tcl_cv_winnt_ignore_void" 1>&6 -if test "$tcl_cv_winnt_ignore_void" = "yes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_WINNT_IGNORE_VOID 1 -EOF + # Cross-compiling options for Windows/CE builds + echo $ac_n "checking if Windows/CE build is requested""... $ac_c" 1>&6 +echo "configure:1162: checking if Windows/CE build is requested" >&5 + # Check whether --enable-wince or --disable-wince was given. +if test "${enable_wince+set}" = set; then + enableval="$enable_wince" + doWince=$enableval +else + doWince=no fi -# Check to see if malloc.h is missing the alloca function -# declaration. This is known to be a problem with Mingw. -# If we compiled without the function declaration, it -# would work but we would get a warning message from gcc. -# If we add the function declaration ourselves, it -# would not compile correctly because the _alloca -# function expects the argument to be passed in a -# register and not on the stack. Instead, we just -# call it from inline asm code. + echo "$ac_t""$doWince" 1>&6 -echo $ac_n "checking for alloca declaration in malloc.h""... $ac_c" 1>&6 -echo "configure:1185: checking for alloca declaration in malloc.h" >&5 -if eval "test \"`echo '$''{'tcl_cv_malloc_decl_alloca'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo $ac_n "checking for Windows/CE celib directory""... $ac_c" 1>&6 +echo "configure:1174: checking for Windows/CE celib directory" >&5 + # Check whether --with-celib or --without-celib was given. +if test "${with_celib+set}" = set; then + withval="$with_celib" + CELIB_DIR=$withval else - cat > conftest.$ac_ext < + CELIB_DIR=NO_CELIB +fi -int main() { + echo "$ac_t""$CELIB_DIR" 1>&6 - size_t arg = 0; - void* ptr; - ptr = alloca; - ptr = alloca(arg); + # Set some defaults (may get changed below) + EXTRA_CFLAGS="" -; return 0; } -EOF -if { (eval echo configure:1204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_malloc_decl_alloca=yes + # Extract the first word of "cygpath", so it can be a program name with args. +set dummy cygpath; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1191: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_cv_malloc_decl_alloca=no + if test -n "$CYGPATH"; then + ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CYGPATH="cygpath -w" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" fi -rm -f conftest* - +fi +CYGPATH="$ac_cv_prog_CYGPATH" +if test -n "$CYGPATH"; then + echo "$ac_t""$CYGPATH" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -echo "$ac_t""$tcl_cv_malloc_decl_alloca" 1>&6 -if test "$tcl_cv_malloc_decl_alloca" = "no" && - test "${GCC}" = "yes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_GCC_INLINE 1 -EOF -fi + SHLIB_SUFFIX=".dll" -# See if the compiler supports casting to a union type. -# This is used to stop gcc from printing a compiler -# warning when initializing a union member. + # MACHINE is IX86 for LINK, but this is used by the manifest, + # which requires x86|amd64|ia64. + MACHINE="X86" -echo $ac_n "checking for cast to union support""... $ac_c" 1>&6 -echo "configure:1231: 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 < $conftest + echo "101 \"name\"" >> $conftest + echo "END" >> $conftest - union foo { int i; double d; }; - union foo f = (union foo) (int) 0; + echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6 +echo "configure:1239: checking for Windows native path bug in windres" >&5 + cyg_conftest=`$CYGPATH $conftest` + if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then + echo "$ac_t""no" 1>&6 + else + echo "$ac_t""yes" 1>&6 + CYGPATH=echo + fi + conftest= + cyg_conftest= + fi -; return 0; } -EOF -if { (eval echo configure:1246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_cast_to_union=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_cv_cast_to_union=no -fi -rm -f conftest* + if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then + DEPARG='"$<"' + else + DEPARG='"$(shell $(CYGPATH) $<)"' + fi -fi + # set various compiler flags depending on whether we are using gcc or cl -echo "$ac_t""$tcl_cv_cast_to_union" 1>&6 -if test "$tcl_cv_cast_to_union" = "yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_CAST_TO_UNION 1 -EOF + echo $ac_n "checking compiler flags""... $ac_c" 1>&6 +echo "configure:1260: checking compiler flags" >&5 + if test "${GCC}" = "yes" ; then + SHLIB_LD="" + SHLIB_LD_LIBS="" + LIBS="" + LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32" + STLIB_LD='${AR} cr' + RC_OUT=-o + RC_TYPE= + RC_INCLUDE=--include + RC_DEFINE=--define + RES=res.o + MAKE_LIB="\${STLIB_LD} \$@" + POST_MAKE_LIB="\${RANLIB} \$@" + MAKE_EXE="\${CC} -o \$@" + LIBPREFIX="lib" -fi + extra_cflags="-pipe" + extra_ldflags="-pipe" -#-------------------------------------------------------------------- -# Determines the correct binary file extension (.o, .obj, .exe etc.) -#-------------------------------------------------------------------- + if test "$ac_cv_cygwin" != "yes"; then + case "$do64bit" in + amd64|x64|yes) + CC="x86_64-w64-mingw32-gcc" + LD="x86_64-w64-mingw32-ld" + AR="x86_64-w64-mingw32-ar" + RANLIB="x86_64-w64-mingw32-ranlib" + RC="x86_64-w64-mingw32-windres" + ;; + *) + CC="i686-w64-mingw32-gcc" + LD="i686-w64-mingw32-ld" + AR="i686-w64-mingw32-ar" + RANLIB="i686-w64-mingw32-ranlib" + RC="i686-w64-mingw32-windres" + ;; + esac + fi -echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1272: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -fi -rm -f conftest* -fi + if test "${SHARED_BUILD}" = "0" ; then + # static + echo "$ac_t""using static flags" 1>&6 + runtime= + MAKE_DLL="echo " + LIBSUFFIX="s\${DBGX}.a" + LIBFLAGSUFFIX="s\${DBGX}" + LIBRARIES="\${STATIC_LIBRARIES}" + EXESUFFIX="s\${DBGX}.exe" + else + # dynamic + echo "$ac_t""using shared flags" 1>&6 -echo "$ac_t""$ac_cv_objext" 1>&6 -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext + # ad-hoc check to see if CC supports -shared. + if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then + { echo "configure: error: ${CC} does not support the -shared option. + You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; } + fi -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1296: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi + LIBSUFFIX="\${DBGX}.a" + LIBFLAGSUFFIX="\${DBGX}" + EXESUFFIX="\${DBGX}.exe" + LIBRARIES="\${SHARED_LIBRARIES}" + fi + # DLLSUFFIX is separate because it is the building block for + # users of tclConfig.sh that may build shared or static. + DLLSUFFIX="\${DBGX}.dll" + SHLIB_SUFFIX=.dll -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes + EXTRA_CFLAGS="${extra_cflags}" + CFLAGS_DEBUG=-g + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" + CFLAGS_WARNING="-Wall -fno-strict-aliasing" + LDFLAGS_DEBUG= + LDFLAGS_OPTIMIZE= -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1327: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -fi -fi - -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT + # Specify the CC output file names based on the target name + CC_OBJNAME="-o \$@" + CC_EXENAME="-o \$@" + # Specify linker flags depending on the type of app being + # built -- Console vs. Window. + # + # ORIGINAL COMMENT: + # We need to pass -e _WinMain@16 so that ld will use + # WinMain() instead of main() as the entry point. We can't + # use autoconf to check for this case since it would need + # to run an executable and that does not work when + # cross compiling. Remove this -e workaround once we + # require a gcc that does not have this bug. + # + # MK NOTE: Tk should use a different mechanism. This causes + # interesting problems, such as wish dying at startup. + #LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" + LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" + LDFLAGS_WINDOW="-mwindows ${extra_ldflags}" -#-------------------------------------------------------------------- -# Check whether --enable-threads or --disable-threads was given. -#-------------------------------------------------------------------- + case "$do64bit" in + amd64|x64|yes) + MACHINE="AMD64" ; # assume AMD64 as default 64-bit build + echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 + ;; + ia64) + MACHINE="IA64" + echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 + ;; + *) + cat > conftest.$ac_ext <&6 -echo "configure:1364: checking for building with threads" >&5 - # Check whether --enable-threads or --disable-threads was given. -if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval +; return 0; } +EOF +if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_win_64bit=no else - tcl_ok=no + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_win_64bit=yes + fi +rm -f conftest* + if test "$tcl_win_64bit" = "yes" ; then + do64bit=amd64 + MACHINE="AMD64" + echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 + fi + ;; + esac + else + if test "${SHARED_BUILD}" = "0" ; then + # static + echo "$ac_t""using static flags" 1>&6 + runtime=-MT + MAKE_DLL="echo " + LIBSUFFIX="s\${DBGX}.lib" + LIBFLAGSUFFIX="s\${DBGX}" + LIBRARIES="\${STATIC_LIBRARIES}" + EXESUFFIX="s\${DBGX}.exe" + SHLIB_LD_LIBS="" + else + # dynamic + echo "$ac_t""using shared flags" 1>&6 + runtime=-MD + # Add SHLIB_LD_LIBS to the Make rule, not here. + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" + LIBSUFFIX="\${DBGX}.lib" + LIBFLAGSUFFIX="\${DBGX}" + EXESUFFIX="\${DBGX}.exe" + LIBRARIES="\${SHARED_LIBRARIES}" + SHLIB_LD_LIBS='${LIBS}' + fi + # DLLSUFFIX is separate because it is the building block for + # users of tclConfig.sh that may build shared or static. + DLLSUFFIX="\${DBGX}.dll" + # This is a 2-stage check to make sure we have the 64-bit SDK + # We have to know where the SDK is installed. + # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs + if test "$do64bit" != "no" ; then + if test "x${MSSDK}x" = "xx" ; then + MSSDK="C:/Progra~1/Microsoft Platform SDK" + fi + MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` + PATH64="" + case "$do64bit" in + amd64|x64|yes) + MACHINE="AMD64" ; # assume AMD64 as default 64-bit build + PATH64="${MSSDK}/Bin/Win64/x86/AMD64" + ;; + ia64) + MACHINE="IA64" + PATH64="${MSSDK}/Bin/Win64" + ;; + esac + if test ! -d "${PATH64}" ; then + echo "configure: warning: Could not find 64-bit $MACHINE SDK to enable 64bit mode" 1>&2 + echo "configure: warning: Ensure latest Platform SDK is installed" 1>&2 + do64bit="no" + else + echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 + fi + fi - if test "$tcl_ok" = "yes"; then - echo "$ac_t""yes" 1>&6 - TCL_THREADS=1 - cat >> confdefs.h <<\EOF -#define TCL_THREADS 1 + LIBS="user32.lib advapi32.lib" + if test "$do64bit" != "no" ; then + # The space-based-path will work for the Makefile, but will + # not work if AC_TRY_COMPILE is called. TEA has the + # TEA_PATH_NOSPACE to avoid this issue. + CC="${PATH64}/cl.exe" + CFLAGS="-I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\" ${CFLAGS}" + RC="${MSSDK}/bin/rc.exe" + CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" + # Do not use -O2 for Win64 - this has proved buggy in code gen. + CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" + lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + LINKBIN="${PATH64}/link.exe" + # Avoid 'unresolved external symbol __security_cookie' errors. + # c.f. http://support.microsoft.com/?id=894573 + LIBS="$LIBS bufferoverflowU.lib" + else + RC="rc" + # -Od - no optimization + # -WX - warnings as errors + CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" + # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) + CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" + lflags="-nologo" + LINKBIN="link" + fi + + if test "$doWince" != "no" ; then + # Set defaults for common evc4/PPC2003 setup + # Currently Tcl requires 300+, possibly 420+ for sockets + CEVERSION=420; # could be 211 300 301 400 420 ... + TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... + ARCH=ARM; # could be ARM MIPS X86EM ... + PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" + if test "$doWince" != "yes"; then + # If !yes then the user specified something + # Reset ARCH to allow user to skip specifying it + ARCH= + eval `echo $doWince | awk -F "," '{ \ + if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \ + if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ + if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \ + if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \ + if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \ + }'` + if test "x${ARCH}" = "x" ; then + ARCH=$TARGETCPU; + fi + fi + OSVERSION=WCE$CEVERSION; + if test "x${WCEROOT}" = "x" ; then + WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" + if test ! -d "${WCEROOT}" ; then + WCEROOT="C:/Program Files/Microsoft eMbedded Tools" + fi + fi + if test "x${SDKROOT}" = "x" ; then + SDKROOT="C:/Program Files/Windows CE Tools" + if test ! -d "${SDKROOT}" ; then + SDKROOT="C:/Windows CE Tools" + fi + fi + # The space-based-path will work for the Makefile, but will + # not work if AC_TRY_COMPILE is called. + WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` + SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` + CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` + if test ! -d "${CELIB_DIR}/inc"; then + { echo "configure: error: Invalid celib directory "${CELIB_DIR}"" 1>&2; exit 1; } + fi + if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\ + -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then + { echo "configure: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" 1>&2; exit 1; } + else + CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" + if test -d "${CEINCLUDE}/${TARGETCPU}" ; then + CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" + fi + CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" + fi + fi + + if test "$doWince" != "no" ; then + CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" + if test "${TARGETCPU}" = "X86"; then + CC="${CEBINROOT}/cl.exe" + else + CC="${CEBINROOT}/cl${ARCH}.exe" + fi + CC="\"${CC}\" -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" + RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" + arch=`echo ${ARCH} | awk '{print tolower($0)}'` + defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _DLL _WINDOWS" + for i in $defs ; do + cat >> confdefs.h <> confdefs.h <<\EOF -#define USE_THREAD_ALLOC 1 + done +# if test "${ARCH}" = "X86EM"; then +# AC_DEFINE_UNQUOTED(_WIN32_WCE_EMULATION) +# fi + cat >> confdefs.h <&6 - fi - + cat >> confdefs.h <&6 -echo "configure:1401: checking how to build libraries" >&5 - # Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval -else - tcl_ok=yes -fi + EXTRA_CFLAGS="" + CFLAGS_WARNING="-W3" + LDFLAGS_DEBUG="-debug" + LDFLAGS_OPTIMIZE="-release" + # Specify the CC output file names based on the target name + CC_OBJNAME="-Fo\$@" + CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\"" - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes + # Specify linker flags depending on the type of app being + # built -- Console vs. Window. + if test "$doWince" != "no" -a "${TARGETCPU}" != "X86"; then + LDFLAGS_CONSOLE="-link ${lflags}" + LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} + else + LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" + LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" + fi fi - if test "$tcl_ok" = "yes" ; then - echo "$ac_t""shared" 1>&6 - SHARED_BUILD=1 - else - echo "$ac_t""static" 1>&6 - SHARED_BUILD=0 - cat >> confdefs.h <<\EOF -#define STATIC_BUILD 1 -EOF - - fi + # DL_LIBS is empty, but then we match the Unix version + + + + #-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This -# macro depends on the value of SHARED_BUILD, and should be called -# after SC_ENABLE_SHARED checks the configure switches. +# Perform additinal compiler tests. #-------------------------------------------------------------------- +echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6 +echo "configure:1639: checking for SEH support in compiler" >&5 +if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + tcl_cv_seh=no +else + cat > conftest.$ac_ext < +#undef WIN32_LEAN_AND_MEAN - # Step 0: Enable 64 bit support? +int main(int argc, char** argv) { + int a, b = 0; + __try { + a = 666 / b; + } + __except (EXCEPTION_EXECUTE_HANDLER) { + return 0; + } + return 1; +} - echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 -echo "configure:1442: checking if 64bit support is requested" >&5 - # Check whether --enable-64bit or --disable-64bit was given. -if test "${enable_64bit+set}" = set; then - enableval="$enable_64bit" - do64bit=$enableval +EOF +if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + tcl_cv_seh=yes else - do64bit=no + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + tcl_cv_seh=no +fi +rm -fr conftest* fi - echo "$ac_t""$do64bit" 1>&6 - # Cross-compiling options for Windows/CE builds +fi + +echo "$ac_t""$tcl_cv_seh" 1>&6 +if test "$tcl_cv_seh" = "no" ; then + cat >> confdefs.h <<\EOF +#define HAVE_NO_SEH 1 +EOF - echo $ac_n "checking if Windows/CE build is requested""... $ac_c" 1>&6 -echo "configure:1456: checking if Windows/CE build is requested" >&5 - # Check whether --enable-wince or --disable-wince was given. -if test "${enable_wince+set}" = set; then - enableval="$enable_wince" - doWince=$enableval -else - doWince=no fi - echo "$ac_t""$doWince" 1>&6 +# +# Check to see if the excpt.h include file provided contains the +# definition for EXCEPTION_DISPOSITION; if not, which is the case +# with Cygwin's version as of 2002-04-10, define it to be int, +# sufficient for getting the current code to work. +# +echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6 +echo "configure:1696: checking for EXCEPTION_DISPOSITION support in include files" >&5 +if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&6 -echo "configure:1468: checking for Windows/CE celib directory" >&5 - # Check whether --with-celib or --without-celib was given. -if test "${with_celib+set}" = set; then - withval="$with_celib" - CELIB_DIR=$withval +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + +int main() { + + EXCEPTION_DISPOSITION x; + +; return 0; } +EOF +if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_eh_disposition=yes else - CELIB_DIR=NO_CELIB + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_eh_disposition=no fi +rm -f conftest* - echo "$ac_t""$CELIB_DIR" 1>&6 +fi + +echo "$ac_t""$tcl_cv_eh_disposition" 1>&6 +if test "$tcl_cv_eh_disposition" = "no" ; then + cat >> confdefs.h <<\EOF +#define EXCEPTION_DISPOSITION int +EOF + +fi - # Set some defaults (may get changed below) - EXTRA_CFLAGS="" - # Extract the first word of "cygpath", so it can be a program name with args. -set dummy cygpath; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1485: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then +# Check to see if the winsock2.h include file provided contains +# typedefs like LPFN_ACCEPT and friends. +# +echo $ac_n "checking for LPFN_ACCEPT support in winsock2.h""... $ac_c" 1>&6 +echo "configure:1740: checking for LPFN_ACCEPT support in winsock2.h" >&5 +if eval "test \"`echo '$''{'tcl_cv_lpfn_decls'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$CYGPATH"; then - ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CYGPATH="cygpath -w" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" -fi -fi -CYGPATH="$ac_cv_prog_CYGPATH" -if test -n "$CYGPATH"; then - echo "$ac_t""$CYGPATH" 1>&6 + cat > conftest.$ac_ext < +#undef WIN32_LEAN_AND_MEAN +#include + +int main() { + + LPFN_ACCEPT accept; + +; return 0; } +EOF +if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_lpfn_decls=yes else - echo "$ac_t""no" 1>&6 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_lpfn_decls=no fi +rm -f conftest* +fi - SHLIB_SUFFIX=".dll" +echo "$ac_t""$tcl_cv_lpfn_decls" 1>&6 +if test "$tcl_cv_lpfn_decls" = "no" ; then + cat >> confdefs.h <<\EOF +#define HAVE_NO_LPFN_DECLS 1 +EOF - # MACHINE is IX86 for LINK, but this is used by the manifest, - # which requires x86|amd64|ia64. - MACHINE="X86" +fi - # Check for a bug in gcc's windres that causes the - # compile to fail when a Windows native path is - # passed into windres. The mingw toolchain requires - # Windows native paths while Cygwin should work - # with both. Avoid the bug by passing a POSIX - # path when using the Cygwin toolchain. +# Check to see if winnt.h defines CHAR, SHORT, and LONG +# even if VOID has already been #defined. The win32api +# used by mingw and cygwin is known to do this. - if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then - conftest=/tmp/conftest.rc - echo "STRINGTABLE BEGIN" > $conftest - echo "101 \"name\"" >> $conftest - echo "END" >> $conftest +echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6 +echo "configure:1785: checking for winnt.h that ignores VOID define" >&5 +if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&6 -echo "configure:1533: checking for Windows native path bug in windres" >&5 - cyg_conftest=`$CYGPATH $conftest` - if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then - echo "$ac_t""no" 1>&6 - else - echo "$ac_t""yes" 1>&6 - CYGPATH=echo - fi - conftest= - cyg_conftest= - fi +#define VOID void +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN - if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then - DEPARG='"$<"' - else - DEPARG='"$(shell $(CYGPATH) $<)"' - fi +int main() { - # set various compiler flags depending on whether we are using gcc or cl + CHAR c; + SHORT s; + LONG l; - echo $ac_n "checking compiler flags""... $ac_c" 1>&6 -echo "configure:1554: checking compiler flags" >&5 - if test "${GCC}" = "yes" ; then - SHLIB_LD="" - SHLIB_LD_LIBS="" - LIBS="" - LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32" - STLIB_LD='${AR} cr' - RC_OUT=-o - RC_TYPE= - RC_INCLUDE=--include - RC_DEFINE=--define - RES=res.o - MAKE_LIB="\${STLIB_LD} \$@" - POST_MAKE_LIB="\${RANLIB} \$@" - MAKE_EXE="\${CC} -o \$@" - LIBPREFIX="lib" +; return 0; } +EOF +if { (eval echo configure:1806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_winnt_ignore_void=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_winnt_ignore_void=no +fi +rm -f conftest* - extra_cflags="-pipe" - extra_ldflags="-pipe" +fi - if test "$ac_cv_cygwin" = "yes"; then - touch ac$$.c - if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then - case "$extra_cflags" in - *-mwin32*) ;; - *) extra_cflags="-mwin32 $extra_cflags" ;; - esac - case "$extra_ldflags" in - *-mwin32*) ;; - *) extra_ldflags="-mwin32 $extra_ldflags" ;; - esac - fi - rm -f ac$$.o ac$$.c - fi +echo "$ac_t""$tcl_cv_winnt_ignore_void" 1>&6 +if test "$tcl_cv_winnt_ignore_void" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_WINNT_IGNORE_VOID 1 +EOF - if test "${SHARED_BUILD}" = "0" ; then - # static - echo "$ac_t""using static flags" 1>&6 - runtime= - MAKE_DLL="echo " - LIBSUFFIX="s\${DBGX}.a" - LIBFLAGSUFFIX="s\${DBGX}" - LIBRARIES="\${STATIC_LIBRARIES}" - EXESUFFIX="s\${DBGX}.exe" - else - # dynamic - echo "$ac_t""using shared flags" 1>&6 +fi - # ad-hoc check to see if CC supports -shared. - if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then - { echo "configure: error: ${CC} does not support the -shared option. - You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; } - fi +# Check to see if malloc.h is missing the alloca function +# declaration. This is known to be a problem with Mingw. +# If we compiled without the function declaration, it +# would work but we would get a warning message from gcc. +# If we add the function declaration ourselves, it +# would not compile correctly because the _alloca +# function expects the argument to be passed in a +# register and not on the stack. Instead, we just +# call it from inline asm code. - runtime= - # Link with gcc since ld does not link to default libs like - # -luser32 and -lmsvcrt by default. Make sure CFLAGS is - # included so -mno-cygwin passed the correct libs to the linker. - SHLIB_LD='${CC} -shared ${CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' - # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" +echo $ac_n "checking for alloca declaration in malloc.h""... $ac_c" 1>&6 +echo "configure:1838: checking for alloca declaration in malloc.h" >&5 +if eval "test \"`echo '$''{'tcl_cv_malloc_decl_alloca'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < - EXTRA_CFLAGS="${extra_cflags}" +int main() { - CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -fno-strict-aliasing" - LDFLAGS_DEBUG= - LDFLAGS_OPTIMIZE= + size_t arg = 0; + void* ptr; + ptr = alloca; + ptr = alloca(arg); - # Specify the CC output file names based on the target name - CC_OBJNAME="-o \$@" - CC_EXENAME="-o \$@" +; return 0; } +EOF +if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_malloc_decl_alloca=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_malloc_decl_alloca=no +fi +rm -f conftest* - # Specify linker flags depending on the type of app being - # built -- Console vs. Window. - # - # ORIGINAL COMMENT: - # We need to pass -e _WinMain@16 so that ld will use - # WinMain() instead of main() as the entry point. We can't - # use autoconf to check for this case since it would need - # to run an executable and that does not work when - # cross compiling. Remove this -e workaround once we - # require a gcc that does not have this bug. - # - # MK NOTE: Tk should use a different mechanism. This causes - # interesting problems, such as wish dying at startup. - #LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}" - LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}" - LDFLAGS_WINDOW="-mwindows ${extra_ldflags}" +fi - case "$do64bit" in - amd64|x64|yes) - MACHINE="AMD64" ; # assume AMD64 as default 64-bit build - echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 - ;; - ia64) - MACHINE="IA64" - echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 - ;; - *) - cat > conftest.$ac_ext <&6 +if test "$tcl_cv_malloc_decl_alloca" = "no" && + test "${GCC}" = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_GCC_INLINE 1 +EOF + +fi + +# See if the compiler supports casting to a union type. +# This is used to stop gcc from printing a compiler +# warning when initializing a union member. + +echo $ac_n "checking for cast to union support""... $ac_c" 1>&6 +echo "configure:1884: 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:1899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - tcl_win_64bit=no + tcl_cv_cast_to_union=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_win_64bit=yes - + tcl_cv_cast_to_union=no fi rm -f conftest* - if test "$tcl_win_64bit" = "yes" ; then - do64bit=amd64 - MACHINE="AMD64" - echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 - fi - ;; - esac - else - if test "${SHARED_BUILD}" = "0" ; then - # static - echo "$ac_t""using static flags" 1>&6 - runtime=-MT - MAKE_DLL="echo " - LIBSUFFIX="s\${DBGX}.lib" - LIBFLAGSUFFIX="s\${DBGX}" - LIBRARIES="\${STATIC_LIBRARIES}" - EXESUFFIX="s\${DBGX}.exe" - SHLIB_LD_LIBS="" - else - # dynamic - echo "$ac_t""using shared flags" 1>&6 - runtime=-MD - # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" - LIBSUFFIX="\${DBGX}.lib" - LIBFLAGSUFFIX="\${DBGX}" - EXESUFFIX="\${DBGX}.exe" - LIBRARIES="\${SHARED_LIBRARIES}" - SHLIB_LD_LIBS='${LIBS}' - fi - # DLLSUFFIX is separate because it is the building block for - # users of tclConfig.sh that may build shared or static. - DLLSUFFIX="\${DBGX}.dll" - - # This is a 2-stage check to make sure we have the 64-bit SDK - # We have to know where the SDK is installed. - # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs - if test "$do64bit" != "no" ; then - if test "x${MSSDK}x" = "xx" ; then - MSSDK="C:/Progra~1/Microsoft Platform SDK" - fi - MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` - PATH64="" - case "$do64bit" in - amd64|x64|yes) - MACHINE="AMD64" ; # assume AMD64 as default 64-bit build - PATH64="${MSSDK}/Bin/Win64/x86/AMD64" - ;; - ia64) - MACHINE="IA64" - PATH64="${MSSDK}/Bin/Win64" - ;; - esac - if test ! -d "${PATH64}" ; then - echo "configure: warning: Could not find 64-bit $MACHINE SDK to enable 64bit mode" 1>&2 - echo "configure: warning: Ensure latest Platform SDK is installed" 1>&2 - do64bit="no" - else - echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6 - fi - fi - - LIBS="user32.lib advapi32.lib" - if test "$do64bit" != "no" ; then - # The space-based-path will work for the Makefile, but will - # not work if AC_TRY_COMPILE is called. TEA has the - # TEA_PATH_NOSPACE to avoid this issue. - CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ - -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" - RC="\"${MSSDK}/bin/rc.exe\"" - CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" - # Do not use -O2 for Win64 - this has proved buggy in code gen. - CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" - LINKBIN="\"${PATH64}/link.exe\"" - # Avoid 'unresolved external symbol __security_cookie' errors. - # c.f. http://support.microsoft.com/?id=894573 - LIBS="$LIBS bufferoverflowU.lib" - else - RC="rc" - # -Od - no optimization - # -WX - warnings as errors - CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" - # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) - CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" - lflags="-nologo" - LINKBIN="link" - fi - - if test "$doWince" != "no" ; then - # Set defaults for common evc4/PPC2003 setup - # Currently Tcl requires 300+, possibly 420+ for sockets - CEVERSION=420; # could be 211 300 301 400 420 ... - TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... - ARCH=ARM; # could be ARM MIPS X86EM ... - PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" - if test "$doWince" != "yes"; then - # If !yes then the user specified something - # Reset ARCH to allow user to skip specifying it - ARCH= - eval `echo $doWince | awk -F "," '{ \ - if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \ - if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ - if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \ - if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \ - if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \ - }'` - if test "x${ARCH}" = "x" ; then - ARCH=$TARGETCPU; - fi - fi - OSVERSION=WCE$CEVERSION; - if test "x${WCEROOT}" = "x" ; then - WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" - if test ! -d "${WCEROOT}" ; then - WCEROOT="C:/Program Files/Microsoft eMbedded Tools" - fi - fi - if test "x${SDKROOT}" = "x" ; then - SDKROOT="C:/Program Files/Windows CE Tools" - if test ! -d "${SDKROOT}" ; then - SDKROOT="C:/Windows CE Tools" - fi - fi - # The space-based-path will work for the Makefile, but will - # not work if AC_TRY_COMPILE is called. - WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` - SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` - CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` - if test ! -d "${CELIB_DIR}/inc"; then - { echo "configure: error: Invalid celib directory "${CELIB_DIR}"" 1>&2; exit 1; } - fi - if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\ - -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then - { echo "configure: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" 1>&2; exit 1; } - else - CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" - if test -d "${CEINCLUDE}/${TARGETCPU}" ; then - CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" - fi - CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" - fi - fi - - if test "$doWince" != "no" ; then - CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" - if test "${TARGETCPU}" = "X86"; then - CC="${CEBINROOT}/cl.exe" - else - CC="${CEBINROOT}/cl${ARCH}.exe" - fi - CC="\"${CC}\" -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" - RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" - arch=`echo ${ARCH} | awk '{print tolower($0)}'` - defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _DLL _WINDOWS" - for i in $defs ; do - cat >> confdefs.h <> confdefs.h <> confdefs.h <&6 +if test "$tcl_cv_cast_to_union" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_CAST_TO_UNION 1 EOF - CFLAGS_DEBUG="-nologo -Zi -Od" - CFLAGS_OPTIMIZE="-nologo -O2" - lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` - lflags="-nodefaultlib -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" - LINKBIN="\"${CEBINROOT}/link.exe\"" - - if test "${CEVERSION}" -lt 400 ; then - LIBS="coredll.lib corelibc.lib winsock.lib" - else - LIBS="coredll.lib corelibc.lib ws2.lib" - fi - # celib currently stuck at wce300 status - #LIBS="$LIBS \${CELIB_DIR}/wince-${ARCH}-pocket-${OSVERSION}-release/celib.lib" - LIBS="$LIBS \"\${CELIB_DIR}/wince-${ARCH}-pocket-wce300-release/celib.lib\"" - LIBS_GUI="commctrl.lib commdlg.lib" - else - LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib" - fi - - SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}" - # link -lib only works when -lib is the first arg - STLIB_LD="${LINKBIN} -lib ${lflags}" - RC_OUT=-fo - RC_TYPE=-r - RC_INCLUDE=-i - RC_DEFINE=-d - RES=res - MAKE_LIB="\${STLIB_LD} -out:\$@" - POST_MAKE_LIB= - MAKE_EXE="\${CC} -Fe\$@" - LIBPREFIX="" - - CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" - CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" - - EXTRA_CFLAGS="" - CFLAGS_WARNING="-W3" - LDFLAGS_DEBUG="-debug" - LDFLAGS_OPTIMIZE="-release" - - # Specify the CC output file names based on the target name - CC_OBJNAME="-Fo\$@" - CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\"" - - # Specify linker flags depending on the type of app being - # built -- Console vs. Window. - if test "$doWince" != "no" -a "${TARGETCPU}" != "X86"; then - LDFLAGS_CONSOLE="-link ${lflags}" - LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} - else - LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" - LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" - fi - fi - - # DL_LIBS is empty, but then we match the Unix version - - - - - +fi #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols @@ -1928,7 +1924,7 @@ EOF echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1932: checking for build with symbols" >&5 +echo "configure:1928: 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" @@ -1988,7 +1984,7 @@ TCL_DBGX=${DBGX} #-------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1992: checking how to run the C preprocessor" >&5 +echo "configure:1988: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2003,13 +1999,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2009: \"$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 : @@ -2020,13 +2016,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2026: \"$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 : @@ -2037,13 +2033,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2043: \"$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 : @@ -2069,17 +2065,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:2073: checking for errno.h" >&5 +echo "configure:2069: checking for errno.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:2083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2079: \"$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* diff --git a/win/configure.in b/win/configure.in index 3ac39c3..588dcd6 100644 --- a/win/configure.in +++ b/win/configure.in @@ -80,17 +80,36 @@ fi AC_PROG_MAKE_SET #-------------------------------------------------------------------- -# Perform additinal compiler tests. +# Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- -AC_CYGWIN +AC_OBJEXT +AC_EXEEXT -if test "$ac_cv_cygwin" = "yes" ; then - AC_MSG_ERROR([Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw.]) -fi +#-------------------------------------------------------------------- +# Check whether --enable-threads or --disable-threads was given. +#-------------------------------------------------------------------- + +SC_ENABLE_THREADS + +#-------------------------------------------------------------------- +# The statements below define a collection of symbols related to +# building libtcl as a shared library instead of a static library. +#-------------------------------------------------------------------- + +SC_ENABLE_SHARED + +#-------------------------------------------------------------------- +# The statements below define a collection of compile flags. This +# macro depends on the value of SHARED_BUILD, and should be called +# after SC_ENABLE_SHARED checks the configure switches. +#-------------------------------------------------------------------- + +SC_CONFIG_CFLAGS +#-------------------------------------------------------------------- +# Perform additinal compiler tests. +#-------------------------------------------------------------------- AC_CACHE_CHECK(for SEH support in compiler, tcl_cv_seh, @@ -241,34 +260,6 @@ if test "$tcl_cv_cast_to_union" = "yes"; then fi #-------------------------------------------------------------------- -# Determines the correct binary file extension (.o, .obj, .exe etc.) -#-------------------------------------------------------------------- - -AC_OBJEXT -AC_EXEEXT - -#-------------------------------------------------------------------- -# Check whether --enable-threads or --disable-threads was given. -#-------------------------------------------------------------------- - -SC_ENABLE_THREADS - -#-------------------------------------------------------------------- -# The statements below define a collection of symbols related to -# building libtcl as a shared library instead of a static library. -#-------------------------------------------------------------------- - -SC_ENABLE_SHARED - -#-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This -# macro depends on the value of SHARED_BUILD, and should be called -# after SC_ENABLE_SHARED checks the configure switches. -#-------------------------------------------------------------------- - -SC_CONFIG_CFLAGS - -#-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. diff --git a/win/tcl.m4 b/win/tcl.m4 index b6241dc..794b38e 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -461,19 +461,23 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ extra_cflags="-pipe" extra_ldflags="-pipe" - if test "$ac_cv_cygwin" = "yes"; then - touch ac$$.c - if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then - case "$extra_cflags" in - *-mwin32*) ;; - *) extra_cflags="-mwin32 $extra_cflags" ;; - esac - case "$extra_ldflags" in - *-mwin32*) ;; - *) extra_ldflags="-mwin32 $extra_ldflags" ;; - esac - fi - rm -f ac$$.o ac$$.c + if test "$ac_cv_cygwin" != "yes"; then + case "$do64bit" in + amd64|x64|yes) + CC="x86_64-w64-mingw32-gcc" + LD="x86_64-w64-mingw32-ld" + AR="x86_64-w64-mingw32-ar" + RANLIB="x86_64-w64-mingw32-ranlib" + RC="x86_64-w64-mingw32-windres" + ;; + *) + CC="i686-w64-mingw32-gcc" + LD="i686-w64-mingw32-ld" + AR="i686-w64-mingw32-ar" + RANLIB="i686-w64-mingw32-ranlib" + RC="i686-w64-mingw32-windres" + ;; + esac fi if test "${SHARED_BUILD}" = "0" ; then @@ -629,14 +633,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the # TEA_PATH_NOSPACE to avoid this issue. - CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \ - -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" - RC="\"${MSSDK}/bin/rc.exe\"" + CC="${PATH64}/cl.exe" + CFLAGS="-I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\" ${CFLAGS}" + RC="${MSSDK}/bin/rc.exe" CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" - LINKBIN="\"${PATH64}/link.exe\"" + LINKBIN="${PATH64}/link.exe" # Avoid 'unresolved external symbol __security_cookie' errors. # c.f. http://support.microsoft.com/?id=894573 LIBS="$LIBS bufferoverflowU.lib" -- cgit v0.12 From 8b96a694be11a88a8921d2296d5b12e6e077216f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 24 Mar 2012 06:23:34 +0000 Subject: oops, fix cygwin check in configure --- win/configure | 8 ++++---- win/tcl.m4 | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/win/configure b/win/configure index 2cbdd29..a51b2ad 100755 --- a/win/configure +++ b/win/configure @@ -1276,7 +1276,7 @@ echo "configure:1260: checking compiler flags" >&5 extra_cflags="-pipe" extra_ldflags="-pipe" - if test "$ac_cv_cygwin" != "yes"; then + if test "$ac_cv_cygwin" = "yes"; then case "$do64bit" in amd64|x64|yes) CC="x86_64-w64-mingw32-gcc" @@ -1284,14 +1284,14 @@ echo "configure:1260: checking compiler flags" >&5 AR="x86_64-w64-mingw32-ar" RANLIB="x86_64-w64-mingw32-ranlib" RC="x86_64-w64-mingw32-windres" - ;; - *) + ;; + *) CC="i686-w64-mingw32-gcc" LD="i686-w64-mingw32-ld" AR="i686-w64-mingw32-ar" RANLIB="i686-w64-mingw32-ranlib" RC="i686-w64-mingw32-windres" - ;; + ;; esac fi diff --git a/win/tcl.m4 b/win/tcl.m4 index 794b38e..8ac0a15 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -461,7 +461,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ extra_cflags="-pipe" extra_ldflags="-pipe" - if test "$ac_cv_cygwin" != "yes"; then + if test "$ac_cv_cygwin" = "yes"; then case "$do64bit" in amd64|x64|yes) CC="x86_64-w64-mingw32-gcc" @@ -469,8 +469,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AR="x86_64-w64-mingw32-ar" RANLIB="x86_64-w64-mingw32-ranlib" RC="x86_64-w64-mingw32-windres" - ;; - *) + ;; + *) CC="i686-w64-mingw32-gcc" LD="i686-w64-mingw32-ld" AR="i686-w64-mingw32-ar" -- cgit v0.12