Redo SIZEOF_OFF_T using __SIZEOF_SIZE_T__ instead of checking for CPUs
This commit is contained in:
parent
a64598861f
commit
2062ab7e57
@ -2,13 +2,18 @@
|
||||
|
||||
#undef SIZEOF_OFF_T
|
||||
|
||||
/* Note that the _FILE_OFFSET_BITS macro is expected to be defined by the
|
||||
|
||||
/* Use __SIZEOF_SIZE_T__ (defined by GCC and Clang and maybe others) to detect
|
||||
* a 64-bit target.
|
||||
*
|
||||
* Note that the _FILE_OFFSET_BITS macro is expected to be defined by the
|
||||
* user, for example, on the command line.
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define SIZEOF_OFF_T 4
|
||||
#elif defined(__x86_64__) || defined(__ppc64__) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
|
||||
#elif (defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 8) || \
|
||||
(defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
|
||||
# define SIZEOF_OFF_T 8
|
||||
#else
|
||||
# define SIZEOF_OFF_T 4
|
||||
|
Loading…
Reference in New Issue
Block a user