Commit ca2ece1b by Richard Stallman

[_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
parent a29b481b
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/* On 4.3bsd-net2, make sure ansi.h is included, so we have /* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */ one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____) #if defined (__BSD_NET2__) || defined (____386BSD____)
#include <machines/ansi.h> #include <machine/ansi.h>
#endif #endif
/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
...@@ -35,9 +35,11 @@ ...@@ -35,9 +35,11 @@
#ifndef _WCHAR_T_ #ifndef _WCHAR_T_
#define _WCHAR_T #define _WCHAR_T
#endif #endif
#undef _SIZE_T_
#undef _PTRDIFF_T_ #undef _PTRDIFF_T_
#ifndef __need_ptrdiff_t
#undef _SIZE_T_
#undef _WCHAR_T_ #undef _WCHAR_T_
#endif
#endif /* _ANSI_H_ */ #endif /* _ANSI_H_ */
/* In case nobody has defined these types, but we aren't running under /* In case nobody has defined these types, but we aren't running under
...@@ -168,9 +170,12 @@ typedef __WCHAR_TYPE__ wchar_t; ...@@ -168,9 +170,12 @@ typedef __WCHAR_TYPE__ wchar_t;
header files do that. */ header files do that. */
#ifdef _ANSI_H_ #ifdef _ANSI_H_
#undef _PTRDIFF_T_ #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 _SIZE_T_
#undef _WCHAR_T_ #undef _WCHAR_T_
#endif #endif
#endif
#endif /* __sys_stdtypes_h */ #endif /* __sys_stdtypes_h */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment