]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
msvc: assume `_INTEGRAL_MAX_BITS >= 64`
authorViktor Szakats <commit@vsz.me>
Thu, 9 Jan 2025 13:58:24 +0000 (14:58 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 10 Jan 2025 10:27:55 +0000 (11:27 +0100)
curl requires C compilers supporting 64-bit `curl_off_t` type since
835682661c7a36b0e860c978204e8cd9b033be45 #10597 (v8.0.0).

Assume the MSVC compiler offers the necessary support.

It makes curl require Visual Studio .NET 2003, v7.1 (`_MSC_VER = 1310`).
With the possibility that 1300 (Visual Studio .NET, v7.0, 2002), or 1200
(Visual C++, 32-bit, v6.0, 1998) may also work.

Follow-up to ca18198dd4d6517bd2d8b34a99fcd9d4f780d219 #15952
Closes #15955

include/curl/system.h
lib/config-win32.h
lib/config-win32ce.h
lib/mprintf.c
lib/strtoofft.c

index 682561a7e8fd333646113f69ca3ac1fa0855db69..c657ddb1311ffa422eca29d8f66b60a80156079a 100644 (file)
 #elif defined(_MSC_VER)
 #  if (_MSC_VER >= 1800)
 #    include <inttypes.h>
-#    define CURL_TYPEOF_CURL_OFF_T     __int64
 #    define CURL_FORMAT_CURL_OFF_T     PRId64
 #    define CURL_FORMAT_CURL_OFF_TU    PRIu64
-#    define CURL_SUFFIX_CURL_OFF_T     i64
-#    define CURL_SUFFIX_CURL_OFF_TU    ui64
-#  elif (_INTEGRAL_MAX_BITS >= 64)
-#    define CURL_TYPEOF_CURL_OFF_T     __int64
+#  else
 #    define CURL_FORMAT_CURL_OFF_T     "I64d"
 #    define CURL_FORMAT_CURL_OFF_TU    "I64u"
-#    define CURL_SUFFIX_CURL_OFF_T     i64
-#    define CURL_SUFFIX_CURL_OFF_TU    ui64
-#  else
-#    define CURL_TYPEOF_CURL_OFF_T     long
-#    define CURL_FORMAT_CURL_OFF_T     "ld"
-#    define CURL_FORMAT_CURL_OFF_TU    "lu"
-#    define CURL_SUFFIX_CURL_OFF_T     L
-#    define CURL_SUFFIX_CURL_OFF_TU    UL
 #  endif
+#  define CURL_TYPEOF_CURL_OFF_T     __int64
+#  define CURL_SUFFIX_CURL_OFF_T     i64
+#  define CURL_SUFFIX_CURL_OFF_TU    ui64
 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
 
 /* ===================================== */
index 4b599e5c8f04254e42104ca4a160a69921c67ad8..3237c715be294a1868378d756468ac794ce65ff3 100644 (file)
@@ -394,11 +394,7 @@ Vista
 /* ---------------------------------------------------------------- */
 
 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
-#  if (_INTEGRAL_MAX_BITS >= 64)
-#    define USE_WIN32_LARGE_FILES
-#  else
-#    define USE_WIN32_SMALL_FILES
-#  endif
+#  define USE_WIN32_LARGE_FILES
 #endif
 
 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
index cd42c372884f2974b2c44c31c8df4ead2da03590..c50f12691b331627b127d05f88b44b8d79cb7104 100644 (file)
 /* ---------------------------------------------------------------- */
 
 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
-#  if (_INTEGRAL_MAX_BITS >= 64)
-#    define USE_WIN32_LARGE_FILES
-#  else
-#    define USE_WIN32_SMALL_FILES
-#  endif
+#  define USE_WIN32_LARGE_FILES
 #endif
 
 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
index 396c78625ca325948f346ec1ca9073c1aee6dacd..1a40583c2fb5427a5d1b93956d902feea3544b79 100644 (file)
@@ -37,7 +37,7 @@
 #ifdef HAVE_LONGLONG
 #  define LONG_LONG_TYPE long long
 #  define HAVE_LONG_LONG_TYPE
-#elif defined(_MSC_VER) && (_INTEGRAL_MAX_BITS >= 64)
+#elif defined(_MSC_VER)
 #  define LONG_LONG_TYPE __int64
 #  define HAVE_LONG_LONG_TYPE
 #else
index f1c7ba2711046807b808e40e4eb6e877ff1fb3e6..05536c18261370d576bce845ea07ed5b63ada92d 100644 (file)
@@ -39,7 +39,7 @@
 #  ifdef HAVE_STRTOLL
 #    define strtooff strtoll
 #  else
-#    if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_INTEGRAL_MAX_BITS >= 64)
+#    if defined(_MSC_VER) && (_MSC_VER >= 1300)
 #      if defined(_SAL_VERSION)
          _Check_return_ _CRTIMP __int64 __cdecl _strtoi64(
              _In_z_ const char *_String,