Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 135f5645a695559f6c8e4839ed79ee1302bb0f30
Ticket: 942170ffffffffffffffffffffffffffffffffff
HAVE_ST_BLOCKS missing in configure
User & Date: matzek on 2009-11-06 15:57:28
Changes

  1. icomment:
    So what will Tcl_GetBlocksFromStat() return , if st_blocks is not available? And how does Tcl support me to find out, of which size 1 block in st_blocks is? Don't answer "look at Tcl_GetBlockSizefromStat()"! That's returning st_blksize, and this may or may not the actual block size...
    
    Linux "man 2 stat":
    
    ----
    
           The st_blocks field indicates the number of blocks allocated to the file, 512-byte units.  (This may be smaller than st_size/512 when the file has holes.)
    
           The st_blksize field gives the "preferred" blocksize for efficient file system I/O.  (Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.)
    
    ----
    
    AIX "man stat.h":
    
    ----
    
    st_blksize  Size, in bytes of each block of the file.
    
    st_blocks Number of blocks actually used by the file (measured in the units specified by the DEV_BSIZE constant).
    
    ----
    
    HP-UX "man 5 stat":
    
    ----
    
    longst_blksizea filesystem-specific preferred I/O block size for this object. In some filesystem types, this may vary from file to file
    
    blkcnt_tst_blocksnumber of blocks of a filesystem-specific size allocated for this object
    
    ----
    
    Solaris "man 2 stat":
    
    ----
    
    st_blksize    A hint as to the “best” unit size for I/O operations. This field is not defined for block special or character special files.
    
    st_blocks    The total number of physical blocks of size 512 bytes actually allocated on disk. This field is not defined for block special or character special files.
    
    ----
    
    -- Matthias Kraft
    
    
  2. login: "matzek"
  3. mimetype: "text/plain"
  4. username: "matzek"