[PATCH] Update newlib so that it passes libc++'s tests

JF Bastien jfb@chromium.org
Wed Dec 18 22:19:00 GMT 2013


> Recent GCC have built-in defines:
>
> #define __WCHAR_TYPE__ long int
> #define __WCHAR_MAX__ 2147483647L
> #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
>
> Maybe we can use them if available.  Does LLVM also provide such built-in
> defines?

My fix uses __WCHAR_MAX__ and __WCHAR_MIN__ if available. Yes, both
GCC and LLVM have them (rather, LLVM has __WCHAR_MAX__,
__WCHAR_TYPE__, __WCHAR_WIDTH__ and __WCHAR_UNSIGNED__, and its
stdint.h has WCHAR_MAX and WCHAR_MIN definitions based on these).



More information about the Newlib mailing list