summaryrefslogtreecommitdiff
path: root/gcc/ginclude/stddef.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>1995-03-03 17:11:06 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>1995-03-03 17:11:06 +0000
commit3d356a8c3eb45c3eb9475d8e2eb9fcadba19d24d (patch)
treee4de48cbfa3601667ab5882946030f6a0af4ba9d /gcc/ginclude/stddef.h
parente571db989674b7f597538c6de59937523b28a9b4 (diff)
downloadgcc-3d356a8c3eb45c3eb9475d8e2eb9fcadba19d24d.tar.gz
Handle VxWorks typedef macros
From-SVN: r9121
Diffstat (limited to 'gcc/ginclude/stddef.h')
-rw-r--r--gcc/ginclude/stddef.h19
1 files changed, 19 insertions, 0 deletions
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, <type/vxTypesBase.h> 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