summaryrefslogtreecommitdiff
path: root/src/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 4d79f1e..f1f63e4 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -13,13 +13,19 @@
13#include <unistd.h> 13#include <unistd.h>
14#include <stdlib.h> // for mkstemp 14#include <stdlib.h> // for mkstemp
15 15
16#include "bu/config.h"
17
16namespace Bu { subExceptionDef( FileException ) } 18namespace Bu { subExceptionDef( FileException ) }
17 19
18Bu::File::File( const Bu::FString &sName, int iFlags ) : 20Bu::File::File( const Bu::FString &sName, int iFlags ) :
19 fd( -1 ), 21 fd( -1 ),
20 bEos( true ) 22 bEos( true )
21{ 23{
24#ifdef USE_64BIT_IO
25 fd = ::open64( sName.getStr(), getPosixFlags( iFlags ), 0666 );
26#else
22 fd = ::open( sName.getStr(), getPosixFlags( iFlags ), 0666 ); 27 fd = ::open( sName.getStr(), getPosixFlags( iFlags ), 0666 );
28#endif
23 if( fd < 0 ) 29 if( fd < 0 )
24 { 30 {
25 throw Bu::FileException( errno, "%s: %s", 31 throw Bu::FileException( errno, "%s: %s",