From: Ian Lance Taylor Date: Fri, 3 Mar 1995 17:11:06 +0000 (+0000) Subject: Handle VxWorks typedef macros X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d356a8c3eb45c3eb9475d8e2eb9fcadba19d24d;p=gcc.git Handle VxWorks typedef macros From-SVN: r9121 --- diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h index 0b9dfb5b0ca..e0cd8b27b18 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -63,6 +63,25 @@ #undef _PTRDIFF_T_ #endif +/* On VxWorks, may have defined macros like + _TYPE_size_t which will typedef size_t. fixincludes patched the + vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is + not defined, and so that defining this macro defines _GCC_SIZE_T. + If we find that the macros are still defined at this point, we must + invoke them so that the type is defined as expected. */ +#if defined (TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_)) +_TYPE_ptrdiff_t; +#undef _TYPE_ptrdiff_t +#endif +#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_)) +_TYPE_size_t; +#undef _TYPE_size_t +#endif +#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_)) +_TYPE_wchar_t; +#undef _TYPE_wchar_t +#endif + /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the