amoeba commented on code in PR #44989: URL: https://github.com/apache/arrow/pull/44989#discussion_r1943296470
########## ci/rtools/awssdk_ep.patch: ########## @@ -0,0 +1,213 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +diff --git a/aws-cpp-sdk-core/include/aws/core/utils/Array.h b/aws-cpp-sdk-core/include/aws/core/utils/Array.h +index 2b5bbc566..7cb93bdf0 100644 +--- a/aws-cpp-sdk-core/include/aws/core/utils/Array.h ++++ b/aws-cpp-sdk-core/include/aws/core/utils/Array.h +@@ -54,7 +54,7 @@ namespace Aws + { + m_data.reset(Aws::NewArray<T>(m_size, ARRAY_ALLOCATION_TAG)); + +-#ifdef _WIN32 ++#ifdef _MSC_VER + std::copy(arrayToCopy, arrayToCopy + arraySize, stdext::checked_array_iterator< T * >(m_data.get(), m_size)); + #else + std::copy(arrayToCopy, arrayToCopy + arraySize, m_data.get()); +@@ -82,7 +82,7 @@ namespace Aws + if(arr->m_size > 0 && arr->m_data) + { + size_t arraySize = arr->m_size; +-#ifdef _WIN32 ++#ifdef _MSC_VER + std::copy(arr->m_data.get(), arr->m_data.get() + arraySize, stdext::checked_array_iterator< T * >(m_data.get() + location, m_size)); + #else + std::copy(arr->m_data.get(), arr->m_data.get() + arraySize, m_data.get() + location); +@@ -101,7 +101,7 @@ namespace Aws + { + m_data.reset(Aws::NewArray<T>(m_size, ARRAY_ALLOCATION_TAG)); + +-#ifdef _WIN32 ++#ifdef _MSC_VER + std::copy(other.m_data.get(), other.m_data.get() + other.m_size, stdext::checked_array_iterator< T * >(m_data.get(), m_size)); + #else + std::copy(other.m_data.get(), other.m_data.get() + other.m_size, m_data.get()); +@@ -134,7 +134,7 @@ namespace Aws + { + m_data.reset(Aws::NewArray<T>(m_size, ARRAY_ALLOCATION_TAG)); + +-#ifdef _WIN32 ++#ifdef _MSC_VER + std::copy(other.m_data.get(), other.m_data.get() + other.m_size, stdext::checked_array_iterator< T * >(m_data.get(), m_size)); + #else + std::copy(other.m_data.get(), other.m_data.get() + other.m_size, m_data.get()); +diff --git a/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h b/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h +index e26e36b60..3e7189b70 100644 +--- a/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h ++++ b/aws-cpp-sdk-core/include/aws/core/utils/crypto/bcrypt/CryptoImpl.h +@@ -29,7 +29,14 @@ namespace Aws + { + namespace Crypto + { +- static const char* SecureRandom_BCrypt_Tag = "SecureRandom_BCrypt"; ++#ifdef __MINGW32__ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-variable" ++#endif ++ static const char* SecureRandom_BCrypt_Tag = "SecureRandom_BCrypt"; ++#ifdef __MINGW32__ ++#pragma GCC diagnostic pop ++#endif + + class SecureRandomBytes_BCrypt : public SecureRandomBytes + { +diff --git a/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp b/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp +index 4dade6489..a0456cf8e 100644 +--- a/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp ++++ b/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp +@@ -22,6 +22,16 @@ + #include <sstream> + #include <iostream> + ++#ifndef WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL ++#define WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL 116 ++#endif ++#ifndef WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 ++#define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 0x00000200 ++#endif ++#ifndef WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 ++#define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 0x00000800 ++#endif ++ + using namespace Aws::Client; + using namespace Aws::Http; + using namespace Aws::Http::Standard; +@@ -272,7 +282,7 @@ bool WinHttpSyncHttpClient::DoQueryHeaders(void* hHttpRequest, std::shared_ptr<H + wmemset(contentTypeStr, 0, static_cast<size_t>(dwSize / sizeof(wchar_t))); + + WinHttpQueryHeaders(hHttpRequest, WINHTTP_QUERY_CONTENT_TYPE, nullptr, &contentTypeStr, &dwSize, 0); +- if (contentTypeStr[0] != NULL) ++ if (contentTypeStr[0]) + { + Aws::String contentStr = StringUtils::FromWString(contentTypeStr); + response->SetContentType(contentStr); +@@ -303,7 +313,7 @@ bool WinHttpSyncHttpClient::DoQueryHeaders(void* hHttpRequest, std::shared_ptr<H + + bool WinHttpSyncHttpClient::DoSendRequest(void* hHttpRequest) const + { +- return (WinHttpSendRequest(hHttpRequest, NULL, NULL, 0, 0, 0, NULL) != 0); ++ return (WinHttpSendRequest(hHttpRequest, NULL, 0, 0, 0, 0, 0) != 0); Review Comment: Hrm, this errors, ``` C:/Users/Bryce/Source/apache/arrow/src/build-i686-cpp/awssdk_ep-prefix/src/awssdk_ep/aws-cpp-sdk-core/source/http/windows/WinHttpSyncHttpClient.cpp:316:71: error: passing NULL to non-pointer argument 7 of 'WINBOOL WinHttpSendRequest(HINTERNET, LPCWSTR, DWORD, LPVOID, DWORD, DWORD, DWORD_PTR)' [-Werror=conversion-null] return (WinHttpSendRequest(hHttpRequest, NULL, 0, NULL, 0, 0, NULL) != 0); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org