Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f342f53a747d80c04cae52d9dfc8eb5f014d13f5
Ticket: 1493067fffffffffffffffffffffffffffffffff
Mingw Tcl_FSStat() returns wrong file sizes
User & Date: eriklns on 2006-05-22 16:45:15
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When using Tcl_FSStat(someTcl_Obj, &statBuf) in a Tcl
    extension compiled with MinGW, loading the extension in
    a stock ActiveTcl tclsh, the file sizes that are in the
    statBuf.size field are plain wrong.
    
    Attached, you find the code for an extension
    (filesize.c -> filesize.dll) defining a new Tcl command
    [filesize]. The results from that command compared to
    the regular [file size] command are:
    
    ActiveTcl8.4.12 tclsh.exe
    
    =========================
    
    % load filesize.dll
    
    % filesize filesize.dll
    
    1000                       <== wrong value
    
    % file size filesize.dll
    
    13933
    
    
    
    As an alternative to the code in filesize.c, which has
    the memory for statBuf allocated automatically, I used
    Tcl_AllocStatBuf() to allocate the memory dynamically.
    This did not make a difference.
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "eriklns"
  9. subsystem changed to: "None"
  10. title changed to: "Tcl_FSStat() returns wrong file sizes"
  11. type changed to: "Bug"