-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] Conflict between arrow::compute::MemAllocation::PREALLOCATE
and system header vnode.h
preprocessor define
#38709
Comments
arrow::compute::MemAllocation::PREALLOCATE
and system header vnode.h
preprocessor definearrow::compute::MemAllocation::PREALLOCATE
and system header vnode.h
preprocessor define
Could you open a pull request with the approach? Or we can use |
Hi, I think I would suggest to use the I made a PR. If you choose the Yours, |
Let's choose It seems that a PR isn't made yet. Could you ensure opening a PR with the change? |
Sorry, my bad - forgot to hit the button :-) The PR is here |
…acOS (#38760) ### Rationale for this change The macOS header `sys/vnode.h` defines `PREALLOCATE` as a preprocessor macro, which causes a conflict in `arrow/compute/kernel.h` where the same name is defined as an identifier. Other BSDs does not seem to define this macro. ### What changes are included in this PR? `#undef PREALLOCATE` on macOS and if defined. ### Are these changes tested? Somewhat, in a different context. ### Are there any user-facing changes? If some code specific to macOS actually uses the `PREALLOCATE` macro, then that code may have problems. However, it is unlikely that any user code would use this macro as it seems to be intended for internal use in the BSD kernel of macOS. * Closes: #38709 Lead-authored-by: Christian Holm Christensen <Christian.Holm.Christensen@cern.ch> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…d on macOS (apache#38760) ### Rationale for this change The macOS header `sys/vnode.h` defines `PREALLOCATE` as a preprocessor macro, which causes a conflict in `arrow/compute/kernel.h` where the same name is defined as an identifier. Other BSDs does not seem to define this macro. ### What changes are included in this PR? `#undef PREALLOCATE` on macOS and if defined. ### Are these changes tested? Somewhat, in a different context. ### Are there any user-facing changes? If some code specific to macOS actually uses the `PREALLOCATE` macro, then that code may have problems. However, it is unlikely that any user code would use this macro as it seems to be intended for internal use in the BSD kernel of macOS. * Closes: apache#38709 Lead-authored-by: Christian Holm Christensen <Christian.Holm.Christensen@cern.ch> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Describe the bug, including details regarding any error messages, version, and platform.
Hi,
On MacOSX the system header
vnode.h
defines the symbolPREALLOCATE
as a preprocessor define. This causes a compilation error with#include <arrow/compute/kernel.h>
where this name (PREALLOCATE
) is used as an identifier , ifsys/vnode.h
andarrow/compute/kernel.h
are both (possibly indirectly) included into the same compilation unit.Perhaps the
PREALLOCATE
symbol should be#undef
inarrow/compute/kernel.h
in case it is defined as preprocessor macro - e.g.,Yours,
Christian
Component(s)
C++
The text was updated successfully, but these errors were encountered: