#3435 Mingw Tcl_FSStat() returns wrong file sizes

obsolete: 8.4.12
closed-wont-fix
5
2007-02-23
2006-05-22
No

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.

Discussion

  • Erik Leunissen

    Erik Leunissen - 2006-05-22
     
  • Don Porter

    Don Porter - 2006-05-23
    • assigned_to: nobody --> vincentdarley
    • milestone: --> obsolete: 8.4.12
    • labels: --> 37. File System
     
  • Vince Darley

    Vince Darley - 2006-05-23
    • assigned_to: vincentdarley --> mdejong
    • summary: Tcl_FSStat() returns wrong file sizes --> Mingw Tcl_FSStat() returns wrong file sizes
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-02-09

    Logged In: YES
    user_id=72656
    Originator: NO

    I believe this is an extension configuration issue. You have to be careful to get the same stat buf size. This is a weak link in extension building for extensions that deal with file handling.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-02-09
    • status: open --> pending-wont-fix
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-wont-fix --> closed-wont-fix
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks