summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-12-20 01:22:01 +0330
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-12-21 21:24:36 +0330
commit0fdf52f6dd001ec56a96fe3e21455f5e599ff3a1 (patch)
tree7460bcb365c7123f8d1ce6126f6e92bd6edbcf35 /Userland/Libraries/LibC
parent687a3351c20e2e8e09b7f96755a36c2027f0c0bb (diff)
downloadserenity-0fdf52f6dd001ec56a96fe3e21455f5e599ff3a1.zip
LibC: Define WCHAR_{MIN,MAX}
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/wchar.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/wchar.h b/Userland/Libraries/LibC/wchar.h
index 0562b965ac..17f0af3209 100644
--- a/Userland/Libraries/LibC/wchar.h
+++ b/Userland/Libraries/LibC/wchar.h
@@ -17,6 +17,16 @@ __BEGIN_DECLS
# define WEOF (0xffffffffu)
#endif
+#undef WCHAR_MAX
+#undef WCHAR_MIN
+#define WCHAR_MAX __WCHAR_MAX__
+#ifdef __WCHAR_MIN__
+# define WCHAR_MIN __WCHAR_MIN__
+#else
+// Note: This assumes that wchar_t is a signed type.
+# define WCHAR_MIN (-WCHAR_MAX - 1)
+#endif
+
typedef __WINT_TYPE__ wint_t;
typedef unsigned long int wctype_t;