|
Message-Id: <20210105014834.13622-1-ericonr@disroot.org> Date: Mon, 4 Jan 2021 22:48:34 -0300 From: Érico Nogueira <ericonr@...root.org> To: musl@...ts.openwall.com Cc: Érico Rolim <ericonr@...root.org> Subject: [PATCH] guard isascii() macro when using C++ From: Érico Rolim <ericonr@...root.org> otherwise one can get compilation errors in C++ code that uses isascii as an identifier this was spotted while building fceux --- include/ctype.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ctype.h b/include/ctype.h index 7936536f..32bcef4d 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -64,7 +64,9 @@ int isascii(int); int toascii(int); #define _tolower(a) ((a)|0x20) #define _toupper(a) ((a)&0x5f) +#ifndef __cplusplus #define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128) +#endif #endif -- 2.29.2
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.