msvc: drop support for VS2005 and older

- cmake: assume large file support (VS2005+ / `_fseeki64()`)
- config-win32.h: assume large file support (VS2005+ / `_fseeki64()`)
- config-win32.h: assume `HAVE_LONGLONG` (VS2003+)
- config-win32.h: assume 64-bit `time_t` (VS2005+)
- config-win32.h: assume VS2008+
- cmake: use multi-threaded/parallel compilation (VS2008+)
- curl_setup.h: require multi-threading MSVC CRT (~VS2005+)
- curl_setup.h: hard fail for unsupported MSVC versions.
  Authored-by: Jay Satiro
- winbuild: bump minimum version

Follow-up to 308437ac53 #15992
Ref: #15972
Closes #16004
This commit is contained in:
Viktor Szakats 2025-01-13 20:49:20 +01:00
parent 4842f22bfa
commit e0fd5790d9
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 15 additions and 27 deletions

View file

@ -1932,10 +1932,7 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "HAVE_CONFIG_H")
if(WIN32)
list(APPEND CURL_LIBS "ws2_32" "bcrypt")
# _fseeki64() requires VS2005
if(NOT MSVC OR (MSVC_VERSION GREATER_EQUAL 1400))
set(USE_WIN32_LARGE_FILES ON)
endif()
set(USE_WIN32_LARGE_FILES ON)
# Use the manifest embedded in the Windows Resource
string(APPEND CMAKE_RC_FLAGS " -DCURL_EMBED_MANIFEST")
@ -1955,10 +1952,7 @@ if(MSVC)
# Disable default manifest added by CMake
string(APPEND CMAKE_EXE_LINKER_FLAGS " -MANIFEST:NO")
# Use multithreaded compilation on VS2008+
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1500)
string(APPEND CMAKE_C_FLAGS " -MP")
endif()
string(APPEND CMAKE_C_FLAGS " -MP") # Parallel compilation
endif()
if(CURL_WERROR)