Skip to content

Commit ee6de90

Browse files
pitrouzanmato1984
authored andcommitted
apacheGH-47953: [C++] Remove Windows inclusion from int_util_overflow.h (apache#47950)
### Rationale for this change In `int_util_overflow.h` we're currently including (indirectly) some Windows header through `windows_compatibility.h`: https://github.com/apache/arrow/blob/f669b9fb6b71e74bb41496252709b494233de44d/cpp/src/arrow/util/int_util_overflow.h#L28-L33 This was probably necessary when this was initially committed, but can produce problems when expanding the use of this header in our codebase, due to unwanted macro definitions, here is an [example](https://github.com/apache/arrow/actions/runs/18754865884/job/53504089972?pr=47925): ``` D:/a/arrow/arrow/cpp/src/parquet/arrow/schema.cc:78:45: error: expected unqualified-id 78 | return is_nullable ? Repetition::OPTIONAL : Repetition::REQUIRED; | ^ D:/a/arrow/arrow/cpp/src/parquet/arrow/schema.cc:331:45: error: expected unqualified-id 331 | if (repetition != Repetition::OPTIONAL) { | ^ 2 errors generated. ``` ### What changes are included in this PR? Simply remove the Windows inclusion. This seems to pass our current CI suite. ### Are these changes tested? Yes, by existing CI tests. ### Are there any user-facing changes? No. * GitHub Issue: apache#47953 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 97caec0 commit ee6de90

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

cpp/src/arrow/util/int_util_overflow.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
#include "arrow/util/visibility.h"
2727

2828
// "safe-math.h" includes <intsafe.h> from the Windows headers.
29-
#include "arrow/util/windows_compatibility.h"
3029
#include "arrow/vendored/portable-snippets/safe-math.h"
3130
// clang-format off (avoid include reordering)
32-
#include "arrow/util/windows_fixup.h"
3331
// clang-format on
3432

3533
namespace arrow {

0 commit comments

Comments
 (0)