diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-26 14:29:09 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-26 14:29:09 (GMT) |
commit | 5537e62301b5a43914709690bbe199684082b049 (patch) | |
tree | 7fadc2a3a6def8b08540df21a17f099f330c5c51 /unix/tclUnixFile.c | |
parent | c1da4a3f2858e084eb34f0ce3808d2ee711364fd (diff) | |
parent | bf7612099ad0198a051d7e2b3413531669ce0582 (diff) | |
download | tcl-5537e62301b5a43914709690bbe199684082b049.zip tcl-5537e62301b5a43914709690bbe199684082b049.tar.gz tcl-5537e62301b5a43914709690bbe199684082b049.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. */ |