From ff66e80fc0b2e6760c585dcd09cd9fb34b21f39f Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Tue, 3 Jun 2003 02:25:57 +0000 Subject: [PATCH] correct 64-bit build support setup --- direct/src/autorestart/autorestart.c | 1 + dtool/Config.Linux.pp | 4 ---- dtool/src/dtoolbase/dtoolbase.h | 7 +++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/direct/src/autorestart/autorestart.c b/direct/src/autorestart/autorestart.c index a2b744db26..ffedea3d6a 100644 --- a/direct/src/autorestart/autorestart.c +++ b/direct/src/autorestart/autorestart.c @@ -17,6 +17,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "dtool_config.h" +#include "dtoolbase.h" #ifndef HAVE_GETOPT #include "gnu_getopt.h" diff --git a/dtool/Config.Linux.pp b/dtool/Config.Linux.pp index 18d8dd7873..3f4e0e0c05 100644 --- a/dtool/Config.Linux.pp +++ b/dtool/Config.Linux.pp @@ -127,7 +127,3 @@ // What is the syntax of the STL allocator declaration? See // LocalSetup.pp for allowable values. #define STL_ALLOCATOR GNU - -// large file >2GB support -#define _LARGEFILE_SOURCE 1 -#define _FILE_OFFSET_BITS 64 diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index d16a95830d..c1f003c96a 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -78,6 +78,13 @@ #include "dtoolsymbols.h" +#ifdef __GNUC__ +// Large file >2GB support +// this needs be be before systypes.h and other C headers +#define _FILE_OFFSET_BITS 64 +#define _LARGEFILE_SOURCE 1 +#endif + #ifdef HAVE_MALLOC_H #include #endif