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 /unix/tclUnixFile.c | |
parent | 6483a5f83b04e8660d81cdd65ef3390724bd3b65 (diff) | |
parent | 9d2e439a664858bfbe32eef058ab965b1e43ce4b (diff) | |
download | tcl-7c581d9f012e8608db1a31726831bcc723a550a2.zip tcl-7c581d9f012e8608db1a31726831bcc723a550a2.tar.gz tcl-7c581d9f012e8608db1a31726831bcc723a550a2.tar.bz2 |
fix Linux build ;-(
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r-- | unix/tclUnixFile.c | 7 |
1 files changed, 3 insertions, 4 deletions
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; |