summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-12-21 23:25:39 (GMT)
committernijtmans <nijtmans>2009-12-21 23:25:39 (GMT)
commitf7e02c57c848c495a77975b927a0f4076bf4822c (patch)
tree86d9a8cc06d969564b99b6d5ed25975042f9300a /generic/tclFileName.c
parente3f5e21f00d98dacf701c346899ada0ef3327513 (diff)
downloadtcl-f7e02c57c848c495a77975b927a0f4076bf4822c.zip
tcl-f7e02c57c848c495a77975b927a0f4076bf4822c.tar.gz
tcl-f7e02c57c848c495a77975b927a0f4076bf4822c.tar.bz2
Various CYGWIN-related fixes. In the win32 configure script, CYGWIN is still not enabled yet, but at least it is a step in the right direction.
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r--generic/tclFileName.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 1070c42..664ba94 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclFileName.c,v 1.98 2009/08/21 19:06:06 dgp Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.99 2009/12/21 23:25:40 nijtmans Exp $
*/
#include "tclInt.h"
@@ -1331,8 +1331,8 @@ Tcl_GlobObjCmd(
if (dir == PATH_GENERAL) {
int pathlength;
- char *last;
- char *first = Tcl_GetStringFromObj(pathOrDir,&pathlength);
+ const char *last;
+ const char *first = Tcl_GetStringFromObj(pathOrDir,&pathlength);
/*
* Find the last path separator in the path
@@ -1433,7 +1433,7 @@ Tcl_GlobObjCmd(
while (--length >= 0) {
int len;
- char *str;
+ const char *str;
Tcl_ListObjIndex(interp, typePtr, length, &look);
str = Tcl_GetStringFromObj(look, &len);
@@ -2445,7 +2445,6 @@ DoGlob(
#if defined(__CYGWIN__) && defined(__WIN32__)
{
- extern int cygwin_conv_to_win32_path(const char *, char *);
char winbuf[MAX_PATH+1];
cygwin_conv_to_win32_path(Tcl_DStringValue(&append), winbuf);
@@ -2463,6 +2462,16 @@ DoGlob(
Tcl_DStringAppend(&append, ".", 1);
}
}
+#if defined(__CYGWIN__) && !defined(__WIN32__)
+ DLLIMPORT extern int cygwin_conv_to_posix_path(const char *, char *);
+ {
+ char winbuf[MAXPATHLEN+1];
+
+ cygwin_conv_to_posix_path(Tcl_DStringValue(&append), winbuf);
+ Tcl_DStringFree(&append);
+ Tcl_DStringAppend(&append, winbuf, -1);
+ }
+#endif /* __CYGWIN__ && __WIN32__ */
break;
}