summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:31:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:31:02 (GMT)
commitf18232040af804d53027a32d7d550dcda57a7f0e (patch)
treed9d14949559023cffce9873d2e33742a7b7c13e1 /unix
parent170f9fa2afe412f97e0c3a82a5cdd2a9b33cfffb (diff)
parent5537e62301b5a43914709690bbe199684082b049 (diff)
downloadtcl-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')
-rw-r--r--unix/tclUnixFile.c7
-rw-r--r--unix/tclUnixPort.h6
2 files changed, 5 insertions, 8 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. */
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 5229f58..63c500d 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -98,16 +98,14 @@ typedef off_t Tcl_SeekOffset;
DLLIMPORT extern __stdcall void OutputDebugStringW(const WCHAR *);
DLLIMPORT extern __stdcall int IsDebuggerPresent();
- 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)