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


##########
ci/rtools/BuildAwsCCommon.patch:
##########
@@ -0,0 +1,66 @@
+# 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/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake
+index b717bca..5aa8ac9 100644
+--- a/cmake/AwsCFlags.cmake
++++ b/cmake/AwsCFlags.cmake
+@@ -120,6 +120,10 @@ function(aws_set_common_properties target)
+             list(APPEND AWS_C_FLAGS -Wno-strict-aliasing)
+         endif()
+
++         if(CMAKE_C_IMPLICIT_LINK_LIBRARIES MATCHES "mingw32")
++            list(APPEND AWS_C_FLAGS -D__USE_MINGW_ANSI_STDIO=1 
-Wno-unused-local-typedefs)
++        endif()
++
+         # -moutline-atomics generates code for both older load/store 
exclusive atomics and also
+         # Arm's Large System Extensions (LSE) which scale substantially 
better on large core count systems.
+         #
+diff --git a/include/aws/common/byte_order.inl 
b/include/aws/common/byte_order.inl
+index 1204be0..0abd9cb 100644
+--- a/include/aws/common/byte_order.inl
++++ b/include/aws/common/byte_order.inl
+@@ -13,7 +13,7 @@
+ #    include <stdlib.h>
+ #else
+ #    include <netinet/in.h>
+-#endif /* _MSC_VER */
++#endif /* _WIN32 */
+
+ AWS_EXTERN_C_BEGIN
+
+@@ -39,7 +39,7 @@ AWS_STATIC_IMPL uint64_t aws_hton64(uint64_t x) {
+     uint64_t v;
+     __asm__("bswap %q0" : "=r"(v) : "0"(x));
+     return v;
+-#elif defined(_MSC_VER)
++#elif defined(_WIN32)
+     return _byteswap_uint64(x);
+ #else
+     uint32_t low = x & UINT32_MAX;
+diff --git a/source/windows/thread.c b/source/windows/thread.c
+index 447fcd2..01e643f 100644
+--- a/source/windows/thread.c
++++ b/source/windows/thread.c
+@@ -10,6 +10,7 @@
+ #include <aws/common/private/thread_shared.h>
+ #include <aws/common/string.h>
+
++#define _WIN32_WINNT 0x0601

Review Comment:
   Initial testing looks good, waiting for it to build fully locally now.



-- 
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