musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/include/stdint.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013年04月04日 19:57:23 -0400
committerRich Felker <dalias@aerifal.cx>2013年04月04日 19:57:23 -0400
commitc7af2710007865861e789b29e803f0f55deba93f (patch)
tree6cbf4186d689a0bafc85b2f9d4d63b581bb2f266 /include/stdint.h
parent201995f382cc698ae19289623cc06a70048ffe7b (diff)
downloadmusl-c7af2710007865861e789b29e803f0f55deba93f.tar.gz
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.
Diffstat (limited to 'include/stdint.h')
-rw-r--r--include/stdint.h 9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/stdint.h b/include/stdint.h
index 7ca9d76b..486d1ac2 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -78,7 +78,14 @@ typedef unsigned long long uintmax_t;
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
-#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
+
#include <bits/stdint.h>
#endif
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月10日 05:48:59 +0000

AltStyle によって変換されたページ (->オリジナル) /