aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/strtoofft.h7
-rw-r--r--tests/libtest/lib576.c2
2 files changed, 7 insertions, 2 deletions
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 */
diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c
index 7f2c7ae37..10857f6b7 100644
--- a/tests/libtest/lib576.c
+++ b/tests/libtest/lib576.c
@@ -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)