Date: Sun, 16 Jun 2002 22:57:32 +0200 (CEST) From: Martin Blapp <mb@imp.ch> To: <current@freebsd.org> Cc: <obrien@freebsd.org>, <peter@freebsd.org> Subject: PATCH: wchar_t is already defined in libstd++ Message-ID: <20020616225518.I34000-100000@levais.imp.ch>
next in thread | raw e-mail | index | archive | help
Hi,
On current, wchar_t is already defined in libstd++. This
makes gcc baby cry.
I don't know if it is correct, but I guess David or Peter
will tell me ;-)
This patch fixed many ports on CURRENT and I did not had to
modify CFLAGS. We could even add a check against __GNUC__ >= 3
if a user likes to compiles something with gcc2.95.
--- /usr/src/include/runetype.h Sat Apr 6 16:43:41 2002
+++ /usr/src/include/runetype.h Sun Jun 16 15:25:56 2002
@@ -53,9 +53,11 @@
#undef _BSD_SIZE_T_
#endif
+#if !defined(__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 */
--- /usr/src/include/stdlib.h Sun Jun 2 18:31:31 2002
+++ /usr/src/include/stdlib.h Sun Jun 16 15:23:51 2002
@@ -53,9 +53,11 @@
#undef _BSD_SIZE_T_
#endif
+#if !defined(__cplusplus)
#ifdef _BSD_WCHAR_T_
typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
+#endif
#endif
typedef struct {
--- /usr/src/include/stddef.h Mon Jun 4 15:21:22 2001
+++ /usr/src/include/stddef.h Sun Jun 16 15:28:54 2002
@@ -54,9 +54,11 @@
#undef _BSD_SIZE_T_
#endif
+#if !defined(__cplusplus)
#ifdef _BSD_WCHAR_T_
typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
+#endif
#endif
#ifndef NULL
--- /usr/src/include/inttypes.h Wed Jan 9 22:32:37 2002
+++ /usr/src/include/inttypes.h Sun Jun 16 22:46:40 2002
@@ -32,9 +32,11 @@
#include <machine/_inttypes.h>
#include <sys/stdint.h>
+#if !defined(__cplusplus)
#ifdef _BSD_WCHAR_T_
typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
+#endif
#endif
typedef struct {
--- /usr/src/include/wchar.h Sat Apr 6 16:43:43 2002
+++ /usr/src/include/wchar.h Sun Jun 16 22:47:28 2002
@@ -73,9 +73,11 @@
#define NULL 0
#endif
+#if !defined(__cplusplus)
#ifdef _BSD_WCHAR_T_
typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
+#endif
#endif
#ifdef _BSD_MBSTATE_T_
Martin
Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: <finger -l mbr@freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020616225518.I34000-100000>
