[PATCH] [libc++] Support newlib as libc++'s C library [locale part]

Jonathan Roelofs jonathan at codesourcery.com
Wed Sep 17 11:34:35 PDT 2014


================
Comment at: include/support/newlib/xlocale.h:36
@@ +35,3 @@
+static inline locale_t duplocale(locale_t) {
+  return nullptr;
+}
----------------
jroelofs wrote:
> danalbert wrote:
> > Can't use nullptr here (need to be able to include from pre-C++11 code).
> Good point. I'll change that to NULL for the time being.
> 
> In a separate patch I've got some "healthier" stubs which fix a few of the libc++ tests that want the C locale (i.e. localization/locales/locale/locale.statics/classic.pass.cpp ).
The failure being the:

```

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

one.

http://reviews.llvm.org/D5385






More information about the cfe-commits mailing list