void-packages/srcpkgs/musl/patches/isascii.patch
2021-06-20 13:17:29 +07:00

21 lines
623 B
Diff

From e48e99c112246fb580596404074445cb25d7858d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <ericonr@disroot.org>
Date: Mon, 4 Jan 2021 22:48:34 -0300
Subject: [PATCH] suppress isascii() macro for C++
analogous to commit a60457c84a4b59ab564d7f4abb660a70283ba98d.
diff --git include/ctype.h 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