diff options
author | vincentdarley <vincentdarley> | 2003-01-09 10:38:28 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2003-01-09 10:38:28 (GMT) |
commit | 148ced9ceeadb0fede7d548f209c3ade2af8291b (patch) | |
tree | 94e33d4bbeedca7ca6ecf8cead2a25e077246a54 /win/tclWinFile.c | |
parent | f98b2e353536358f9a36a52cb3a593b6958b9666 (diff) | |
download | tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.zip tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.tar.gz tcl-148ced9ceeadb0fede7d548f209c3ade2af8291b.tar.bz2 |
non-ascii chars in file mtime fix
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 04c5fa8..0023433 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.39 2002/07/20 01:01:41 vincentdarley Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.40 2003/01/09 10:38:35 vincentdarley Exp $ */ //#define _WIN32_WINNT 0x0500 @@ -2222,3 +2222,37 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) Tcl_DStringFree(&dsNorm); return nextCheckpoint; } + +/* + *--------------------------------------------------------------------------- + * + * TclpUtime -- + * + * Set the modification date for a file. + * + * Results: + * 0 on success, -1 on error. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ +int +TclpUtime(pathPtr, tval) + Tcl_Obj *pathPtr; /* File to modify */ + struct utimbuf *tval; /* New modification date structure */ +{ + int res; + /* + * Windows uses a slightly different structure name and, possibly, + * contents, so we have to copy the information over + */ + struct _utimbuf buf; + + buf.actime = tval->actime; + buf.modtime = tval->modtime; + + res = (*tclWinProcs->utimeProc)(Tcl_FSGetNativePath(pathPtr),&buf); + return res; +} |