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

Changeset 3437

Show
Ignore:
Timestamp:
04/17/08 00:02:44 (4 months ago)
Author:
sean
Message:

Changed stdio file handles for darwin. It seems these are valid from at least 10.4.x onward, so I opted to not bother with preserving the older handles as well. If anyone really needs them, please reopen the ticket and say so. This closes #1007

Files:

Legend:

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

    r3193 r3437  
    231231    extern void function() _fcloseallp; 
    232232 
    233     version (GNU) { 
     233    version (GNU) 
     234    { 
    234235        extern FILE[_NFILE]* _imp___iob; 
    235236 
     
    239240        const FILE* stdaux; 
    240241        const FILE* stdprn; 
    241          
    242         static this() { 
     242 
     243        static this() 
     244        { 
    243245            stdin  = &(*_imp___iob)[0]; 
    244246            stdout = &(*_imp___iob)[1]; 
     
    247249            stdprn = &(*_imp___iob)[4]; 
    248250        } 
    249     } else { 
     251    } 
     252    else 
     253    { 
    250254        extern FILE[_NFILE] _iob; 
    251255 
     
    272276else version( darwin ) 
    273277{ 
    274     extern FILE[3] __sF; 
    275     const FILE* stdin  = &__sF[0]; 
    276     const FILE* stdout = &__sF[1]; 
    277     const FILE* stderr = &__sF[2]; 
     278    extern FILE* __stdinp; 
     279    extern FILE* __stdoutp; 
     280    extern FILE* __stderrp; 
     281 
     282    const FILE* stdin  = __stdinp; 
     283    const FILE* stdout = __stdoutp; 
     284    const FILE* stderr = __stdoutp; 
    278285} 
    279286else version( freebsd ) 
    280287{ 
    281288    extern FILE[3] __sF; 
     289 
    282290    const FILE* stdin  = &__sF[0]; 
    283291    const FILE* stdout = &__sF[1];