This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Support Newlib as libc++'s C library [locale part 2]
AbandonedPublic

Authored by jroelofs on Sep 19 2014, 2:04 PM.

Details

Reviewers
danalbert
jfb
Summary

Give newlocale/freelocale/duplocale/uselocale something closer to how the real ones would behave, fixing failures like:

terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for C

in tests like:

localization/locales/locale/locale.statics/classic.pass.cpp

Diff Detail

Event Timeline

jroelofs updated this revision to Diff 13890.Sep 19 2014, 2:04 PM
jroelofs retitled this revision from to [libc++] Support Newlib as libc++'s C library [locale part 2].
jroelofs updated this object.
jroelofs edited the test plan for this revision. (Show Details)
jroelofs added reviewers: jfb, danalbert.
jroelofs added subscribers: EricWF, Unknown Object (MLST).

This is waaay not thread safe. The right way to fix all of this is to implement the *_l functions in newlib, and skip all of this awkward and not-so-correct shim business.

For now it makes more sense to just xfail the tests that would otherwise need this.

jroelofs abandoned this revision.Sep 22 2014, 10:40 AM