-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update kernel.h for MacOSX #12
base: master
Are you sure you want to change the base?
Conversation
MacOSX defines the `PREALLOCATE` as a macro in the header `vnode.h` which causes compilation problems with at least `AliceO2`. The proposed change `undef`ines the macro if defined so that the name `PREALLOCATE` may be used as an identifier here.
BTW, |
I made a bug report against upstream |
// MacOSX defines `PREALLOCATE` as a macro in the header `vnode.h`. | ||
// Thus, we must undefine that here to have a valid identifier. | ||
// A bug report against upstream code should be made. | ||
#if defined(__APPLE__) && defined(PREALLOCATE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really have to protect only in case of APPLE? Even if no other platform defines PREALLOCATE for the moment, if this happens, the same issues will return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Peter,
I think it is really only APPLE who would have the audacity to do this (mess with a BSD system header).
That said, the symbol PREALLOCATE
seems an obvious candidate for a #define
, so yes, it could pop up elsewhere too. However, I think the likeliness that some other system would define a preprocessor macro like this in a system header is rather small.
Long of the short: I think it is OK to do this only in case of __APPLE__
.
Christian
MacOSX defines the
PREALLOCATE
as a macro in the headervnode.h
which causes compilation problems with at leastAliceO2
. The proposed changeundef
ines the macro if defined so that the namePREALLOCATE
may be used as an identifier here.