From owner-freebsd-bugs Tue Mar 25 21:50:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA17935 for bugs-outgoing; Tue, 25 Mar 1997 21:50:08 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id VAA17928; Tue, 25 Mar 1997 21:50:03 -0800 (PST) Date: Tue, 25 Mar 1997 21:50:03 -0800 (PST) Message-Id: <199703260550.VAA17928@freefall.freebsd.org> To: freebsd-bugs Cc: From: hoek@freenet.hamilton.on.ca Subject: Re: bin/3080 Reply-To: hoek@freenet.hamilton.on.ca Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/3080; it has been noted by GNATS. From: hoek@freenet.hamilton.on.ca To: bertram@ifib.uni-karlsruhe.de Cc: freebsd-gnats-submit@FreeBSD.ORG, steve@FreeBSD.ORG Subject: Re: bin/3080 Date: Wed, 26 Mar 1997 00:43:46 -0500 (EST) In Email, bertram@ifib.uni-karlsruhe.de wrote: > > >Number: 3080 > >Category: bin > >Synopsis: yacc produces output which doesn't compile with g++ [call of getenv()] > >Release: 2.1.6 Release > >Description: > yacc-generated output holds a code sequence > > extern char getenv(); > xxx = getenv("XXX"); > > which makes C++ compilers like g++ complain/fail because of > prototype mismatch. This should be fixed in newer versions of skeleton.c. > >Fix: > yacc/skeleton.c > > No good idea, since most solutions depend on previous #include statements, > like surround offending declaration with __BEGIN_DECLS/__BEGIN_DECLS Once again, newer versions actually use a #include statement. They also have a #ifdef __cplusplus areoung the getenv() prototype, which is altogether unnecessary (the prototype, not the #ifdef, but that too, by implication). Have a look at bin/2792 for what I suspect is a better fix. Cc: 'd to steve@freebsd.org, too, since he's listed in the Responsible: field for bin/2792. -- tIM...HOEk Who's been messing with my anti-paranoi shot?!