@@ -17,6 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "dtool_config.h"
+#include "dtoolbase.h"
#ifndef HAVE_GETOPT
#include "gnu_getopt.h"
@@ -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
@@ -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 <malloc.h>
#endif