amoeba commented on code in PR #44989:
URL: https://github.com/apache/arrow/pull/44989#discussion_r1906223903


##########
ci/rtools/awssdk_ep.patch:
##########
@@ -0,0 +1,234 @@
+# 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/external/cjson/cJSON.cpp 
b/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
+index cdcbf103e..03bcf0258 100644
+--- a/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
++++ b/aws-cpp-sdk-core/source/external/cjson/cJSON.cpp
+@@ -2483,7 +2483,15 @@ CJSON_AS4CPP_PUBLIC(cJSON *) 
cJSON_AS4CPP_CreateInt64(long long num)
+         if (num > INT_MAX || num < INT_MIN)
+         {
+             char buf[21];
+-            snprintf(buf, sizeof(buf), "%lld", num);
++#ifdef __MINGW32__
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat"
++#pragma GCC diagnostic ignored "-Wformat-extra-args"
++#endif
++           snprintf(buf, sizeof(buf), "%lld", num);
++#ifdef __MINGW32__
++#pragma GCC diagnostic pop
++#endif

Review Comment:
   Done in 5c9a8484816306cde69f662d3fa549e8482e669b. Builds locally.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to