diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-26 13:00:21 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-26 13:00:21 (GMT) |
commit | 7c581d9f012e8608db1a31726831bcc723a550a2 (patch) | |
tree | 5dbc707fcb9bf6d847e38eef2fec91a9d503b03b | |
parent | 6483a5f83b04e8660d81cdd65ef3390724bd3b65 (diff) | |
parent | 9d2e439a664858bfbe32eef058ab965b1e43ce4b (diff) | |
download | tcl-7c581d9f012e8608db1a31726831bcc723a550a2.zip tcl-7c581d9f012e8608db1a31726831bcc723a550a2.tar.gz tcl-7c581d9f012e8608db1a31726831bcc723a550a2.tar.bz2 |
fix Linux build ;-(
-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; |