From owner-freebsd-current Mon Jun 17 15:18:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 1CE2137B43A for ; Mon, 17 Jun 2002 15:18:41 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.3) with ESMTP id g5HMGmDK022876; Mon, 17 Jun 2002 18:16:48 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.3/Submit) id g5HMGjrS022873; Mon, 17 Jun 2002 18:16:45 -0400 (EDT) (envelope-from wollman) Date: Mon, 17 Jun 2002 18:16:45 -0400 (EDT) From: Garrett Wollman Message-Id: <200206172216.g5HMGjrS022873@khavrinen.lcs.mit.edu> To: Thomas David Rivers Cc: mb@imp.ch, current@FreeBSD.ORG Subject: Re: PATCH: wchar_t is already defined in libstd++ In-Reply-To: <200206172202.g5HM2HW52939@lakes.dignus.com> References: <20020617235725.F60170-100000@levais.imp.ch> <200206172202.g5HM2HW52939@lakes.dignus.com> 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 < said: > The correct approach (and, I have to admit to not > glancing at your patch) would be: > #ifndef __cplusplus > typedef _BSD_WCHAR_T_ wchar_t > #endif Actually, the correct approach would be to avoid defining _BSD_WCHAR_T_ when compiling C++. This way, it only needs to be done 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.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message