diff options
author | mike <mike@FreeBSD.org> | 2002-09-09 05:38:05 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-09-09 05:38:05 +0000 |
commit | c80d532f6e49f79741bc565274a904f6e39ae87e (patch) | |
tree | 991aceb91e5ce913332095f4c41a38bfa711074c /include/ctype.h | |
parent | b7883862c2c1b224a47503607f88393b9cbe93c6 (diff) | |
download | FreeBSD-src-c80d532f6e49f79741bc565274a904f6e39ae87e.zip FreeBSD-src-c80d532f6e49f79741bc565274a904f6e39ae87e.tar.gz |
Solve the <runetype.h> pollution problem by disabling inline
optimizations when a standard has been requested, except when the
inline optimizations are also specifically requested.
Diffstat (limited to 'include/ctype.h')
-rw-r--r-- | include/ctype.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/ctype.h b/include/ctype.h index 8cf6b56..7d6fa79 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -45,10 +45,8 @@ #ifndef _CTYPE_H_ #define _CTYPE_H_ -/* - * XXX <runetype.h> brings namespace pollution (struct member names). - */ -#include <runetype.h> +#include <sys/cdefs.h> +#include <sys/_types.h> #define _CTYPE_A 0x00000100L /* Alpha */ #define _CTYPE_C 0x00000200L /* Control */ @@ -164,10 +162,24 @@ __END_DECLS #endif /* + * <runetype.h> brings namespace pollution (struct member names). This prevents + * us from using the inline optimizations in the more strict __POSIX_VISIBLE and + * __XSI_VISIBLE namespaces. To fix this properly would require that we rename + * member names of long-standing structs, or something equally evil. + */ +#if !__BSD_VISIBLE && !defined(_USE_CTYPE_INLINE_) && \ + !defined(_DONT_USE_CTYPE_INLINE_) +#define _DONT_USE_CTYPE_INLINE_ +#endif + +/* * Use inline functions if we are allowed to and the compiler supports them. */ #if !defined(_DONT_USE_CTYPE_INLINE_) && \ (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) + +#include <runetype.h> + static __inline int __maskrune(__ct_rune_t _c, unsigned long _f) { |