Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 438eb731dac55bca9760c7da6f16510f80ffdb5b
Ticket: 698146ffffffffffffffffffffffffffffffffff
file atime & mtime broken for 64 bit OSs
User & Date: jods on 2003-03-05 18:26:56
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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.
    
  4. foundin changed to: "obsolete: 8.4.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "jods"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "file atime & mtime broken for 64 bit OSs"
  11. type changed to: "Bug"