Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2002 18:16:45 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Thomas David Rivers <rivers@dignus.com>
Cc:        mb@imp.ch, current@FreeBSD.ORG
Subject:   Re: PATCH: wchar_t is already defined in libstd++
Message-ID:  <200206172216.g5HMGjrS022873@khavrinen.lcs.mit.edu>
In-Reply-To: <200206172202.g5HM2HW52939@lakes.dignus.com>
References:  <20020617235725.F60170-100000@levais.imp.ch> <200206172202.g5HM2HW52939@lakes.dignus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Mon, 17 Jun 2002 18:02:17 -0400 (EDT), Thomas David Rivers <rivers@dignus.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206172216.g5HMGjrS022873>