diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-06-26 14:09:25 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-06-26 14:09:25 (GMT) |
commit | 6fc2a8b47a08195e3f916039adda4ae7af62fe0a (patch) | |
tree | 2a871a2269a4128aff89efd529ac189336f29fcd /unix/tclUnixFile.c | |
parent | 8666b09df7112b7cbdb20a80cbfee88329c8ba50 (diff) | |
download | tcl-6fc2a8b47a08195e3f916039adda4ae7af62fe0a.zip tcl-6fc2a8b47a08195e3f916039adda4ae7af62fe0a.tar.gz tcl-6fc2a8b47a08195e3f916039adda4ae7af62fe0a.tar.bz2 |
use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_path
FossilOrigin-Name: bf8c3e8ec6d204c22fdc7521c1b39d823670a823
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 56acf6c..73237c5 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -48,7 +48,7 @@ TclpFindExecutable(argv0) { int length; #ifdef __CYGWIN__ - char buf[PATH_MAX * TCL_UTF_MAX + 1]; + char buf[PATH_MAX * 2]; char name[PATH_MAX * TCL_UTF_MAX + 1]; #else CONST char *name, *p; @@ -61,9 +61,8 @@ TclpFindExecutable(argv0) } #ifdef __CYGWIN__ - GetModuleFileNameW(NULL, name, PATH_MAX); - WideCharToMultiByte(CP_UTF8, 0, name, -1, buf, PATH_MAX, NULL, NULL); - cygwin_conv_to_full_posix_path(buf, name); + GetModuleFileNameW(NULL, buf, PATH_MAX); + cygwin_conv_path(3, buf, name, PATH_MAX); length = strlen(name); if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) { /* Strip '.exe' part. */ |