From 180b052f7e76dfa2284ac3c2128fbd19f1d67595 Mon Sep 17 00:00:00 2001 From: Emil Rosenquist <37864286+EmilRosenquist@users.noreply.github.com> Date: Thu, 1 Sep 2022 10:28:51 +0200 Subject: [PATCH] Add SIZEOF_OFF_T (GH PR #31) --- .../libbuild2/autoconf/checks/SIZEOF_OFF_T.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_OFF_T.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_OFF_T.h b/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_OFF_T.h new file mode 100644 index 0000000..a7eac23 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/SIZEOF_OFF_T.h @@ -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