aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2024-07-06 16:02:25 +0000
committerWarner Losh <imp@FreeBSD.org>2024-07-06 16:02:25 +0000
commit6d59c062d8245a68e80b3a0bb2924ab49ab7dd49 (patch)
treec9ab57501801bbb38f5e9867f06fdfcb3af4b833
parentc15290fb9d8fdf4b11b9c6e7406b67c73a98402d (diff)
cdefs.h: Retire __const and __signed
These are no longer used in the base system. Once upon a time they were used to ease the transition from K&R to ANSI C. These days, we use both of these keywords in their bare form everywhere, even in our headers. Any uses of __const or __signed will be converted to their ANSI meaning in the compiler, but is beyond the scope of cdefs.h's charter. For pure K&R compilation, with an enforced only use K&R features and meanings, one needs to define NO_ANSI_KEYWORDS (though even that support is wobbly at best, being active only for !GCC or gcc-adjacent compilers which currently appears to be none). Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45860
-rw-r--r--sys/sys/cdefs.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index b92992c1b5c3..e08da15e1d91 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -124,8 +124,6 @@
#define __STRING(x) #x /* stringify without expanding x */
#define __XSTRING(x) __STRING(x) /* expand x, then stringify */
-#define __const const /* define reserved names to standard */
-#define __signed signed
#define __volatile volatile
#if defined(__cplusplus)
#define __inline inline /* convert to C++ keyword */
@@ -141,9 +139,7 @@
#define __STRING(x) "x"
#if !defined(__CC_SUPPORTS___INLINE)
-#define __const /* delete pseudo-ANSI C keywords */
#define __inline
-#define __signed
#define __volatile
/*
* In non-ANSI C environments, new programs will want ANSI-only C keywords