Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3619

Show
Ignore:
Timestamp:
06/15/08 15:24:32 (6 months ago)
Author:
sean
Message:

Applied v3 patch from #1071. I will make changes to implicitly call the foo64 version of the functions separately. This closes #1071

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/stdc/posix/config.d

    r3499 r3619  
    1717  version( none /* X86_64 */ ) 
    1818  { 
     19    const uint  __WORDSIZE          = 64; 
    1920    const bool  __USE_LARGEFILE64   = true; 
    2021  } 
    2122  else 
    2223  { 
     24    const uint  __WORDSIZE          = 32; 
    2325    const bool  __USE_LARGEFILE64   = false; 
    2426  } 
  • trunk/tango/stdc/posix/sys/stat.d

    r3265 r3619  
    8080        { 
    8181            dev_t       st_dev; 
     82          static if( __WORDSIZE == 64 ) 
     83          { 
     84            ino64_t     st_ino; 
     85            nlink_t     st_nlink; 
     86            mode_t      st_mode; 
     87          } 
     88          else 
     89          { 
    8290            uint        __pad1; 
    8391            ino_t       __st_ino; 
    8492            mode_t      st_mode; 
    8593            nlink_t     st_nlink; 
     94          } 
    8695            uid_t       st_uid; 
    8796            gid_t       st_gid; 
     97          static if( __WORDSIZE == 64 ) 
     98          { 
     99            int         pad0; 
     100            dev_t       st_rdev; 
     101            off_t       st_size; 
     102          } 
     103          else 
     104          { 
    88105            dev_t       st_rdev; 
    89106            uint        __pad2; 
    90107            off64_t     st_size; 
     108          } 
    91109            blksize_t   st_blksize; 
    92110            blkcnt64_t  st_blocks; 
     
    110128            c_ulong     st_ctimensec; 
    111129          } 
     130          static if ( __WORDSIZE == 64 ) 
     131          { 
     132            long        __unused[3]; 
     133          } 
     134          else 
     135          { 
    112136            ino64_t     st_ino; 
     137          } 
    113138        } 
    114139    } 
     
    118143        { 
    119144            dev_t       st_dev; 
     145          static if( __WORDSIZE == 32 ) 
     146          { 
    120147            ushort      __pad1; 
    121           static if( __USE_FILE_OFFSET64 ) 
     148          } 
     149          static if( __WORDSIZE != 64 && __USE_FILE_OFFSET64 ) 
    122150          { 
    123151            ino_t       __st_ino; 
     
    127155            ino_t       st_ino; 
    128156          } 
     157          static if( __WORDSIZE == 32 ) 
     158          { 
    129159            mode_t      st_mode; 
    130160            nlink_t     st_nlink; 
     161          } 
     162          else 
     163          { 
     164            nlink_t     st_nlink; 
     165            mode_t      st_mode; 
     166          } 
    131167            uid_t       st_uid; 
    132168            gid_t       st_gid; 
     169          static if( __WORDSIZE == 64 ) 
     170          { 
     171            int         pad0; 
     172          } 
    133173            dev_t       st_rdev; 
     174          static if( __WORDSIZE == 32 ) 
     175          { 
    134176            ushort      __pad2; 
     177          } 
    135178            off_t       st_size; 
    136179            blksize_t   st_blksize; 
     180          static if( __WORDSIZE != 64 && __USE_FILE_OFFSET64 ) 
     181          { 
     182            blkcnt64_t  st_blocks; 
     183          } 
     184          else 
     185          { 
    137186            blkcnt_t    st_blocks; 
     187          } 
    138188          static if( false /*__USE_MISC*/ ) // true if _BSD_SOURCE || _SVID_SOURCE 
    139189          { 
     
    154204            c_ulong     st_ctimensec; 
    155205          } 
     206          static if( __WORDSIZE == 64 ) 
     207          { 
     208            long[3]     __unused; 
     209          } 
    156210          static if( __USE_FILE_OFFSET64 ) 
    157211          { 
    158             ino_t       st_ino; 
     212            ino64_t     st_ino; 
    159213          } 
    160214          else 
  • trunk/tango/stdc/posix/sys/types.d

    r3231 r3619  
    3737version( linux ) 
    3838{ 
    39   static if( __USE_FILE_OFFSET64 ) 
    40   { 
     39    // From <bits/typesizes.h> 
     40 
    4141    alias long      blkcnt_t; 
    42     alias ulong     ino_t; 
    43     alias long      off_t; 
    44   } 
    45   else 
    46   { 
    47     alias c_long    blkcnt_t; 
    48     alias c_ulong   ino_t; 
    49     alias c_long    off_t; 
    50   } 
    51     alias c_long    blksize_t; 
     42    alias long      blkcnt64_t; 
     43    alias long      blksize_t; 
    5244    alias ulong     dev_t; 
    5345    alias uint      gid_t; 
     46    alias ulong     ino_t; 
     47    alias ulong     ino64_t; 
    5448    alias uint      mode_t; 
    55     alias uint      nlink_t; 
     49    alias c_ulong   nlink_t; 
     50    alias long      off_t; 
     51    alias long      off64_t; 
    5652    alias int       pid_t; 
    5753    //size_t (defined in tango.stdc.stddef) 
    58     alias int       ssize_t; 
     54    alias c_long    ssize_t; 
    5955    //time_t (defined in tango.stdc.time) 
    6056    alias uint      uid_t; 
     
    108104version( linux ) 
    109105{ 
    110   static if( __USE_FILE_OFFSET64 ) 
    111   { 
    112     alias ulong     fsblkcnt_t; 
     106    // From <bits/typesizes.h> 
     107 
     108    // clock_t (defined in tango.stdc.time) 
     109    alias c_ulong   fsblkcnt_t; 
     110    alias ulong     fsblkcnt64_t; 
    113111    alias ulong     fsfilcnt_t; 
    114   } 
    115   else 
    116   { 
    117     alias c_ulong   fsblkcnt_t; 
    118     alias c_ulong   fsfilcnt_t; 
    119   } 
    120     // clock_t (defined in tango.stdc.time) 
     112    alias ulong     fsfilcnt64_t; 
    121113    alias uint      id_t; 
    122114    alias int       key_t;