diff options
| author | vincentdarley <vincentdarley> | 2003-01-09 10:38:28 (GMT) |
|---|---|---|
| committer | vincentdarley <vincentdarley> | 2003-01-09 10:38:28 (GMT) |
| commit | d6ea503f7ed1123354d744abdf591cfeef557525 (patch) | |
| tree | 94e33d4bbeedca7ca6ecf8cead2a25e077246a54 /mac/tclMacFile.c | |
| parent | 32f883820a1d5db40868ddb0a529d0dc5f3addc8 (diff) | |
| download | tcl-d6ea503f7ed1123354d744abdf591cfeef557525.zip tcl-d6ea503f7ed1123354d744abdf591cfeef557525.tar.gz tcl-d6ea503f7ed1123354d744abdf591cfeef557525.tar.bz2 | |
non-ascii chars in file mtime fix
Diffstat (limited to 'mac/tclMacFile.c')
| -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); +} + |
