From owner-freebsd-current Sun Jun 16 13:56:35 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by hub.freebsd.org (Postfix) with ESMTP id DF68437B404; Sun, 16 Jun 2002 13:56:30 -0700 (PDT) Received: from nbs.imp.ch (nbs.imp.ch [157.161.4.7]) by mail.imp.ch (8.11.6/8.11.6) with ESMTP id g5GKuUb86118; Sun, 16 Jun 2002 22:56:30 +0200 (CEST) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by nbs.imp.ch (8.12.3/8.12.3) with ESMTP id g5GKuT9014066951; Sun, 16 Jun 2002 22:56:29 +0200 (MES) Date: Sun, 16 Jun 2002 22:57:32 +0200 (CEST) From: Martin Blapp To: Cc: , Subject: PATCH: wchar_t is already defined in libstd++ Message-ID: <20020616225518.I34000-100000@levais.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include +#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, ------------------------------------------------------------------ ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 061 826 93 00: +41 61 826 93 01 PGP: 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