From owner-freebsd-current Mon May 27 6:26:56 2002 Delivered-To: freebsd-current@freebsd.org Received: from gatesrv.RZ.UniBw-Muenchen.de (gatesrv.RZ.UniBW-Muenchen.de [137.193.11.27]) by hub.freebsd.org (Postfix) with ESMTP id 2D89B37B403; Mon, 27 May 2002 06:26:45 -0700 (PDT) Received: from nemesis.informatik.unibw-muenchen.de (nemesis.Informatik.UniBw-Muenchen.de [137.193.60.30]) by gatesrv.RZ.UniBw-Muenchen.de (8.11.2/8.11.2) with ESMTP id g4RDOVN01439; Mon, 27 May 2002 15:24:31 +0200 (MEST) Received: from localhost (localhost.informatik.unibw-muenchen.de [127.0.0.1]) by nemesis.informatik.unibw-muenchen.de (Postfix) with ESMTP id 015BA5A547; Mon, 27 May 2002 15:24:31 +0200 (CEST) Received: by nemesis.informatik.unibw-muenchen.de (Postfix, from userid 1001) id 8D6975A549; Mon, 27 May 2002 15:24:29 +0200 (CEST) Date: Mon, 27 May 2002 15:24:29 +0200 From: Oliver Braun To: Mike Barcroft Cc: "Niels Chr. Bank-Pedersen" , 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> Mail-Followup-To: Oliver Braun , Mike Barcroft , "Niels Chr. Bank-Pedersen" , current@FreeBSD.ORG, ports@FreeBSD.ORG References: <20020518223207.GA74796@nemesis.informatik.unibw-muenchen.de> <20020526233449.E6884@bank-pedersen.dk> <20020526192714.H26122@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020526192714.H26122@espresso.q9media.com> User-Agent: Mutt/1.3.99i Organization: University of the Federal Armed Forces Munich, Germany X-Mailer: Mutt http://www.mutt.org/ X-OS: FreeBSD 4.6-PRERELEASE i386 http://www.freebsd.org/ X-Newsreader: SLRN http://www.slrn.org/ X-Uptime: 25 days X-URL: http://ist.unibw-muenchen.de/People/obraun X-Accept-Language: de en X-Location: Europe, Germany, Munich X-Editor: Vim-601 http://www.vim.org/ X-Virus-Scanned: by AMaViS perl-11 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 * Mike Barcroft [2002-05-27 01:30]: > Niels Chr. Bank-Pedersen 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 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 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