From owner-freebsd-current Mon Jun 17 15:40: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 04A1D37B42F for ; Mon, 17 Jun 2002 15:40: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 g5HMZab34642; Tue, 18 Jun 2002 00:35:36 +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 g5HMZa9014116146; Tue, 18 Jun 2002 00:35:36 +0200 (MES) Date: Tue, 18 Jun 2002 00:36:38 +0200 (CEST) From: Martin Blapp To: Garrett Wollman Cc: Thomas David Rivers , Subject: Re: PATCH: wchar_t is already defined in libstd++ In-Reply-To: <200206172216.g5HMGjrS022873@khavrinen.lcs.mit.edu> Message-ID: <20020618002527.Q60170-100000@levais.imp.ch> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT 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, > Actually, the correct approach would be to avoid defining > _BSD_WCHAR_T_ when compiling C++. This way, it only needs to be done Hmm. I guess this was a workaround for gcc2.x which was not C++ conform. Will old programms still build then ? > once for each platform, rather than once for each header that is > required to declare wchar_t. (Not defining _BSD_WCHAR_T_ tells the > other header files that this type is already defined somehow so they > don't need to declare it again.) How do you like to do this whichout breaking gcc2 support ?. How about this: Another header which is included from include/runetype.h, include/stdlib.h, include/stddef.h, include/inttypes.h include/wchar.h which just contains: #ifdef _BSD_WCHAR_T_ #if !defined(__cplusplus) #if __GNUC__ <= 3) || (__GNUC_MINOR__ <= 97 typedef _BSD_WCHAR_T_ wchar_t; #endif #endif #undef _BSD_WCHAR_T_ #endif Martin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message