]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
msvc: drop checks for ancient versions
authorViktor Szakats <commit@vsz.me>
Thu, 9 Jan 2025 02:33:03 +0000 (03:33 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 9 Jan 2025 10:58:14 +0000 (11:58 +0100)
- drop version guard for `__inline`.
  Supported since `_MSC_VER` 1000.
  Visual C++, 32-bit, version 4.0 (1996)

- drop version guard for `__declspec(noreturn)` and `__forceinline`.
  Supported since `_MSC_VER` 1200.
  Visual C++, 32-bit, version 6.0 (1998)

For ancient versions, it's possible to override the default behaviour
by setting these macros via `CPPFLAGS`: `CURL_NORETURN`, `CURL_INLINE`,
`CURL_FORCEINLINE`

Closes #15946

lib/curl_setup.h
lib/curl_sha512_256.c

index 1727e2d7947405c5ed44a26c9ebfb382f5ad3e82..05ccb21e55d80f378d9f7ec9ab27cb24b8dd0703 100644 (file)
 #if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__clang__) || \
   defined(__IAR_SYSTEMS_ICC__)
 #  define CURL_NORETURN  __attribute__((__noreturn__))
-#elif defined(_MSC_VER) && (_MSC_VER >= 1200)
+#elif defined(_MSC_VER)
 #  define CURL_NORETURN  __declspec(noreturn)
 #else
 #  define CURL_NORETURN
@@ -1007,8 +1007,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
 #elif defined(__GNUC__) && __GNUC__ >= 3
 /* GCC supports '__inline__' as an extension */
 #  define CURL_INLINE __inline__
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-/* MSC supports '__inline' from VS 2005 (or even earlier) */
+#elif defined(_MSC_VER)
 #  define CURL_INLINE __inline
 #else
 /* Probably 'inline' is not supported by compiler.
index 2a88274c1477c36e850ae920ef9d564d2b3b4893..46c0bd5341185401261923eddd25ed7d6cd10cd0 100644 (file)
@@ -290,9 +290,7 @@ Curl_sha512_256_finish(unsigned char *digest,
 
 #if !defined(CURL_FORCEINLINE) && \
   defined(_MSC_VER) && !defined(__GNUC__) && !defined(__clang__)
-#  if _MSC_VER >= 1400
-#    define CURL_FORCEINLINE __forceinline
-#  endif
+#  define CURL_FORCEINLINE __forceinline
 #endif
 
 #if !defined(CURL_FORCEINLINE)