X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fwchar.h;h=d8738818c77ffe1e0672ffe9bf49535e63bae06a;hp=b1c6b7fac44c96100467a57c72f9e6fd367dfdaf;hb=ae0c1de530bc3b27069008b8b247171d08dbe80b;hpb=400c5e5c8307a2ebe44ef1f203f5a15669f20347 diff --git a/include/wchar.h b/include/wchar.h index b1c6b7fa..d8738818 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -5,11 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_FILE #define __NEED_va_list @@ -28,15 +24,16 @@ extern "C" { #include -#include - -#undef NULL -#ifdef __cplusplus -#define NULL 0 +#if L'\0'-1 > 0 +#define WCHAR_MAX (0xffffffffu+L'\0') +#define WCHAR_MIN (0+L'\0') #else -#define NULL ((void*)0) +#define WCHAR_MAX (0x7fffffff+L'\0') +#define WCHAR_MIN (-1-0x7fffffff+L'\0') #endif +#define NULL 0L + #undef WEOF #define WEOF (-1)