diff options
author | bde <bde@FreeBSD.org> | 1996-05-01 00:40:10 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-05-01 00:40:10 +0000 |
commit | 7dbb860b71d5e74ddb0d45595db60de4bc241b0f (patch) | |
tree | b4f19035144b5bb4ec62efb83042948423f85486 /include/stdlib.h | |
parent | 5dcde3c31e6bf9d26659951b3186af43009e44d4 (diff) | |
download | FreeBSD-src-7dbb860b71d5e74ddb0d45595db60de4bc241b0f.zip FreeBSD-src-7dbb860b71d5e74ddb0d45595db60de4bc241b0f.tar.gz |
Fixed longstanding namespace convolution involving rune_t vs wchar_t.
If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to
be included before <stddef.h> or <stdlib.h> to get rune_t declared.
Now rune_t is declared perfectly bogusly in all cases when <ctype.h>
is included.
This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions. Ports of gcc should avoid using the
gcc headers.
Diffstat (limited to 'include/stdlib.h')
-rw-r--r-- | include/stdlib.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index 3f1d648..069656d 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -38,15 +38,19 @@ #include <machine/ansi.h> +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#ifdef _BSD_RUNE_T_ +typedef _BSD_RUNE_T_ rune_t; +#undef _BSD_RUNE_T_ +#endif +#endif + #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif #ifdef _BSD_WCHAR_T_ -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -typedef _BSD_WCHAR_T_ rune_t; -#endif typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif |