diff options
-rw-r--r-- | gnu/egcs/gcc/ginclude/stddef.h | 8 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/ginclude/stddef.h | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gnu/egcs/gcc/ginclude/stddef.h b/gnu/egcs/gcc/ginclude/stddef.h index 615052e85d4..aee616d34f7 100644 --- a/gnu/egcs/gcc/ginclude/stddef.h +++ b/gnu/egcs/gcc/ginclude/stddef.h @@ -27,6 +27,10 @@ #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__) #include <machine/ansi.h> #endif +/* On FreeBSD 5 and OpenBSD 3.9, machine/ansi.h does not exist anymore... */ +#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) || defined(__OpenBSD__) +#include <sys/_types.h> +#endif /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. @@ -162,7 +166,11 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ +#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) || defined(__OpenBSD__) +/* __size_t is a typedef on FreeBSD 5 and OpenBSD 3.9!, must not trash it. */ +#else #define __size_t +#endif #ifndef __SIZE_TYPE__ #define __SIZE_TYPE__ long unsigned int #endif diff --git a/gnu/usr.bin/gcc/gcc/ginclude/stddef.h b/gnu/usr.bin/gcc/gcc/ginclude/stddef.h index 2cd15899af1..8b37c5e7c9f 100644 --- a/gnu/usr.bin/gcc/gcc/ginclude/stddef.h +++ b/gnu/usr.bin/gcc/gcc/ginclude/stddef.h @@ -56,8 +56,8 @@ Boston, MA 02111-1307, USA. */ #if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__) #include <machine/ansi.h> #endif -/* On FreeBSD 5, machine/ansi.h does not exist anymore... */ -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5) +/* On FreeBSD 5 and OpenBSD 3.9, machine/ansi.h does not exist anymore... */ +#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) || defined(__OpenBSD__) #include <sys/_types.h> #endif @@ -201,8 +201,8 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5) -/* __size_t is a typedef on FreeBSD 5!, must not trash it. */ +#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) || defined(__OpenBSD__) +/* __size_t is a typedef on FreeBSD 5 and OpenBSD 3.9!, must not trash it. */ #else #define __size_t #endif |