X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Sat, 25 Oct 2003 23:39:22 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Richard Dawe" Message-Id: <9743-Sat25Oct2003233921+0200-eliz@elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: (rich AT phekda DOT freeserve DOT co DOT uk) Subject: Re: Clash between math.h and ieeefp.h [PATCH] References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sat, 25 Oct 2003 20:16:28 +0100 > From: "Richard Dawe" > > libstdc++ from gcc 3.2.1 fails to build, because there are clashes > between math.h and ieeefp.h. The culprits are the macros > isnan and isinf defined in . ieeefp.h declares functions > called isnan and isinf. If is included before ieeefp.h, > a parse error will occur, because of the macro expansion > of isnan and ininf. > > Below is a patch to fix this. Since isnan and isinf are now macros, > I've removed the declaration of their functions. I'm probably missing something here: why does ieeefp.h declare those functions, and where/when is ieeefp.h supposed to be used? > Perhaps it would be better to protect them with #ifdef isnan/#endif, > etc. sections? Isn't the following trick enough to solve the problem? extern int (isnan)(double); That is, surround the function's name with parens.