From 35955179c6c3935e9b876090e29bb90c5740838f Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 29 May 2010 12:26:17 +0200 Subject: CURL_LLONG_MAX: avoid constant overflow ... when (CURL_SIZEOF_CURL_OFF_T == 4) --- lib/strtoofft.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/strtoofft.h') diff --git a/lib/strtoofft.h b/lib/strtoofft.h index bf27a173c..c791bc96e 100644 --- a/lib/strtoofft.h +++ b/lib/strtoofft.h @@ -57,7 +57,12 @@ # define curlx_strtoofft strtol #endif -#define CURL_LLONG_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) +#if (CURL_SIZEOF_CURL_OFF_T == 4) +# define CURL_LLONG_MAX CURL_OFF_T_C(0x7FFFFFFF) +#else + /* assume CURL_SIZEOF_CURL_OFF_T == 8 */ +# define CURL_LLONG_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) +#endif #define CURL_LLONG_MIN (-CURL_LLONG_MAX - CURL_OFF_T_C(1)) #endif /* HEADER_CURL_STRTOOFFT_H */ -- cgit v1.2.3