Skip to content

Commit 173619f

Browse files
Switch the cpp to 21.0.00
1 parent 32d3111 commit 173619f

253 files changed

Lines changed: 3339 additions & 3642 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cpp/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ cmake_policy(SET CMP0074 NEW)
6161
# option() honors normal variables.
6262
cmake_policy(SET CMP0077 NEW)
6363

64-
# https://cmake.org/cmake/help/latest/policy/CMP0090.html
65-
#
66-
# export(PACKAGE) does nothing by default.
67-
cmake_policy(SET CMP0090 NEW)
68-
6964
# https://cmake.org/cmake/help/latest/policy/CMP0091.html
7065
#
7166
# MSVC runtime library flags are selected by an abstraction.
@@ -96,7 +91,7 @@ if(POLICY CMP0170)
9691
cmake_policy(SET CMP0170 NEW)
9792
endif()
9893

99-
set(ARROW_VERSION "22.0.0-SNAPSHOT")
94+
set(ARROW_VERSION "21.0.0")
10095

10196
string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" ARROW_BASE_VERSION "${ARROW_VERSION}")
10297

@@ -706,6 +701,10 @@ if(ARROW_GANDIVA)
706701
add_subdirectory(src/gandiva)
707702
endif()
708703
704+
if(ARROW_SKYHOOK)
705+
add_subdirectory(src/skyhook)
706+
endif()
707+
709708
if(ARROW_BUILD_EXAMPLES)
710709
add_custom_target(runexample ctest -L example)
711710
add_subdirectory(examples/arrow)

cpp/CMakePresets.json

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
"ARROW_BUILD_EXAMPLES": "ON",
180180
"ARROW_BUILD_UTILITIES": "ON",
181181
"ARROW_FLIGHT_SQL_ODBC": "ON",
182+
"ARROW_SKYHOOK": "ON",
182183
"ARROW_TENSORFLOW": "ON",
183184
"PARQUET_BUILD_EXAMPLES": "ON",
184185
"PARQUET_BUILD_EXECUTABLES": "ON"
@@ -581,34 +582,6 @@
581582
],
582583
"displayName": "Benchmarking build with everything enabled",
583584
"cacheVariables": {}
584-
},
585-
{
586-
"name": "ninja-release-jni-macos",
587-
"inherits": [
588-
"base-release"
589-
],
590-
"displayName": "Build for JNI on macOS",
591-
"cacheVariables": {
592-
"ARROW_ACERO": "ON",
593-
"ARROW_BUILD_SHARED": "OFF",
594-
"ARROW_BUILD_STATIC": "ON",
595-
"ARROW_CSV": "ON",
596-
"ARROW_DATASET": "ON",
597-
"ARROW_DEPENDENCY_USE_SHARED": "OFF",
598-
"ARROW_GANDIVA": "ON",
599-
"ARROW_GANDIVA_STATIC_LIBSTDCPP": "ON",
600-
"ARROW_JSON": "ON",
601-
"ARROW_ORC": "ON",
602-
"ARROW_PARQUET": "ON",
603-
"ARROW_S3": "ON",
604-
"ARROW_SUBSTRAIT": "ON",
605-
"AWSSDK_SOURCE": "BUNDLED",
606-
"GTest_SOURCE": "BUNDLED",
607-
"PARQUET_BUILD_EXAMPLES": "OFF",
608-
"PARQUET_BUILD_EXECUTABLES": "OFF",
609-
"PARQUET_REQUIRE_ENCRYPTION": "OFF",
610-
"re2_SOURCE": "BUNDLED"
611-
}
612585
}
613586
]
614587
}

cpp/build-support/run-test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ function setup_sanitizers() {
7777

7878
# Set up suppressions for AddressSanitizer
7979
ASAN_OPTIONS="$ASAN_OPTIONS suppressions=$ROOT/build-support/asan-suppressions.txt"
80-
ASAN_OPTIONS="$ASAN_OPTIONS allocator_may_return_null=1"
8180
export ASAN_OPTIONS
8281

8382
# Set up suppressions for LeakSanitizer

cpp/build-support/update-flatbuffers.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ FILES=($(find $FORMAT_DIR -name '*.fbs'))
3434
FILES+=("$SOURCE_DIR/arrow/ipc/feather.fbs")
3535

3636
$FLATC -o "$OUT_DIR" "${FILES[@]}"
37+
38+
# Skyhook flatbuffers
39+
$FLATC -o "$SOURCE_DIR/skyhook/protocol" \
40+
"$SOURCE_DIR/skyhook/protocol/ScanRequest.fbs"

cpp/cmake_modules/BuildUtils.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ function(ADD_ARROW_LIB LIB_NAME)
265265
if(ARG_DEFINITIONS)
266266
target_compile_definitions(${LIB_NAME}_objlib PRIVATE ${ARG_DEFINITIONS})
267267
endif()
268-
target_compile_options(${LIB_NAME}_objlib PRIVATE ${ARROW_LIBRARIES_ONLY_CXX_FLAGS})
269268
set(LIB_DEPS $<TARGET_OBJECTS:${LIB_NAME}_objlib>)
270269
set(EXTRA_DEPS)
271270

@@ -327,7 +326,6 @@ function(ADD_ARROW_LIB LIB_NAME)
327326
if(ARG_DEFINITIONS)
328327
target_compile_definitions(${LIB_NAME}_shared PRIVATE ${ARG_DEFINITIONS})
329328
endif()
330-
target_compile_options(${LIB_NAME}_shared PRIVATE ${ARROW_LIBRARIES_ONLY_CXX_FLAGS})
331329

332330
if(ARG_OUTPUTS)
333331
list(APPEND ${ARG_OUTPUTS} ${LIB_NAME}_shared)
@@ -418,7 +416,6 @@ function(ADD_ARROW_LIB LIB_NAME)
418416
if(ARG_DEFINITIONS)
419417
target_compile_definitions(${LIB_NAME}_static PRIVATE ${ARG_DEFINITIONS})
420418
endif()
421-
target_compile_options(${LIB_NAME}_static PRIVATE ${ARROW_LIBRARIES_ONLY_CXX_FLAGS})
422419

423420
if(ARG_OUTPUTS)
424421
list(APPEND ${ARG_OUTPUTS} ${LIB_NAME}_static)

cpp/cmake_modules/DefineOptions.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,15 @@ takes precedence over ccache if a storage backend is configured" ON)
407407
DEPENDS
408408
ARROW_S3)
409409

410+
define_option(ARROW_SKYHOOK
411+
"Build the Skyhook libraries"
412+
OFF
413+
DEPENDS
414+
ARROW_DATASET
415+
ARROW_PARQUET
416+
ARROW_WITH_LZ4
417+
ARROW_WITH_SNAPPY)
418+
410419
define_option(ARROW_SUBSTRAIT
411420
"Build the Arrow Substrait Consumer Module"
412421
OFF

cpp/cmake_modules/SetupCxxFlags.cmake

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ endif()
4949
if(ARROW_CPU_FLAG STREQUAL "x86")
5050
# x86/amd64 compiler flags, msvc/gcc/clang
5151
if(MSVC)
52-
set(ARROW_SSE4_2_FLAG "/arch:SSE4.2")
53-
# These definitions are needed for xsimd to consider the corresponding instruction
54-
# sets available, but they are not set by MSVC (unlike other compilers).
55-
# See https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4265
56-
add_definitions(-D__SSE2__ -D__SSE4_1__ -D__SSE4_2__)
52+
set(ARROW_SSE4_2_FLAG "")
5753
set(ARROW_AVX2_FLAG "/arch:AVX2")
5854
# MSVC has no specific flag for BMI2, it seems to be enabled with AVX2
5955
set(ARROW_BMI2_FLAG "/arch:AVX2")
@@ -159,9 +155,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ${ARROW_POSITION_INDEPENDENT_CODE})
159155
set(UNKNOWN_COMPILER_MESSAGE
160156
"Unknown compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
161157

162-
# Compiler flags used when building Arrow libraries (but not tests, utilities, etc.)
163-
set(ARROW_LIBRARIES_ONLY_CXX_FLAGS)
164-
165158
# compiler flags that are common across debug/release builds
166159
if(WIN32)
167160
# TODO(wesm): Change usages of C runtime functions that MSVC says are
@@ -325,9 +318,6 @@ if("${BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN")
325318
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wimplicit-fallthrough")
326319
string(APPEND CXX_ONLY_FLAGS " -Wredundant-move")
327320
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wunused-result")
328-
# Flag non-static functions that don't have corresponding declaration in a .h file.
329-
# Only for Arrow libraries, since this is not a problem in tests or utilities.
330-
list(APPEND ARROW_LIBRARIES_ONLY_CXX_FLAGS "-Wmissing-declarations")
331321
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER_ID STREQUAL
332322
"IntelLLVM")
333323
if(WIN32)

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,7 @@ macro(prepare_fetchcontent)
10161016
set(BUILD_TESTING OFF)
10171017
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "")
10181018
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
1019-
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON)
1020-
set(CMAKE_EXPORT_PACKAGE_REGISTRY OFF)
1019+
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY OFF)
10211020
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "")
10221021
set(CMAKE_MACOSX_RPATH ${ARROW_INSTALL_NAME_RPATH})
10231022
# We set CMAKE_POLICY_VERSION_MINIMUM temporarily due to failures with CMake 4
@@ -1739,29 +1738,8 @@ function(build_thrift)
17391738
if(CMAKE_VERSION VERSION_LESS 3.26)
17401739
message(FATAL_ERROR "Require CMake 3.26 or later for building bundled Apache Thrift")
17411740
endif()
1742-
set(THRIFT_PATCH_COMMAND)
1743-
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
1744-
find_program(PATCH patch)
1745-
if(PATCH)
1746-
list(APPEND
1747-
THRIFT_PATCH_COMMAND
1748-
${PATCH}
1749-
-p1
1750-
-i)
1751-
else()
1752-
find_program(GIT git)
1753-
if(GIT)
1754-
list(APPEND THRIFT_PATCH_COMMAND ${GIT} apply)
1755-
endif()
1756-
endif()
1757-
if(THRIFT_PATCH_COMMAND)
1758-
# https://github.com/apache/thrift/pull/3187
1759-
list(APPEND THRIFT_PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/thrift-3187.patch)
1760-
endif()
1761-
endif()
17621741
fetchcontent_declare(thrift
17631742
${FC_DECLARE_COMMON_OPTIONS}
1764-
PATCH_COMMAND ${THRIFT_PATCH_COMMAND}
17651743
URL ${THRIFT_SOURCE_URL}
17661744
URL_HASH "SHA256=${ARROW_THRIFT_BUILD_SHA256_CHECKSUM}")
17671745

@@ -1788,10 +1766,6 @@ function(build_thrift)
17881766
set(WITH_QT5 OFF)
17891767
set(WITH_ZLIB OFF)
17901768

1791-
# Apache Thrift may change CMAKE_DEBUG_POSTFIX. So we'll restore the
1792-
# original CMAKE_DEBUG_POSTFIX later.
1793-
set(CMAKE_DEBUG_POSTFIX_KEEP ${CMAKE_DEBUG_POSTFIX})
1794-
17951769
# Remove Apache Arrow's CMAKE_MODULE_PATH to ensure using Apache
17961770
# Thrift's cmake_modules/.
17971771
#
@@ -1800,12 +1774,6 @@ function(build_thrift)
18001774
list(POP_FRONT CMAKE_MODULE_PATH)
18011775
fetchcontent_makeavailable(thrift)
18021776

1803-
# Apache Thrift may change CMAKE_DEBUG_POSTFIX. So we restore
1804-
# CMAKE_DEBUG_POSTFIX.
1805-
set(CMAKE_DEBUG_POSTFIX
1806-
${CMAKE_DEBUG_POSTFIX_KEEP}
1807-
CACHE BOOL "" FORCE)
1808-
18091777
if(CMAKE_VERSION VERSION_LESS 3.28)
18101778
set_property(DIRECTORY ${thrift_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL TRUE)
18111779
endif()
@@ -2580,7 +2548,7 @@ if(ARROW_USE_XSIMD)
25802548
IS_RUNTIME_DEPENDENCY
25812549
FALSE
25822550
REQUIRED_VERSION
2583-
"13.0.0")
2551+
"8.1.0")
25842552

25852553
if(xsimd_SOURCE STREQUAL "BUNDLED")
25862554
set(ARROW_XSIMD arrow::xsimd)
@@ -5055,8 +5023,6 @@ endif()
50555023
# AWS SDK for C++
50565024

50575025
function(build_awssdk)
5058-
list(APPEND CMAKE_MESSAGE_INDENT "AWS SDK for C++: ")
5059-
50605026
message(STATUS "Building AWS SDK for C++ from source")
50615027

50625028
# aws-c-common must be the first product because others depend on
@@ -5090,8 +5056,14 @@ function(build_awssdk)
50905056
# AWS-C-CAL ->
50915057
# AWS_C_CAL
50925058
string(REGEX REPLACE "-" "_" BASE_VARIABLE_NAME "${BASE_VARIABLE_NAME}")
5059+
if(MINGW AND AWSSDK_PRODUCT STREQUAL "aws-c-common")
5060+
find_program(PATCH patch REQUIRED)
5061+
set(${BASE_VARIABLE_NAME}_PATCH_COMMAND
5062+
${PATCH} -p1 -i ${CMAKE_CURRENT_LIST_DIR}/aws-c-common-1208.patch)
5063+
endif()
50935064
fetchcontent_declare(${AWSSDK_PRODUCT}
50945065
${FC_DECLARE_COMMON_OPTIONS} OVERRIDE_FIND_PACKAGE
5066+
PATCH_COMMAND ${${BASE_VARIABLE_NAME}_PATCH_COMMAND}
50955067
URL ${${BASE_VARIABLE_NAME}_SOURCE_URL}
50965068
URL_HASH "SHA256=${ARROW_${BASE_VARIABLE_NAME}_BUILD_SHA256_CHECKSUM}"
50975069
)
@@ -5161,9 +5133,9 @@ function(build_awssdk)
51615133

51625134
# For aws-sdk-cpp
51635135
#
5164-
# We need to use CACHE variables because aws-sdk-cpp < 1.12.0 uses
5136+
# We need to use CACHE variables because aws-sdk-cpp < 12.0.0 uses
51655137
# CMP0077 OLD policy. We can use normal variables when we use
5166-
# aws-sdk-cpp >= 1.12.0.
5138+
# aws-sdk-cpp >= 12.0.0.
51675139
set(AWS_SDK_WARNINGS_ARE_ERRORS
51685140
OFF
51695141
CACHE BOOL "" FORCE)
@@ -5188,15 +5160,12 @@ function(build_awssdk)
51885160
OFF
51895161
CACHE BOOL "" FORCE)
51905162
if(NOT WIN32)
5191-
if(ZLIB_VENDORED)
5192-
# Use vendored zlib.
5193-
set(ZLIB_INCLUDE_DIR
5194-
"$<TARGET_PROPERTY:ZLIB::ZLIB,INTERFACE_INCLUDE_DIRECTORIES>"
5195-
CACHE STRING "" FORCE)
5196-
set(ZLIB_LIBRARY
5197-
"$<TARGET_FILE:ZLIB::ZLIB>"
5198-
CACHE STRING "" FORCE)
5199-
endif()
5163+
set(ZLIB_INCLUDE_DIR
5164+
"$<TARGET_PROPERTY:ZLIB::ZLIB,INTERFACE_INCLUDE_DIRECTORIES>"
5165+
CACHE STRING "" FORCE)
5166+
set(ZLIB_LIBRARY
5167+
"$<TARGET_FILE:ZLIB::ZLIB>"
5168+
CACHE STRING "" FORCE)
52005169
endif()
52015170
if(MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9")
52025171
# This is for RTools 40. We can remove this after we dropped
@@ -5263,15 +5232,9 @@ function(build_awssdk)
52635232
set(AWSSDK_LINK_LIBRARIES
52645233
${AWSSDK_LINK_LIBRARIES}
52655234
PARENT_SCOPE)
5266-
5267-
list(POP_BACK CMAKE_MESSAGE_INDENT)
52685235
endfunction()
52695236

52705237
if(ARROW_S3)
5271-
if(NOT WIN32)
5272-
# This is for adding system curl dependency.
5273-
find_curl()
5274-
endif()
52755238
# Keep this in sync with s3fs.cc
52765239
resolve_dependency(AWSSDK
52775240
HAVE_ALT
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
From 06c435c6765833734c62ac45909b5ab1fc5276a7 Mon Sep 17 00:00:00 2001
19+
From: Sutou Kouhei <kou@clear-code.com>
20+
Date: Sat, 7 Jun 2025 20:40:36 +0900
21+
Subject: [PATCH] Use _WIN32 not _MSC_VER for MinGW
22+
23+
This was missed in https://github.com/awslabs/aws-c-common/pull/801
24+
and https://github.com/awslabs/aws-c-common/pull/822 .
25+
26+
MSYS2 also includes this change:
27+
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-aws-c-common/001-fix-build-on-mingw-aarch64.patch
28+
29+
Error message without this:
30+
31+
https://github.com/ursacomputing/crossbow/actions/runs/15502494926/job/43652596580#step:7:5884
32+
33+
cd /D/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-build && /D/a/crossbow/crossbow/sccache/sccache.exe /C/rtools40/mingw32/bin/cc.exe -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DARROW_WITH_TIMING_TESTS -DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE -DCJSON_HIDE_SYMBOLS -DINTEL_NO_ITTNOTIFY_API -DPSAPI_VERSION=1 -DWINDOWS_KERNEL_LIB=kernel32 -D_CRT_SECURE_NO_WARNINGS @CMakeFiles/aws-c-common.dir/includes_C.rsp -O3 -DNDEBUG -O2 -ftree-vectorize -std=gnu99 -fvisibility=hidden -Wall -Wstrict-prototypes -pedantic -Wno-long-long -fPIC -D_FILE_OFFSET_BITS=64 -MD -MT _deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/source/allocator.c.obj -MF CMakeFiles/aws-c-common.dir/source/allocator.c.obj.d -o CMakeFiles/aws-c-common.dir/source/allocator.c.obj -c /D/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/source/allocator.c
34+
In file included from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_order.h:71,
35+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_buf.h:9,
36+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/thread.h:8,
37+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/logging.h:11,
38+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/source/allocator.c:8:
39+
D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_order.inl: In function 'aws_hton64':
40+
D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_order.inl:47:23: warning: implicit declaration of function 'htonl'; did you mean 'wtoll'? [-Wimplicit-function-declaration]
41+
return ((uint64_t)htonl(low)) << 32 | htonl(high);
42+
^~~~~
43+
wtoll
44+
In file included from C:/rtools40/mingw32/i686-w64-mingw32/include/windows.h:92,
45+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/source/allocator.c:15:
46+
C:/rtools40/mingw32/i686-w64-mingw32/include/winsock.h: At top level:
47+
C:/rtools40/mingw32/i686-w64-mingw32/include/winsock.h:286:37: error: conflicting types for 'htonl'
48+
WINSOCK_API_LINKAGE u_long WSAAPI htonl(u_long hostlong);
49+
^~~~~
50+
In file included from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_order.h:71,
51+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_buf.h:9,
52+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/thread.h:8,
53+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/logging.h:11,
54+
from D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/source/allocator.c:8:
55+
D:/a/crossbow/crossbow/src/build-i686-cpp/_deps/aws-c-common-src/include/aws/common/byte_order.inl:47:23: note: previous implicit declaration of 'htonl' was here
56+
return ((uint64_t)htonl(low)) << 32 | htonl(high);
57+
^~~~~
58+
---
59+
include/aws/common/byte_order.inl | 4 ++--
60+
1 file changed, 2 insertions(+), 2 deletions(-)
61+
62+
diff --git a/include/aws/common/byte_order.inl b/include/aws/common/byte_order.inl
63+
index 1204be06a1..0abd9cb8cd 100644
64+
--- a/include/aws/common/byte_order.inl
65+
+++ b/include/aws/common/byte_order.inl
66+
@@ -13,7 +13,7 @@
67+
# include <stdlib.h>
68+
#else
69+
# include <netinet/in.h>
70+
-#endif /* _MSC_VER */
71+
+#endif /* _WIN32 */
72+
73+
AWS_EXTERN_C_BEGIN
74+
75+
@@ -39,7 +39,7 @@ AWS_STATIC_IMPL uint64_t aws_hton64(uint64_t x) {
76+
uint64_t v;
77+
__asm__("bswap %q0" : "=r"(v) : "0"(x));
78+
return v;
79+
-#elif defined(_MSC_VER)
80+
+#elif defined(_WIN32)
81+
return _byteswap_uint64(x);
82+
#else
83+
uint32_t low = x & UINT32_MAX;

0 commit comments

Comments
 (0)