From owner-freebsd-current Thu Dec 31 08:46:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA18335 for freebsd-current-outgoing; Thu, 31 Dec 1998 08:43:29 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smarter.than.nu (thought.calbbs.com [207.71.213.16]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA18330 for ; Thu, 31 Dec 1998 08:43:25 -0800 (PST) (envelope-from brian@CSUA.Berkeley.EDU) Received: from localhost (localhost [127.0.0.1]) by smarter.than.nu (8.9.1/8.9.1) with ESMTP id IAA00566; Thu, 31 Dec 1998 08:43:00 -0800 (PST) (envelope-from brian@CSUA.Berkeley.EDU) Date: Thu, 31 Dec 1998 08:43:00 -0800 (PST) From: "Brian W. Buchanan" X-Sender: brian@smarter.than.nu To: Alex Zepeda cc: current Subject: Re: egcs chokes on netinet/in.h.. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 31 Dec 1998, Alex Zepeda wrote: > /usr/include/netinet/in.h:291: ANSI C++ forbids data member `ip_opts' with > same name as enclosing class > > In upgrading my egcs (to get around some rather annoying bugs), this seems > to have been changed from a warning to a fatal error. Is there any > possibility that the ip_opts member could be named _ip_opts or somesuch? > > struct ip_opts { > struct in_addr ip_dst; /* first hop, 0 w/o src rt */ > char ip_opts[40]; /* actually variable in size */ > }; This seems like a rather stupid restriction of ANSI C++, and in any case, the compiler shouldn't treat it as a fatal error unless you specified -ansi -pedantic. To fix this without hacking the compiler to fix the bug, perhaps try wrapping the include directive: extern "C" { #include } -- Brian Buchanan brian@smarter.than.nu brian@CSUA.Berkeley.EDU "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message