diff options
author | Dimitrios Apostolou <jimis@northern.tech> | 2018-01-04 14:02:59 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-01-09 17:46:49 +1300 |
commit | 89f68047347cef29f8f4cab6a0ae3ff35d467c37 (patch) | |
tree | 24806e370800f107e7badfc79ee25b4ca2615cee /include | |
parent | 14d07be37bf88740ff31de64dd202cd8504f8309 (diff) | |
download | curl-89f68047347cef29f8f4cab6a0ae3ff35d467c37.tar.gz |
system.h: Additionally check __LONG_MAX__ for defining curl_off_t
__SIZEOF_LONG__ was introduced in GCC 4.4, __LONG_MAX__ was introduced
in GCC 3.3.
Closes #2216
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/system.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/curl/system.h b/include/curl/system.h index 39dae754c..07bbd9ca9 100644 --- a/include/curl/system.h +++ b/include/curl/system.h @@ -348,7 +348,8 @@ defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \ defined(__sparc__) || defined(__mips__) || defined(__sh__) || \ defined(__XTENSA__) || \ - (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4)) + (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \ + (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L)) # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" @@ -356,7 +357,8 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__LP64__) || \ defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \ - (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) + (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \ + (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L) # define CURL_TYPEOF_CURL_OFF_T long # define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_TU "lu" |