From 8ed4f22c9c536a25509be978ca1e56b7ecc043b0 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 19 Dec 2023 17:48:37 -0800 Subject: [PATCH] Remove ctype compat macros. NFC libcxx has direct support for `_NEWLIB_VERSION` in `__locale` so just use that. This libcxx support was added in http://reviews.llvm.org/D7888 and landed in emscripten in #13154. --- system/include/compat/ctype.h | 17 ----------------- system/lib/libcxx/include/__locale | 4 ++-- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 system/include/compat/ctype.h diff --git a/system/include/compat/ctype.h b/system/include/compat/ctype.h deleted file mode 100644 index 891006d95dca7..0000000000000 --- a/system/include/compat/ctype.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _COMPAT_CTYPE_H_ -#define _COMPAT_CTYPE_H_ - -#define _CTYPE_A 0x00000400 /* Alpha */ -#define _CTYPE_C 0x00000002 /* Control */ -#define _CTYPE_D 0x00000800 /* Digit */ -#define _CTYPE_L 0x00000200 /* Lower */ -#define _CTYPE_P 0x00000004 /* Punct */ -#define _CTYPE_S 0x00002000 /* Space */ -#define _CTYPE_U 0x00000100 /* Upper */ -#define _CTYPE_X 0x00001000 /* X digit */ -#define _CTYPE_B 0x00000001 /* Blank */ -#define _CTYPE_R 0x00004000 /* Print */ - -#include_next - -#endif /* _COMPAT_CTYPE_H_ */ diff --git a/system/lib/libcxx/include/__locale b/system/lib/libcxx/include/__locale index 5c060ab04c768..20c515287ea26 100644 --- a/system/lib/libcxx/include/__locale +++ b/system/lib/libcxx/include/__locale @@ -406,12 +406,12 @@ public: static const mask __regex_word = 0x4000; // 0x8000 and 0x0100 and 0x00ff are used # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) # ifdef __APPLE__ typedef __uint32_t mask; # elif defined(__FreeBSD__) typedef unsigned long mask; -# elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) +# elif defined(__NetBSD__) typedef unsigned short mask; # endif static const mask space = _CTYPE_S;