LibC: Make WEOF a signed value on clang

The actual value is unchanged, but the previous `0xffffffff` was an
unsigned value, which lead to clang getting mad at `foowc() == WEOF`.
This commit makes it a signed int on clang, which *should* serve
the same purpose and not lead to clang getting mad at us.
This commit is contained in:
Ali Mohammad Pur 2021-12-20 10:35:42 +03:30 committed by Ali Mohammad Pur
parent 0d7d2b825e
commit ccb9cae8e9
Notes: sideshowbarker 2024-07-17 22:28:51 +09:00

View file

@ -13,8 +13,13 @@
__BEGIN_DECLS
// Note: wint_t is unsigned on gcc, and signed on clang.
#ifndef WEOF
# define WEOF (0xffffffffu)
# ifdef __clang__
# define WEOF (-1)
# else
# define WEOF (0xffffffffu)
# endif
#endif
#undef WCHAR_MAX