This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Darwin and _BSD_WCHAR_T_DEFINED_
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: Darwin and _BSD_WCHAR_T_DEFINED_
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Wed, 17 Oct 2001 17:06:53 -0500 (CDT)
- Cc: toa at pop dot agri dot ch
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
- References: <29291492-BD34-11D5-A5A4-003065F97F7C@waitaki.otago.ac.nz>
>Bryce McKinlay wrote:
>> The problem here is that gcc's header undefines _BSD_WCHAR_T_ but does
>> not define _BSD_WCHAR_T_DEFINED_, so if the stddef.h gets included
>> before any of darwin's headers, we get an error like this one:
> What about this patch? I have to apply it to the mainline to bootstrap
> on darwin-1.4.
> Could it be that I(we) have a nasty env setting?
> P.S. I don't see it on the apple branch so far. (synced yesterday from main)
Although I don't have rights of approval, I should have spoken up
sooner since I am responsible for most of the recent toying with that
area of the file. The patch looks fine to me since it changes no
(granted, somewhat convoluted) logic paths in the file. The logic
path changes are what always got me into portability trouble.
I have personally verified that this patch will not negatively impact
any existing version of FreeBSD system headers. I also took a quick
look at NetBSD and OpenBSD system header history
(http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/include/)
(http://www.openbsd.org/cgi-bin/cvsweb/src/include/) and saw no
issues. (How I wish more OS vendors would put, at the very least,
their system headers up for AnonCVS via WWW without me having to sign
any blasted paperwork.)
The patch might be improved by placing the definition of the new macro
into a region guarded by a check of a macro which is only available on
a Darwin system. However, it is clear that we have not always done this.
Regards,
Loren
--
Loren J. Rittle
Senior Staff Software Engineer, Distributed Object Technology Lab
Networks and Infrastructure Research Lab (IL02/2240), Motorola Labs
rittle@rsch.comm.mot.com, KeyID: 2048/ADCE34A5, FDC0292446937F2A240BC07D42763672