Date: Mon, 27 May 2002 15:24:29 +0200 From: Oliver Braun <obraun@informatik.unibw-muenchen.de> To: Mike Barcroft <mike@freebsd.org> Cc: "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>, current@freebsd.org, ports@freebsd.org Subject: Re: machine/endian.h revision 1.33 breaks port x11-fm/gentoo Message-ID: <20020527132429.GA40580@nemesis.informatik.unibw-muenchen.de> In-Reply-To: <20020526192714.H26122@espresso.q9media.com> References: <20020518223207.GA74796@nemesis.informatik.unibw-muenchen.de> <20020526233449.E6884@bank-pedersen.dk> <20020526192714.H26122@espresso.q9media.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Mike Barcroft <mike@FreeBSD.ORG> [2002-05-27 01:30]:
> Niels Chr. Bank-Pedersen <ncbp@bank-pedersen.dk> writes:
> > On Sun, May 19, 2002 at 12:32:07AM +0200, Oliver Braun wrote:
> > > Hi,
> > >
> > > I am the ports maintainer of x11-fm/gentoo. Building gentoo dies since
> > > revision 1.33 of machine/endian.h with the following error:
> > >
> > > In file included from cmdseq.c:18:
> > > /usr/include/sys/wait.h:114: duplicate member `w_Filler'
> > > /usr/include/sys/wait.h:115: duplicate member `w_Retcode'
> > > /usr/include/sys/wait.h:116: duplicate member `w_Coredump'
> > > /usr/include/sys/wait.h:117: duplicate member `w_Termsig'
> > > /usr/include/sys/wait.h:132: duplicate member `w_Filler'
> > > /usr/include/sys/wait.h:133: duplicate member `w_Stopsig'
> > > /usr/include/sys/wait.h:134: duplicate member `w_Stopval'
> > > *** Error code 1
> > >
> > > With machine/endian.h revision 1.32 it works.
> > >
> > > A workaround for x11-fm/gentoo is to declare the functions needed
> > > explicit and avoid including whole sys/wait.h.
> This is good. I was hoping fixing the namespace pollution in endian.h
> would expose more bugs. The bug in this case is that wait.h is
> depending on the old pollution of endian.h in the !__BSD_VISIBLE
> case. The solution is to use the underscored variants in wait.h.
> I'll commit the fix soon.
> I ran into another build problem later on. This time the bug was in
> the port itself. It was missing a <string.h> include, for the
> strdup() prototype. I think the previous GCC didn't complain about
> missing prototypes for built-ins, which is probably why this wasn't
> exposed earlier.
> Adding the include doesn't fix the problem because the program, via
> gentoo.h, specifies that it wants a POSIX environment
> (`#define _POSIX_C_SOURCE 3'). I think the value 3 is wrong here.
> The correct format is YYYYMM, which specifies the ratified date of the
> Standard. Nevertheless, our headers try and accomodate and provide
> a 1988 environment. strdup() wasn't added to POSIX until 2001.
> The solution would be to specify a Standard that provides the
> interface the application needs, or to not specify a Standard at all.
> The software does the latter in the NetBSD, et al cases. This patch
> below and the upcoming commit to <sys/wait.h> should fix this port.
> %%%
> --- gentoo.h.orig Sun May 26 19:20:42 2002
> +++ gentoo.h Sun May 26 19:13:52 2002
> @@ -13,7 +13,7 @@
> #include "config.h"
> -#if !(defined __osf__ && defined __alpha__) && !defined __NetBSD__
> +#if !(defined __osf__ && defined __alpha__) && !defined __NetBSD__ && !defined __FreeBSD__
> #define __EXTENSIONS__
> #define _POSIX_C_SOURCE 3 /* This is for Solaris. */
> #define POSIX_C_SOURCE 3
> %%%
Thanks, it fixes the port. I have tested it and submitted it already.
Regards,
Olli
--
IST & IIS _ INF _ UniBwM ____ http://ist.unibw-muenchen.de/People/obraun/
Tele-Consulting GmbH ________ http://www.tele-consulting.com/ ___ obraun@
FreeBSD: The Power To Serve _ http://www.freebsd.org/ ___________________
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?20020527132429.GA40580>
