[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
Mon Apr 17 18:21:15 PDT 2017
bcraig created this revision.
newlib 2.5 added the locale management functions, and so our stub __nop_locale_mgmt.h shouldn't be included, as it conflicts with newlibs definitions. newlib 2.4 and earlier still need the header though.
Patch by Martin J. O'Riordan
https://reviews.llvm.org/D32146
Files:
include/support/newlib/xlocale.h
Index: include/support/newlib/xlocale.h
===================================================================
--- include/support/newlib/xlocale.h
+++ include/support/newlib/xlocale.h
@@ -16,7 +16,11 @@
#include <clocale>
#include <cwctype>
#include <ctype.h>
+#if defined(__NEWLIB__) && (__NEWLIB__ == 2) \
+ && defined(__NEWLIB_MINOR__) && (__NEWLIB_MINOR__ >= 5) \
+ && (!defined(__POSIX_VISIBLE) || (__POSIX_VISIBLE < 200809))
#include <support/xlocale/__nop_locale_mgmt.h>
+#endif
#include <support/xlocale/__posix_l_fallback.h>
#include <support/xlocale/__strtonum_fallback.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32146.95517.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170418/58777f45/attachment.bin>
More information about the cfe-commits
mailing list