From 76a90f7d49e9878d7c7aa0768c0301a1225d05a9 Mon Sep 17 00:00:00 2001 From: obrien Date: Tue, 9 Jul 2002 05:13:30 +0000 Subject: Don't define wchar_t if we are a C++ compiler. PR: 31864, 40084 --- include/inttypes.h | 2 ++ include/runetype.h | 2 ++ include/stddef.h | 2 ++ include/stdlib.h | 2 ++ include/wchar.h | 2 ++ 5 files changed, 10 insertions(+) diff --git a/include/inttypes.h b/include/inttypes.h index 6efcd81..cd59bed 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -32,10 +32,12 @@ #include #include +#ifndef __cplusplus #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif +#endif typedef struct { intmax_t quot; /* Quotient. */ diff --git a/include/runetype.h b/include/runetype.h index a5f136e..4ddd95d 100644 --- a/include/runetype.h +++ b/include/runetype.h @@ -53,10 +53,12 @@ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif +#ifndef __cplusplus #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif +#endif #define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ #define _CRMASK (~(_CACHED_RUNES - 1)) diff --git a/include/stddef.h b/include/stddef.h index feb1cdc..1e8dd2e 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -55,10 +55,12 @@ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif +#ifndef __cplusplus #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif +#endif #ifndef NULL #define NULL 0 diff --git a/include/stdlib.h b/include/stdlib.h index d41ccc8..f22f1e1 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -53,10 +53,12 @@ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif +#ifndef __cplusplus #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif +#endif typedef struct { int quot; /* quotient */ diff --git a/include/wchar.h b/include/wchar.h index a27fc54..df77b41 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -73,10 +73,12 @@ #define NULL 0 #endif +#ifndef __cplusplus #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif +#endif #ifdef _BSD_MBSTATE_T_ typedef _BSD_MBSTATE_T_ mbstate_t; -- cgit v1.1