From 2a943828287d2a861930d3facb2333c895ada205 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 13 May 2010 13:43:57 +0000 Subject: 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. --- src/file.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/file.cpp') 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 @@ #include #include // for mkstemp +#include "bu/config.h" + namespace Bu { subExceptionDef( FileException ) } Bu::File::File( const Bu::FString &sName, int iFlags ) : fd( -1 ), bEos( true ) { +#ifdef USE_64BIT_IO + fd = ::open64( sName.getStr(), getPosixFlags( iFlags ), 0666 ); +#else fd = ::open( sName.getStr(), getPosixFlags( iFlags ), 0666 ); +#endif if( fd < 0 ) { throw Bu::FileException( errno, "%s: %s", -- cgit v1.2.3