diff --git a/Userland/Libraries/LibC/bits/stdint.h b/Userland/Libraries/LibC/bits/stdint.h index 7f0e2b3fc7..db63bbaddb 100644 --- a/Userland/Libraries/LibC/bits/stdint.h +++ b/Userland/Libraries/LibC/bits/stdint.h @@ -6,6 +6,7 @@ #pragma once +#include #include __BEGIN_DECLS diff --git a/Userland/Libraries/LibC/bits/wchar_size.h b/Userland/Libraries/LibC/bits/wchar_size.h new file mode 100644 index 0000000000..6620e20060 --- /dev/null +++ b/Userland/Libraries/LibC/bits/wchar_size.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2022, Tim Schumacher + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#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 diff --git a/Userland/Libraries/LibC/wchar.h b/Userland/Libraries/LibC/wchar.h index 17f0af3209..33d129bf6e 100644 --- a/Userland/Libraries/LibC/wchar.h +++ b/Userland/Libraries/LibC/wchar.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include @@ -17,16 +18,6 @@ __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;