]> granicus.if.org Git - curl/commitdiff
make newer MSCV7 compilers use _strtoi64() as a strtoll() replacement
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Feb 2004 14:24:49 +0000 (14:24 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 23 Feb 2004 14:24:49 +0000 (14:24 +0000)
lib/strtoofft.h

index c5bbccc84d44ba93535d99f00d1e73979fe60005..9944ba1d94dab65f2ab1d2d5ef45e7bf426edc50 100644 (file)
 #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