Mail Archives: djgpp/2003/06/10/15:30:52
"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 -