-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[CF] DT_WHT is unavailable on OpenBSD. #2589
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
[CF] DT_WHT is unavailable on OpenBSD. #2589
Conversation
Here we duplicate this extended conditional to not reference DT_WHT, which is not available on OpenBSD. It is probably harmless to actually remove DT_WHT entirely here unconditionally, but would require grokking more context for a simple buildfix. It also seems more readable to duplicate the entire line in the ifdef despite being able to squish the ifdef in the clause.
Let me know if you'd prefer adding some additional preprocessor symbols in (maybe) CoreFoundation_Prefix.h instead of injecting actual OS preprocessor symbols. |
Is |
Perhaps it's better stylistically to leave granular portability decisions to CoreFoundation_Prefix.h: so, for this example,
and then use |
I tried that approach in the past (focus on features instead of platforms) but was never happy with the result. It just results in a lot of extra macros, most of which are just aliases for "platform X". |
Sounds good. I'll keep this commit as-is and use that pattern for future PRs. |
@swift-ci please test |
I wish that there was a better way to write this, but I suppose it will do for now. |
It'll possibly look better if refactored slightly, but I'll think about circling back around to that after I'm done with all the portability tweaks. |
Here we duplicate this extended conditional to not reference DT_WHT,
which is not available on OpenBSD. It is probably harmless to actually
remove DT_WHT entirely here unconditionally, but would require grokking
more context for a simple buildfix.
It also seems more readable to duplicate the entire line in the ifdef
despite being able to squish the ifdef in the clause.