From owner-freebsd-ports Sun May 26 16:29:26 2002 Delivered-To: freebsd-ports@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 3B01737B400; Sun, 26 May 2002 16:29:19 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g4QNRFN27755; Sun, 26 May 2002 19:27:15 -0400 (EDT) (envelope-from mike) Date: Sun, 26 May 2002 19:27:14 -0400 From: Mike Barcroft To: "Niels Chr. Bank-Pedersen" Cc: Oliver Braun , current@freebsd.org, ports@freebsd.org Subject: Re: machine/endian.h revision 1.33 breaks port x11-fm/gentoo Message-ID: <20020526192714.H26122@espresso.q9media.com> References: <20020518223207.GA74796@nemesis.informatik.unibw-muenchen.de> <20020526233449.E6884@bank-pedersen.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020526233449.E6884@bank-pedersen.dk>; from ncbp@bank-pedersen.dk on Sun, May 26, 2002 at 11:34:49PM +0200 Organization: The FreeBSD Project Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [Sorry I missed the beginning of this thread.] 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 %%% Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message