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

Changeset 2620

Show
Ignore:
Timestamp:
10/04/07 23:39:44 (1 year ago)
Author:
kris
Message:

added O_LARGEFILE to linux file open

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/io/FileConduit.d

    r2505 r2620  
    507507                        alias int[] Flags; 
    508508 
     509                        const O_LARGEFILE = 0x8000; 
     510 
    509511                        static const Flags Access =   
    510512                                        [ 
    511                                         0,              // invalid 
     513                                        0,                      // invalid 
    512514                                        O_RDONLY, 
    513515                                        O_WRONLY, 
     
    517519                        static const Flags Create =   
    518520                                        [ 
    519                                         0,              // open existing 
    520                                         O_CREAT | O_TRUNC, // truncate always 
    521                                         O_CREAT,        // create if needed 
    522                                         O_APPEND | O_CREAT,  
     521                                        0,                      // open existing 
     522                                        O_CREAT | O_TRUNC,      // truncate always 
     523                                        O_CREAT,                // create if needed 
     524                                        O_APPEND | O_CREAT,     // append 
    523525                                        ]; 
    524526 
    525527                        static const short[] Locks =    
    526528                                        [ 
    527                                         F_WRLCK,        // no sharing 
    528                                         F_RDLCK,        // shared read 
     529                                        F_WRLCK,                // no sharing 
     530                                        F_RDLCK,                // shared read 
    529531                                        ]; 
    530532                                                 
    531533                        auto mode = Access[style.access] | Create[style.open]; 
    532                         handle = posix.open (path.cString.ptr, mode, 0666); 
     534 
     535                        // always open as a large file 
     536                        handle = posix.open (path.cString.ptr, mode | O_LARGEFILE, 0666); 
    533537                        if (handle is -1) 
    534538                            error ();