ROSE  0.9.9.139
fileoffsetbits.h
1 #ifndef __fileoffsetbits
2 #define __fileoffsetbits
3 // DQ (3/12/2006): This is included here as specified in the Autoconf manual (using <> instead of "")
4 // We have also abandoned the ifdef HAVE_CONFIG_H cpp conditional use of rose_config.h as well.
5 // This is placed here in sage3.h instead of in rose.h because it needs to always be seen even
6 // by internal ROSE files that only include sage3.h.
7 
8 // DQ (10/14/2010): We don't want to include this into our header file system
9 // since then users will see the defined macros in our autoconf generated
10 // config.h (which we generate as rose_config.h to avoid filename conflicts).
11 // This fixes the problem that causes macro names to conflict (e.g. PACKAGE_BUGREPORT).
12 // #include <rose_config.h>
13 
14 // DQ (4/21/2009): Error checking to avoid difficult to debug ODR violations on 32-bit systems.
15 #if defined(_SYS_STAT_H)
16 #error "sys/stat.h should not have been included before the _FILE_OFFSET_BITS macro is set! (use rose.h first...)"
17 #endif
18 
19 // DQ (4/21/2009): This must be included before rose_paths.h since that
20 // header includes the STL string header which will include sys/stat.h first.
21 // Force 64-bit file offsets in struct stat
22 #define _FILE_OFFSET_BITS 64
23 
24 // DQ (4/21/2009): This must be set before sys/stat.h is included by any other header file.
25 // Use of _FILE_OFFSET_BITS macro is required on 32-bit systems to controling size of "struct stat"
26 #if !(defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64))
27 #error "The _FILE_OFFSET_BITS macro should be set before any sys/stat.h is included by any other header file!"
28 #endif
29 
30 #endif