summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:09:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:09:25 (GMT)
commited0df6fdc2fe5089d09dc9c806ceb2fe98a67d89 (patch)
tree2a871a2269a4128aff89efd529ac189336f29fcd
parent366ea66bb84ae5120d3dca0dc01fb7aa46fc9ee6 (diff)
downloadtcl-ed0df6fdc2fe5089d09dc9c806ceb2fe98a67d89.zip
tcl-ed0df6fdc2fe5089d09dc9c806ceb2fe98a67d89.tar.gz
tcl-ed0df6fdc2fe5089d09dc9c806ceb2fe98a67d89.tar.bz2
use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_path
-rw-r--r--unix/tclUnixFile.c7
-rw-r--r--unix/tclUnixPort.h10
2 files changed, 11 insertions, 6 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 56acf6c..73237c5 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -48,7 +48,7 @@ TclpFindExecutable(argv0)
{
int length;
#ifdef __CYGWIN__
- char buf[PATH_MAX * TCL_UTF_MAX + 1];
+ char buf[PATH_MAX * 2];
char name[PATH_MAX * TCL_UTF_MAX + 1];
#else
CONST char *name, *p;
@@ -61,9 +61,8 @@ TclpFindExecutable(argv0)
}
#ifdef __CYGWIN__
- 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 7f913ca..e6e8303 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -26,7 +26,7 @@
#ifndef _TCLINT
# include "tclInt.h"
#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,7 +94,7 @@ 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);
EXTERN int TclOSstat(const char *name, Tcl_StatBuf *statBuf);
EXTERN int TclOSlstat(const char *name, Tcl_StatBuf *statBuf);
# define NO_FSTATFS