Skip to content

Added guard around #include <xlocale.h> for Linux #1381

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
Dec 27, 2017

Conversation

tachoknight
Copy link
Contributor

xlocale.h was removed in glibc 2.26 so any version of Linux with that or later versions will not be able to compile successfully. This change adds a guard to check that if we're not compiling on Linux, to go ahead and include it.

… Linux, the file will not be included (xlocale.h was removed in glibc 2.26)
@millenomi
Copy link
Contributor

@swift-ci please test.

@pushkarnk
Copy link
Member

pushkarnk commented Dec 27, 2017

@tachoknight Thanks for this pull request!

This means CF never used anything from xlocale.h on Linux. Though it makes sense to exclude it on Linux, another option could have been including locale.h which I learn is a superset of xlocale.h. Just mentioning this for future references.

@pushkarnk
Copy link
Member

@swift-ci please test and merge

@swift-ci swift-ci merged commit e3557db into swiftlang:master Dec 27, 2017
@parkera
Copy link
Contributor

parkera commented Jan 2, 2018

I would rather we have used the DEPLOYMENT_TARGET macros here.

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.

5 participants