diff options
| author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-04-27 14:37:37 (GMT) |
|---|---|---|
| committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-04-27 14:37:37 (GMT) |
| commit | 502c5ac1920ec1cbe96c0e9f113c4946c2dbce22 (patch) | |
| tree | cbb2ef3605bfac2d9176a53132f1329d8edcd7ac /unix/tclUnixFile.c | |
| parent | ad3fcf87aceb3e54e6c3dcccc517fd52bdef16b9 (diff) | |
| parent | 8bf5fdf9e1d9dc7f24b23a35f5a63633a376b8b7 (diff) | |
| download | tcl-502c5ac1920ec1cbe96c0e9f113c4946c2dbce22.zip tcl-502c5ac1920ec1cbe96c0e9f113c4946c2dbce22.tar.gz tcl-502c5ac1920ec1cbe96c0e9f113c4946c2dbce22.tar.bz2 | |
Move CYGWIN-specific stuff from tclPort.h to tclUnixPort.h, where it belongs
Diffstat (limited to 'unix/tclUnixFile.c')
| -rw-r--r-- | unix/tclUnixFile.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index b4a1012..a4426b7 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -39,6 +39,7 @@ TclpFindExecutable( const char *argv0) /* The value of the application's argv[0] * (native). */ { + Tcl_Encoding encoding; #ifdef __CYGWIN__ int length; char buf[PATH_MAX * TCL_UTF_MAX + 1]; @@ -46,9 +47,9 @@ TclpFindExecutable( /* Make some symbols available without including <windows.h> */ # define CP_UTF8 65001 - extern int cygwin_conv_to_full_posix_path(const char *, char *); - extern __stdcall int GetModuleFileNameW(void *, const char *, int); - extern __stdcall int WideCharToMultiByte(int, int, const char *, int, + DLLIMPORT extern int cygwin_conv_to_full_posix_path(const char *, char *); + DLLIMPORT extern __stdcall int GetModuleFileNameW(void *, const char *, int); + DLLIMPORT extern __stdcall int WideCharToMultiByte(int, int, const char *, int, const char *, int, const char *, const char *); GetModuleFileNameW(NULL, name, PATH_MAX); @@ -59,13 +60,13 @@ TclpFindExecutable( /* Strip '.exe' part. */ length -= 4; } + encoding = Tcl_GetEncoding(NULL, NULL); TclSetObjNameOfExecutable( - Tcl_NewStringObj(name, length), Tcl_GetEncoding(NULL, NULL)); + Tcl_NewStringObj(name, length), encoding); #else const char *name, *p; Tcl_StatBuf statBuf; Tcl_DString buffer, nameString, cwd, utfName; - Tcl_Encoding encoding; if (argv0 == NULL) { return; |
