Date: Tue, 25 Mar 1997 21:50:03 -0800 (PST) From: hoek@freenet.hamilton.on.ca To: freebsd-bugs Subject: Re: bin/3080 Message-ID: <199703260550.VAA17928@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <stdlib.h> 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?!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703260550.VAA17928>