-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fix glibc specific conditional for Mac OS/X #5269
Conversation
MacOS seems to define __GLIBC__ but not __GLIBC_PREREQ.
An alternative solution would be to conditionally define __GLIBC_PREREQ:
somewhere. |
@lodenos this might help. |
Thanks @richsalz |
MacOS seems to define __GLIBC__ but not __GLIBC_PREREQ. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #5269)
@@ -231,7 +231,8 @@ static uint64_t get_timer_bits(void) | |||
# if defined(_POSIX_C_SOURCE) \ | |||
&& defined(_POSIX_TIMERS) \ | |||
&& _POSIX_C_SOURCE >= 199309L \ |
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.
It's like producing least readable code was the purpose. I mean _POSIX_C_SOURCE is about same thing, so why is there another thing in between? Basically both _POSIX_C_SOURCE should be in parentheses to denote it's about same thing. As for _POSIX_TIMERS and MacOS X context. It's defined as -1, while Linux(*) man page says it's positive.
(*) It's not clear if we can hold Linux man pages as official standard, one should check POSIX specs.
BTW, referred comment asks "work?", this conversation says "might help". You know what? It doesn't work. In fact it doesn't work on any system [that attempts to compile this] but Linux. |
Which systems doesn't this work for? That conditional is getting complex. Grouping the |
Once again, any that tries to compile it and is not Linux, such as MacOS X, *BSD, OSF, IRIX... VMS ought to fail too... |
In what way isn't this conditional working? I'm confused. |
Just remove __sun condition and see for yourself on Solaris. |
Thanks, got it now. PR coming. |
it does not work for MacOS El Capitan, Sierra, and High Sierra. See #5290. |
MacOS seems to define GLIBC but not __GLIBC_PREREQ.
The issue was reported against this commit. It follows on from the changes in #5231