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 | 8a2d92c01ec2525c1be745e4ac62a28707bfa819 (patch) | |
tree | 7fadc2a3a6def8b08540df21a17f099f330c5c51 /unix | |
parent | 5b2718a49ed67a4ac9378b222b1cab87cf55856b (diff) | |
parent | ed0df6fdc2fe5089d09dc9c806ceb2fe98a67d89 (diff) | |
download | tcl-8a2d92c01ec2525c1be745e4ac62a28707bfa819.zip tcl-8a2d92c01ec2525c1be745e4ac62a28707bfa819.tar.gz tcl-8a2d92c01ec2525c1be745e4ac62a28707bfa819.tar.bz2 |
use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_path
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixFile.c | 7 | ||||
-rw-r--r-- | unix/tclUnixPort.h | 14 |
2 files changed, 12 insertions, 9 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. */ diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 28015ae..0aa765a 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -26,7 +26,7 @@ #ifndef MODULE_SCOPE #define MODULE_SCOPE extern #endif - + /* *--------------------------------------------------------------------------- * The following sets of #includes and #ifdefs are required to get Tcl to @@ -54,6 +54,12 @@ # include <dirent.h> #endif #endif + +/* + *--------------------------------------------------------------------------- + * Parameterize for 64-bit filesystem support. + *--------------------------------------------------------------------------- + */ #ifdef HAVE_STRUCT_DIRENT64 typedef struct dirent64 Tcl_DirEntry; @@ -88,16 +94,14 @@ typedef off_t Tcl_SeekOffset; DLLIMPORT extern __stdcall int WideCharToMultiByte(int, int, const char *, int, const char *, int, const char *, const char *); - DLLIMPORT extern int cygwin_conv_to_full_posix_path(const char *, char *); + DLLIMPORT extern int cygwin_conv_path(int, const void *, void *, int); + DLLIMPORT extern int cygwin_conv_path_list(int, const void *, void *, int); # define USE_PUTENV 1 # define USE_PUTENV_FOR_UNSET 1 /* On Cygwin, the environment is imported from the Cygwin DLL. */ # define environ __cygwin_environ # define timezone _timezone DLLIMPORT extern char **__cygwin_environ; - DLLIMPORT extern int cygwin_conv_to_win32_path(const char *, char *); - DLLIMPORT extern int cygwin_posix_to_win32_path_list_buf_size(char *value); - DLLIMPORT extern void cygwin_posix_to_win32_path_list(char *buf, char *value); MODULE_SCOPE int TclOSstat(const char *name, Tcl_StatBuf *statBuf); MODULE_SCOPE int TclOSlstat(const char *name, Tcl_StatBuf *statBuf); #elif defined(HAVE_STRUCT_STAT64) |