aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-11-10 15:26:10 +0000
committerRichard Stallman <rms@gnu.org>1992-11-10 15:26:10 +0000
commitca2ece1b4542c4e2d38c83a5b0e2fde7b7717f96 (patch)
tree5d238bc6f1c0bda04c3113f4a0cd80ca9c93c9b1 /gcc
parenta29b481b12d1b42808bb46e5b327e63e48ed7ffd (diff)
downloadgcc-ca2ece1b4542c4e2d38c83a5b0e2fde7b7717f96.zip
gcc-ca2ece1b4542c4e2d38c83a5b0e2fde7b7717f96.tar.gz
gcc-ca2ece1b4542c4e2d38c83a5b0e2fde7b7717f96.tar.bz2
[_ANSI_H_]: When undefing at the end, test _STDDEF_H, not __need_ptrdiff_t.
[__need_ptrdiff_t]: Don't undef _SIZE_T_ or _WCHAR_T_. From-SVN: r2735
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ginclude/stddef.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
index 282944b..774462c 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -20,7 +20,7 @@
/* 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 <machines/ansi.h>
+#include <machine/ansi.h>
#endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
@@ -35,9 +35,11 @@
#ifndef _WCHAR_T_
#define _WCHAR_T
#endif
-#undef _SIZE_T_
#undef _PTRDIFF_T_
+#ifndef __need_ptrdiff_t
+#undef _SIZE_T_
#undef _WCHAR_T_
+#endif
#endif /* _ANSI_H_ */
/* In case nobody has defined these types, but we aren't running under
@@ -168,9 +170,12 @@ typedef __WCHAR_TYPE__ wchar_t;
header files do that. */
#ifdef _ANSI_H_
#undef _PTRDIFF_T_
+#ifndef _STDDEF_H /* This is a kludge. The case where this happens
+ is when obstack.h wants just ptrdiff_t. */
#undef _SIZE_T_
#undef _WCHAR_T_
#endif
+#endif
#endif /* __sys_stdtypes_h */