diff options
author | Richard Stallman <rms@gnu.org> | 1992-10-31 21:27:50 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-10-31 21:27:50 +0000 |
commit | 6be564d070dc48237f2fb43ac966538fb7b34464 (patch) | |
tree | 7cfe6f903494229747e6d1ec2a36574ee2fc72bc /gcc | |
parent | 98126ed6a4064896d8aa157e3f21d9de35830a32 (diff) | |
download | gcc-6be564d070dc48237f2fb43ac966538fb7b34464.zip gcc-6be564d070dc48237f2fb43ac966538fb7b34464.tar.gz gcc-6be564d070dc48237f2fb43ac966538fb7b34464.tar.bz2 |
[4.3 net 2]: If _SIZE_T_, etc. are undefined then type is already declared.
[4.3 net 2]: Force inclusion of ansi.h.
Undef _SIZE_T_, _PTRDIFF_T_, _WCHAR_T_ at end.
From-SVN: r2669
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ginclude/stddef.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h index 0b6bfa6..e384256 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -17,13 +17,28 @@ /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ -/* In 4.3bsd-net2, machine/ansi.h defines these symbols for some other - purpose. Undef them to prevent them from confusing this file. */ +/* On 4.3bsd-net2, make sure ansi.h is included, so we have + one less case to deal with in the following. */ +#if defined (__BSD_NET2__) || defined (____386BSD____) +#include <ansi.h> +#endif + +/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are + defined if the corresponding type is *not* defined. */ #ifdef _ANSI_H_ -#undef _PTRDIFF_T_ +#ifndef _SIZE_T_ +#define _SIZE_T +#endif +#ifndef _PTRDIFF_T_ +#define _PTRDIFF_T +#endif +#ifndef _WCHAR_T_ +#define _WCHAR_T +#endif #undef _SIZE_T_ +#undef _PTRDIFF_T_ #undef _WCHAR_T_ -#endif +#endif /* _ANSI_H_ */ /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and @@ -147,6 +162,16 @@ typedef __WCHAR_TYPE__ wchar_t; #undef __need_wchar_t #endif /* _STDDEF_H or __need_wchar_t. */ +/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. + are already defined. We need not worry about the case of wanting just + one of these types, not on 4.3bsd-net2, because only the GNU libc + header files do that. */ +#ifdef _ANSI_H_ +#undef _PTRDIFF_T_ +#undef _SIZE_T_ +#undef _WCHAR_T_ +#endif + #endif /* __sys_stdtypes_h */ /* A null pointer constant. */ |