Add SIZEOF_OFF_T (GH PR #31)

This commit is contained in:
Emil Rosenquist 2022-09-01 10:28:51 +02:00 committed by Boris Kolpackov
parent 4b9024013d
commit 180b052f7e

View File

@ -0,0 +1,15 @@
// SIZEOF_OFF_T
#undef SIZEOF_OFF_T
/* 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)
# define SIZEOF_OFF_T 8
#else
# define SIZEOF_OFF_T 4
#endif