From e8861d6f3f9168dc91dc08ecf59a9ef76d2172d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 1 Apr 2026 10:17:15 +0200 Subject: [PATCH] GH-49632: [C++][R] Remove deprecated old MinGW CMake fixes for AWS --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 52 --------------------- 1 file changed, 52 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 0a4c60e3cedf..665d1b5a1ec4 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -3902,35 +3902,6 @@ function(build_awssdk) string(REPLACE "-flto=auto" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-ffat-lto-objects" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - # For aws-c-io - if(MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9") - # This is for RTools 40. We can remove this after we dropped - # support for R < 4.2. schannel.h in RTools 40 is old. - - # For schannel.h - # - # See also: - # https://learn.microsoft.com/en-us/windows/win32/api/schannel/ns-schannel-schannel_cred - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_0_SERVER=0x00000040") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_0_CLIENT=0x00000080") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_1_SERVER=0x00000100") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_1_CLIENT=0x00000200") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_2_SERVER=0x00000400") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_2_CLIENT=0x00000800") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_3_SERVER=0x00001000") - string(APPEND CMAKE_C_FLAGS " -DSP_PROT_TLS1_3_CLIENT=0x00002000") - string(APPEND CMAKE_C_FLAGS " -DSCH_USE_STRONG_CRYPTO=0x00400000") - - # For sspi.h - # - # See also: - # https://learn.microsoft.com/en-us/windows/win32/api/sspi/ne-sspi-sec_application_protocol_negotiation_ext - string(APPEND CMAKE_C_FLAGS " -DSecApplicationProtocolNegotiationExt_ALPN=2") - # See also: - # https://learn.microsoft.com/en-us/windows/win32/api/sspi/ns-sspi-secbuffer - string(APPEND CMAKE_C_FLAGS " -DSECBUFFER_ALERT=17") - endif() - # For aws-sdk-cpp # # We need to use CACHE variables because aws-sdk-cpp < 1.12.0 uses @@ -3970,29 +3941,6 @@ function(build_awssdk) CACHE STRING "" FORCE) endif() endif() - if(MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9") - # This is for RTools 40. We can remove this after we dropped - # support for R < 4.2. schannel.h in RTools 40 is old. - - # For winhttp.h - # - # See also: - # https://learn.microsoft.com/en-us/windows/win32/winhttp/error-messages - string(APPEND CMAKE_CXX_FLAGS " -DERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE=12176") - string(APPEND CMAKE_CXX_FLAGS " -DERROR_WINHTTP_SCRIPT_EXECUTION_ERROR=12177") - # See also: - # https://learn.microsoft.com/en-us/windows/win32/api/winhttp/ns-winhttp-winhttp_async_result - string(APPEND CMAKE_CXX_FLAGS " -DAPI_GET_PROXY_FOR_URL=6") - # See also: - # https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nc-winhttp-winhttp_status_callback - string(APPEND CMAKE_CXX_FLAGS " -DWINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE=0x02000000") - string(APPEND CMAKE_CXX_FLAGS - " -DWINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE=0x04000000") - # See also: - # https://learn.microsoft.com/en-us/windows/win32/winhttp/option-flags - string(APPEND CMAKE_CXX_FLAGS " -DWINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2=0x00000800") - string(APPEND CMAKE_CXX_FLAGS " -DWINHTTP_NO_CLIENT_CERT_CONTEXT=0") - endif() set(AWSSDK_LINK_LIBRARIES) foreach(AWSSDK_PRODUCT ${AWSSDK_PRODUCTS})