diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-05-13 13:43:57 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-13 13:43:57 +0000 |
commit | 2a943828287d2a861930d3facb2333c895ada205 (patch) | |
tree | 9e0cbd81f0b2e9f0d5739275507aea2ecb9115b8 /src/file.cpp | |
parent | 9a30a663e472774a45b78b3240f6a399637992fc (diff) | |
download | libbu++-2a943828287d2a861930d3facb2333c895ada205.tar.gz libbu++-2a943828287d2a861930d3facb2333c895ada205.tar.bz2 libbu++-2a943828287d2a861930d3facb2333c895ada205.tar.xz libbu++-2a943828287d2a861930d3facb2333c895ada205.zip |
Finally rearranged the system to put all compatability files in a directory
called compat. I've updated the linux and windows builds and it looks pretty
good. I also added a config.h file which we have to edit by hand until I can
work on build some more. Linux File operations now use 64 bit mode, windows
can't, or at least, I don't feel like researching it right now.
Diffstat (limited to 'src/file.cpp')
-rw-r--r-- | src/file.cpp | 6 |
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 | |||
16 | namespace Bu { subExceptionDef( FileException ) } | 18 | namespace Bu { subExceptionDef( FileException ) } |
17 | 19 | ||
18 | Bu::File::File( const Bu::FString &sName, int iFlags ) : | 20 | Bu::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", |