[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

Ben Craig via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 18:55:49 PDT 2017


bcraig added inline comments.


================
Comment at: include/support/newlib/xlocale.h:20
+#if defined(__NEWLIB__) && (__NEWLIB__ == 2) \
+    && defined(__NEWLIB_MINOR__) && (__NEWLIB_MINOR__ >= 5) \
+    && (!defined(__POSIX_VISIBLE) || (__POSIX_VISIBLE < 200809))
----------------
orivej wrote:
> You meant `__NEWLIB_MINOR__ < 5`.
> Could not this be just the following?
> ```
> #if __NEWLIB__ < 2 || __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
> #include <support/xlocale/__nop_locale_mgmt.h>
> #endif
> ```
I suspect you are right.  Here's the trouble though... I don't have a good way to test this.  I spent a couple of days trying to get newlib building on my machine, and I ended up giving up.  So I just took Martin J. O'Riordan's patch from here:
http://clang-developers.42468.n3.nabble.com/Re-Newlib-v2-5-0-and-LibC-locale-support-BROKEN-tt4054882.html

Are you in a good position to test this change?  Bonus points if you can try newlib 2.4 and 2.5.


https://reviews.llvm.org/D32146





More information about the cfe-commits mailing list