Commit 26afdb8e by Richard Stallman

[_ANSI_H_]: Handle __need_size_t and __need_wchar-t.

From-SVN: r4520
parent d7c768e7
...@@ -35,9 +35,14 @@ ...@@ -35,9 +35,14 @@
#ifndef _WCHAR_T_ #ifndef _WCHAR_T_
#define _WCHAR_T #define _WCHAR_T
#endif #endif
/* Undef _FOO_T_ if we are supposed to define foo_t. */
#if ! defined (__need_wchar_t) && ! defined (__need_size_t)
#undef _PTRDIFF_T_ #undef _PTRDIFF_T_
#ifndef __need_ptrdiff_t #endif
#if ! defined (__need_wchar_t) && ! defined (__need_ptrdiff_t)
#undef _SIZE_T_ #undef _SIZE_T_
#endif
#if ! defined (__need_size_t) && ! defined (__need_ptrdiff_t)
#undef _WCHAR_T_ #undef _WCHAR_T_
#endif #endif
#endif /* _ANSI_H_ */ #endif /* _ANSI_H_ */
...@@ -174,18 +179,18 @@ typedef __WCHAR_TYPE__ wchar_t; ...@@ -174,18 +179,18 @@ typedef __WCHAR_TYPE__ wchar_t;
#endif /* _STDDEF_H or __need_wchar_t. */ #endif /* _STDDEF_H or __need_wchar_t. */
/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. /* 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 are already defined. */
one of these types, not on 4.3bsd-net2, because only the GNU libc
header files do that. */
#ifdef _ANSI_H_ #ifdef _ANSI_H_
#ifdef _GCC_PTRDIFF_T_
#undef _PTRDIFF_T_ #undef _PTRDIFF_T_
#ifdef _STDDEF_H /* This is a kludge. #endif
_STDDEF_H is defined when we are using the whole file, #ifdef _GCC_SIZE_T_
undefined when obstack.h wants just ptrdiff_t. */
#undef _SIZE_T_ #undef _SIZE_T_
#undef _WCHAR_T_
#endif #endif
#ifdef _GCC_WCHAR_T_
#undef _WCHAR_T_
#endif #endif
#endif /* _ANSI_H_ */
#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