From: SourceForge.net <no...@so...> - 2003-03-14 21:48:55
|
Bugs item #698146, was opened at 2003-03-05 18:26 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=698146&group_id=10894 Category: 15. Commands A-H Group: 8.4.2 >Status: Closed Resolution: Fixed Priority: 5 Submitted By: John Stark (jods) Assigned to: Donal K. Fellows (dkf) Summary: file atime & mtime broken for 64 bit OSs Initial Comment: When tcl is compiled for a 64-bit IRIX64 platform the 'file atime' and 'file mtime' commands do not set the times correctly. This is due to a bug in tclCmdAH.c : Line 841 - 844 contain if (Tcl_GetLongFromObj(interp, objv[3], (long*)(&buf.st_atime)) != TCL_OK) { return TCL_ERROR; } But the stat buf contains 32 bit ints for atime & mtime, not 64 bit longs, so the code could be replaced with this: long along; if (Tcl_GetLongFromObj(interp, objv[3], &along) != TCL_OK) { return TCL_ERROR; } buf.st_mtime = along; Where the last line implicitly does the type conversion. Similar for mtime. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2003-03-07 11:52 Message: Logged In: YES user_id=79902 It's fractionally better (fewer assignments) to put the value read from the long directly into the utimbuf instead of the statbuf. In the HEAD now. (Left open to remind me to check this into the 8.4 branch.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=698146&group_id=10894 |