[RFC v4 1/4] cdefs: Add __bool
Alejandro Colomar
alx@kernel.org
Sun Sep 14 06:01:02 GMT 2025
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
misc/sys/cdefs.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 215ff937ee..3a726d7398 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -57,6 +57,12 @@
# define __glibc_has_extension(ext) 0
#endif
+#if defined __cplusplus
+# define __bool bool
+#else
+# define __bool _Bool
+#endif
+
#if defined __GNUC__ || defined __clang__
/* All functions, except those with callbacks or those that
--
2.50.1
More information about the Libc-alpha
mailing list