Skip to content
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 uselocale to support non-default locales. #7

Merged
merged 1 commit into from
Apr 5, 2019
Merged

Conversation

sunfishcode
Copy link
Member

Musl's locales implementation depends on pthreads. Since WASI libc
doesn't yet have pthreads, it currently has alternate code for
supporting locales. Previously, this code just assumed that it only had
to support the default locale, however libc++ uses uselocale with
non-default locals, so add support for that.

With this, the C++ -style hello world now works, with
-fno-exceptions.

Musl's locales implementation depends on pthreads. Since WASI libc
doesn't yet have pthreads, it currently has alternate code for
supporting locales. Previously, this code just assumed that it only had
to support the default locale, however libc++ uses uselocale with
non-default locals, so add support for that.

With this, the C++ <iostream>-style hello world now works, with
-fno-exceptions.
@sunfishcode
Copy link
Member Author

Taking the liberty of merging this, to unblock C++. This also cleans up an earlier hack, so even if we should make further changes here, this is a better place to start from than before.

@sunfishcode sunfishcode merged commit 2479271 into master Apr 5, 2019
@sunfishcode sunfishcode deleted the uselocale branch April 5, 2019 15:34
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.

1 participant