summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-01-09 10:38:28 (GMT)
committervincentdarley <vincentdarley>2003-01-09 10:38:28 (GMT)
commit148ced9ceeadb0fede7d548f209c3ade2af8291b (patch)
tree94e33d4bbeedca7ca6ecf8cead2a25e077246a54 /generic
parentf98b2e353536358f9a36a52cb3a593b6958b9666 (diff)
downloadtcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.zip
tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.tar.gz
tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.tar.bz2
non-ascii chars in file mtime fix
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIOUtil.c32
-rw-r--r--generic/tclInt.h4
2 files changed, 5 insertions, 31 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 2145fa2..b1bca76 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.67 2002/12/06 23:22:08 hobbs Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.68 2003/01/09 10:38:29 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -342,7 +342,6 @@ static Tcl_FSCreateInternalRepProc NativeCreateNativeRep;
static Tcl_FSFileAttrStringsProc NativeFileAttrStrings;
static Tcl_FSFileAttrsGetProc NativeFileAttrsGet;
static Tcl_FSFileAttrsSetProc NativeFileAttrsSet;
-static Tcl_FSUtimeProc NativeUtime;
/*
* The only reason these functions are not static is that they
@@ -396,7 +395,7 @@ static Tcl_Filesystem tclNativeFilesystem = {
&TclpObjAccess,
&TclpOpenFileChannel,
&TclpMatchInDirectory,
- &NativeUtime,
+ &TclpUtime,
#ifndef S_IFLNK
NULL,
#else
@@ -4987,33 +4986,6 @@ Tcl_FSEqualPaths(firstPtr, secondPtr)
}
return 0;
}
-
-/*
- * utime wants a normalized, NOT native path. I assume a native
- * version of 'utime' doesn't exist (at least under that name) on NT/2000.
- * If a native function does exist somewhere, then we could use:
- *
- * return native_utime(Tcl_FSGetNativePath(pathPtr),tval);
- *
- * This seems rather strange when compared with stat, lstat, access, etc.
- * all of which want a native path.
- */
-static int
-NativeUtime(pathPtr, tval)
- Tcl_Obj *pathPtr;
- struct utimbuf *tval;
-{
-#ifdef MAC_TCL
- long gmt_offset=TclpGetGMTOffset();
- struct utimbuf local_tval;
- local_tval.actime=tval->actime+gmt_offset;
- local_tval.modtime=tval->modtime+gmt_offset;
- return utime(Tcl_GetString(Tcl_FSGetNormalizedPath(NULL,pathPtr)),
- &local_tval);
-#else
- return utime(Tcl_GetString(Tcl_FSGetNormalizedPath(NULL,pathPtr)),tval);
-#endif
-}
/* Everything from here on is contained in this obsolete ifdef */
#ifdef USE_OBSOLETE_FS_HOOKS
diff --git a/generic/tclInt.h b/generic/tclInt.h
index c7ffc1d..956ec4d 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.113 2002/11/12 02:25:05 hobbs Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.114 2003/01/09 10:38:29 vincentdarley Exp $
*/
#ifndef _TCLINT
@@ -1805,6 +1805,8 @@ EXTERN int TclpDlopen _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *pathPtr,
Tcl_LoadHandle *loadHandle,
Tcl_FSUnloadFileProc **unloadProcPtr));
+EXTERN int TclpUtime _ANSI_ARGS_((Tcl_Obj *pathPtr,
+ struct utimbuf *tval));
/*
*----------------------------------------------------------------