Skip to content

[CF] OpenBSD doesn't have the xlocale header. #2609

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

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

3405691582
Copy link
Member

OpenBSD is one of the platforms that doesn't have xlocale.h, so ensure
that the header is not used and the relevant macros are exposed.

@spevans
Copy link
Contributor

spevans commented Jan 14, 2020

@swift-ci test

@@ -97,9 +97,9 @@ CF_EXTERN_C_BEGIN

#if TARGET_OS_MAC || TARGET_OS_LINUX || TARGET_OS_BSD

#if !TARGET_OS_CYGWIN && !defined(__linux__)
#if !TARGET_OS_CYGWIN && !defined(__linux__) && !defined(__OpenBSD__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to your change, but this is confusing. I assume that the condition in conjunction with L98 means that this is for Android, macOS, and *BSD but not OpenBSD. Would you mind rewriting this as such: #if defined(ANDROID) || (TARGET_OS_BSD && !defined(__OpenBSD__)) || TARGET_OS_MAC

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. (Used TARGET_OS_ANDROID instead of defined(ANDROID) and reordered the clauses.)

OpenBSD is one of the platforms that doesn't have xlocale.h, so ensure
that the header is not used and the relevant macros are exposed.

While we are here, change the sense of the conditionals in CFInternal.h
to be a little more clear and consistent.
@3405691582 3405691582 force-pushed the CFInternal_NoXlocaleOnOpenBSD branch from d1820fa to 6ca0868 Compare January 15, 2020 03:02
@compnerd
Copy link
Member

@swift-ci please test

@compnerd compnerd merged commit beb667d into swiftlang:master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants