diff options
-rw-r--r-- | generic/tclPort.h | 2 | ||||
-rw-r--r-- | generic/tclStubInit.c | 3 | ||||
-rw-r--r-- | unix/tclUnixFile.c | 7 |
3 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclPort.h b/generic/tclPort.h index 79bea88..d9361ca 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.h @@ -35,7 +35,7 @@ DLLIMPORT extern int cygwin_conv_to_win32_path(const char *, char *); DLLIMPORT extern int cygwin_posix_to_win32_path_list_buf_size(char *value); DLLIMPORT extern void cygwin_posix_to_win32_path_list(char *buf, char *value); - DLLIMPORT extern void __stdcall SetEnvironmentVariableA(const char*, const char *); + //DLLIMPORT extern void __stdcall SetEnvironmentVariableA(const char*, const char *); #endif #if !defined(LLONG_MIN) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index e54db0e..9bcf01c 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -201,6 +201,9 @@ Tcl_WinTCharToUtf( # define TclWinResetInterfaces 0 # define TclpGetPid 0 # ifndef MAC_OSX_TCL +# define TclMacOSXMatchType 0 +# define TclMacOSXNotifierAddRunLoopMode 0 +# define TclMacOSXGetFileAttribute 0 # define Tcl_MacOSXOpenBundleResources 0 # define Tcl_MacOSXOpenVersionedBundleResources 0 # endif diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 0b8aaf9..c187e0e 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -40,13 +40,13 @@ TclpFindExecutable( * (native). */ { #ifdef __CYGWIN__ + int length; char buf[PATH_MAX * TCL_UTF_MAX + 1]; char name[PATH_MAX * TCL_UTF_MAX + 1]; #else const char *name, *p; Tcl_StatBuf statBuf; Tcl_DString buffer, nameString, cwd, utfName; - Tcl_Encoding encoding; #endif #ifdef __CYGWIN__ @@ -66,9 +66,8 @@ TclpFindExecutable( /* Strip '.exe' part. */ length -= 4; } - tclNativeExecutableName = (char *) ckalloc(length + 1); - memcpy(tclNativeExecutableName, name, length); - buf[length] = '\0'; + TclSetObjNameOfExecutable( + Tcl_NewStringObj(name, length), Tcl_GetEncoding(NULL, NULL)); #else if (argv0 == NULL) { return; |