mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] guard isascii() macro when using C++
@ 2021-01-05  1:48 Érico Nogueira
  2021-01-05 10:54 ` Markus Wichmann
  0 siblings, 1 reply; 2+ messages in thread
From: Érico Nogueira @ 2021-01-05  1:48 UTC (permalink / raw)
  To: musl; +Cc: Érico Rolim

From: Érico Rolim <ericonr@disroot.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-05 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05  1:48 [musl] [PATCH] guard isascii() macro when using C++ Érico Nogueira
2021-01-05 10:54 ` Markus Wichmann

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).