www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/06/10/15:30:52

From: "deckerben" <bdeck AT lycos DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
References: <3ee4efa9$0$31822$9b622d9e AT news DOT freenet DOT de> <bc470i$1cb$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
Subject: Re: wierd math.h error ---isinff, "long"?
Date: Tue, 10 Jun 2003 21:21:01 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Lines: 51
Message-ID: <3ee62e57$0$16604$9b622d9e@news.freenet.de>
NNTP-Posting-Host: 213.7.6.40
X-Trace: 1055272535 news.freenet.de 16604 213.7.6.40:1273
X-Complaints-To: abuse AT freenet DOT de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Hans-Bernhard Broeker" <broeker AT physik DOT rwth-aachen DOT de> wrote in message
news:bc470i$1cb$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE...
> deckerben <bdeck AT lycos DOT co DOT uk> wrote:
>
> > /dev/d/usr/djgpp/include/math.h:148: parse error before "long"
> > /dev/d/usr/djgpp/include/math.h:149: parse error before "long"
> > /dev/d/usr/djgpp/include/math.h:150: parse error before "long"
>
> > When these lines in math.h look like:
> > extern int isinff(float);
> > extern int isnanf(float);
> > extern int finitef(float);
>
> Obviously, there is no occurence of the word "long" in these lines.

That is exactly what I thought, too. Had me wondering....

> Which means some other part of the build process though it as a clever
> idea to #define something or other to a token sequence containing the
> word "long".  You'll have to compile one case where this error strikes

Wow... great function... (smiling). Yeah, *someone* did think it would be
clever, and that someone wasn't the packager :-)
<snip/>
# 13 "/dev/d/usr/djgpp/include/ieeefp.h"
<snip/>
#define isnanf(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && ((*(long
*)&(x) & 0x007fffffL)!=0000000000L))

#define isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && ((*(long
*)&(x) & 0x007fffffL)==0000000000L))

#define finitef(x) (((*(long *)&(x) & 0x7f800000L)!=0x7f800000L))
<snip/>

These come from lines 76 - 82 of include/math.h. I had suspected these
before (I searched the include dir for other occurrances of 'isinff'. I
believe this causes a conflict in porting some applications that include
both ieeefp.h and math.h. My DJGPP installation is about five months old.

> with the '-save-temps -dD' options added to the gcc command line, and
> inspect the resulting *.i file very closely.  That'll show you where
> this #define is.

Thanks for the tip. What should be done about this conflict? Ideas?

Regards,
Ben


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019