Commit 479662e
authored
### Rationale for this change
Windows build breaks when UNICODE is defined. The codebase mixes explicit Wide APIs with generic ones, causing compile errors.
### What changes are included in this PR?
Fixed two API calls to use explicit Wide versions:
- `cpu_info.cc`: `GetModuleHandle("kernel32")` → `GetModuleHandleW(L"kernel32")`
- `io_util.cc`: `CreateFileMapping(..., "")` → `CreateFileMappingW(..., L"")`
### Are these changes tested?
Yes. Built on Windows 11 with MSVC 2022.
Tested with:
```
cmake .. --preset ninja-debug-minimal -DCMAKE_CXX_FLAGS="-DUNICODE -D_UNICODE"
cmake --build .
```
Build completes successfully:
```
[197/197] Linking CXX shared library debug\arrow.dll
```
Also verified the build still works without UNICODE defined.
### Are there any user-facing changes?
No. Just fixes a compile error.
- [#47590 ](#47590)
* GitHub Issue: #47590
Authored-by: aLVINlEE9 <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
1 parent c7cea52 commit 479662e
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
1451 | | - | |
| 1451 | + | |
1452 | 1452 | | |
1453 | 1453 | | |
1454 | 1454 | | |
| |||
0 commit comments