summaryrefslogtreecommitdiff
path: root/lib/strtoofft.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-10-10 03:39:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-10-10 03:39:59 +0000
commita7913a62a9f86ba70f890b55e106293787e7d729 (patch)
tree0a78ba3a7d2e2abaa31cddc70fd2ab16dfb51418 /lib/strtoofft.h
parent6d1b37b3da7728ebf3574160dedeb04bb94eba25 (diff)
downloadcurl-a7913a62a9f86ba70f890b55e106293787e7d729.tar.gz
If long is 8 bytes we can use strtol() to get 64 bit numbers and won't need
our strtoll() replacement function.
Diffstat (limited to 'lib/strtoofft.h')
-rw-r--r--lib/strtoofft.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/strtoofft.h b/lib/strtoofft.h
index c92cbeff7..e23e1483e 100644
--- a/lib/strtoofft.h
+++ b/lib/strtoofft.h
@@ -38,7 +38,7 @@
* not, should try to emulate its functionality. At any rate, we define
* 'strtoofft' such that it can be used to work with curl_off_t's regardless.
*/
-#if SIZEOF_CURL_OFF_T > 4
+#if (SIZEOF_CURL_OFF_T > 4) && (SIZEOF_LONG < 8)
#if HAVE_STRTOLL
#define curlx_strtoofft strtoll
#else /* HAVE_STRTOLL */
@@ -53,8 +53,8 @@ curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base);
#endif /* MSVC7 or later */
#endif /* HAVE_STRTOLL */
-#else /* SIZEOF_CURL_OFF_T > 4 */
-/* simply use strtol() to get 32bit numbers */
+#else /* (SIZEOF_CURL_OFF_T > 4) && (SIZEOF_LONG < 8) */
+/* simply use strtol() to get numbers, either 32 or 64 bit */
#define curlx_strtoofft strtol
#endif