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>
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>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits