Skip to content

Commit b493d7d

Browse files
committed
Try to fix build on MinGW32
1 parent f558d78 commit b493d7d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

cpp/src/arrow/vendored/fast_float/float_common.h

+6-9
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@
88
#include <strings.h>
99
#endif
1010

11-
#if defined(_MSC_VER) && !defined(__clang__)
12-
#define FASTFLOAT_VISUAL_STUDIO 1
13-
#endif
14-
15-
#ifdef FASTFLOAT_VISUAL_STUDIO
11+
#ifdef _MSC_VER
1612
#define fastfloat_really_inline __forceinline
1713
#else
1814
#define fastfloat_really_inline inline __attribute__((always_inline))
1915
#endif
2016

21-
#ifdef _MSC_VER
17+
#ifdef _WIN32
2218
#define fastfloat_strcasecmp _stricmp
2319
#define fastfloat_strncasecmp _strnicmp
2420
#else
@@ -59,7 +55,7 @@ struct value128 {
5955
/* result might be undefined when input_num is zero */
6056
fastfloat_really_inline
6157
int leading_zeroes(uint64_t input_num) {
62-
#ifdef FASTFLOAT_VISUAL_STUDIO
58+
#ifdef _MSC_VER
6359
unsigned long leading_zero = 0;
6460
// Search the mask data from most significant bit (MSB)
6561
// to least significant bit (LSB) for a set bit (1).
@@ -73,7 +69,8 @@ int leading_zeroes(uint64_t input_num) {
7369
}
7470

7571

76-
#ifdef FASTFLOAT_VISUAL_STUDIO
72+
#if defined(_WIN32) && !defined(__clang__)
73+
// Note MinGW falls here too
7774
#include <intrin.h>
7875

7976
#if !defined(_M_X64) && !defined(_M_ARM64)// _umul128 for x86, arm
@@ -106,7 +103,7 @@ fastfloat_really_inline value128 full_multiplication(uint64_t value1, uint64_t v
106103
return answer;
107104
}
108105

109-
#else
106+
#else // !FASTFLOAT_VISUAL_STUDIO
110107

111108
// compute value1 * value2
112109
fastfloat_really_inline

0 commit comments

Comments
 (0)