mirror of
https://github.com/fluencelabs/musl
synced 2025-07-31 22:31:58 +00:00
eliminate bits/wchar.h
the preprocessor can reliably determine the signedness of wchar_t. L'\0' is used for 0 in the expressions so that, if the underlying type of wchar_t is long rather than int, the promoted type of the expression will match the type of wchar_t.
This commit is contained in:
@@ -24,7 +24,13 @@ extern "C" {
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <bits/wchar.h>
|
||||
#if L'\0'-1 > 0
|
||||
#define WCHAR_MAX (0xffffffffu+L'\0')
|
||||
#define WCHAR_MIN (0+L'\0')
|
||||
#else
|
||||
#define WCHAR_MAX (0x7fffffff+L'\0')
|
||||
#define WCHAR_MIN (-1-0x7fffffff+L'\0')
|
||||
#endif
|
||||
|
||||
#define NULL 0L
|
||||
|
||||
|
Reference in New Issue
Block a user