diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-26 14:31:02 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-26 14:31:02 (GMT) |
commit | f18232040af804d53027a32d7d550dcda57a7f0e (patch) | |
tree | d9d14949559023cffce9873d2e33742a7b7c13e1 /unix/tclUnixFile.c | |
parent | 170f9fa2afe412f97e0c3a82a5cdd2a9b33cfffb (diff) | |
parent | 5537e62301b5a43914709690bbe199684082b049 (diff) | |
download | tcl-f18232040af804d53027a32d7d550dcda57a7f0e.zip tcl-f18232040af804d53027a32d7d550dcda57a7f0e.tar.gz tcl-f18232040af804d53027a32d7d550dcda57a7f0e.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 1c456a0..0c68d64 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. */ |