aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-23 14:24:49 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-23 14:24:49 +0000
commit2ae4420869ec24b7ffe66dc606634ec467d5303e (patch)
tree7425965cccc0e83a45591680f0ce906a1f974516
parent8ba042cf88bb24abbf8d822e86632f50b4698dff (diff)
make newer MSCV7 compilers use _strtoi64() as a strtoll() replacement
-rw-r--r--lib/strtoofft.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/strtoofft.h b/lib/strtoofft.h
index c5bbccc84..9944ba1d9 100644
--- a/lib/strtoofft.h
+++ b/lib/strtoofft.h
@@ -41,12 +41,20 @@
#if SIZEOF_CURL_OFF_T > 4
#if HAVE_STRTOLL
#define strtoofft strtoll
-#else
+#else /* HAVE_STRTOLL */
+
+/* For MSVC7 we can use _strtoi64() which seems to be a strtoll() clone */
+#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+#define strtoll _strtoi64
+#else /* MSVC7 or later */
curl_off_t curlx_strtoll(const char *nptr, char **endptr, int base);
#define strtoofft curlx_strtoll
#define NEED_CURL_STRTOLL
-#endif
-#else
+#endif /* MSVC7 or later */
+
+#endif /* HAVE_STRTOLL */
+#else /* SIZEOF_CURL_OFF_T > 4 */
+/* simply use strtol() to get 32bit numbers */
#define strtoofft strtol
#endif