summaryrefslogtreecommitdiff
path: root/gcc/ginclude/stddef.h
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-07-28 05:36:01 +0000
committerRichard Stallman <rms@gnu.org>1992-07-28 05:36:01 +0000
commit84b18070cc60a6d6810ede388904a0d197f4babb (patch)
tree1ccbf9f87eac93ac97a9757a1a162e63fbd77a46 /gcc/ginclude/stddef.h
parent32e6e69a9e3a324a87823ba92d5bbb1a1ce9edfb (diff)
downloadgcc-84b18070cc60a6d6810ede388904a0d197f4babb.tar.gz
entered into RCS
From-SVN: r1703
Diffstat (limited to 'gcc/ginclude/stddef.h')
-rw-r--r--gcc/ginclude/stddef.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
index 7eeb2288708..188687336ef 100644
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -118,6 +118,12 @@ typedef __SIZE_TYPE__ size_t;
#ifndef __WCHAR_TYPE__
#define __WCHAR_TYPE__ int
#endif
+#ifdef __GNUG__
+/* In C++, wchar_t is a distinct basic type,
+ and we can expect __wchar_t to be defined by cc1plus. */
+typedef __wchar_t wchar_t;
+#else
+/* In C, cpp tells us which type to make an alias for. */
typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif
@@ -126,6 +132,7 @@ typedef __WCHAR_TYPE__ wchar_t;
#endif
#endif
#endif
+#endif
#undef __need_wchar_t
#endif /* _STDDEF_H or __need_wchar_t. */