diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-06-26 14:29:09 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-06-26 14:29:09 (GMT) |
commit | d1aaa8d1d236d4780a49ddb922a31fd2d0563cda (patch) | |
tree | 7fadc2a3a6def8b08540df21a17f099f330c5c51 /unix/tclUnixFile.c | |
parent | c332bcd2aa81a4aac5d09b97a4adf7459ee14c53 (diff) | |
parent | 33ce79078f5e73a35773faee3e5522fcebafb85c (diff) | |
download | tcl-d1aaa8d1d236d4780a49ddb922a31fd2d0563cda.zip tcl-d1aaa8d1d236d4780a49ddb922a31fd2d0563cda.tar.gz tcl-d1aaa8d1d236d4780a49ddb922a31fd2d0563cda.tar.bz2 |
use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_path
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 edd0d2f..053adee 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -42,11 +42,10 @@ TclpFindExecutable( Tcl_Encoding encoding; #ifdef __CYGWIN__ int length; - char buf[PATH_MAX * TCL_UTF_MAX + 1]; + char buf[PATH_MAX * 2]; char name[PATH_MAX * TCL_UTF_MAX + 1]; - 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. */ |