mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
CURL_LLONG_MAX: avoid constant overflow
... when (CURL_SIZEOF_CURL_OFF_T == 4)
This commit is contained in:
parent
b1c1b9bb76
commit
35955179c6
@ -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 */
|
||||
|
@ -33,7 +33,7 @@ long chunk_bgn(const struct curl_fileinfo *finfo, void *ptr, int remains)
|
||||
printf(" (parsed => %o)", finfo->perm);
|
||||
printf("\n");
|
||||
}
|
||||
printf("Size: %lldB\n", (long long int)finfo->size);
|
||||
printf("Size: %ldB\n", (long)finfo->size);
|
||||
if(finfo->strings.user)
|
||||
printf("User: %s\n", finfo->strings.user);
|
||||
if(finfo->strings.group)
|
||||
|
Loading…
x
Reference in New Issue
Block a user