Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jun 2002 00:36:38 +0200 (CEST)
From:      Martin Blapp <mb@imp.ch>
To:        Garrett Wollman <wollman@lcs.mit.edu>
Cc:        Thomas David Rivers <rivers@dignus.com>, <current@FreeBSD.ORG>
Subject:   Re: PATCH: wchar_t is already defined in libstd++
Message-ID:  <20020618002527.Q60170-100000@levais.imp.ch>
In-Reply-To: <200206172216.g5HMGjrS022873@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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