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 /mac | |
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 'mac')
-rw-r--r-- | mac/tclMacFile.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/mac/tclMacFile.c b/mac/tclMacFile.c index 5e4d363..c20d056 100644 --- a/mac/tclMacFile.c +++ b/mac/tclMacFile.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: tclMacFile.c,v 1.25 2002/10/09 11:54:24 das Exp $ + * RCS: @(#) $Id: tclMacFile.c,v 1.26 2003/01/09 10:38:29 vincentdarley Exp $ */ /* @@ -1240,3 +1240,32 @@ TclpFilesystemPathType(pathObjPtr) /* All native paths are of the same type */ return NULL; } + +/* + *--------------------------------------------------------------------------- + * + * 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 */ +{ + 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); +} + |