Mail Archives: djgpp/2003/06/11/03:04:20
deckerben (bdeck AT lycos DOT co DOT uk) wrote:
: "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);
...
: 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
^^^^^^ ieeefp.h according
to later message.
: 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.
Does it help to switch the #include order?
: Thanks for the tip. What should be done about this conflict? Ideas?
Ultimately things should be moved to C99 compliance, which means
isinff can be removed (unless it must be kept for backwards
compatibility) because then the macro isinf should be used. (I have
isinf coded already, but not properly integrated and no time at the
moment.)
Perhaps removing the function declaration(s) would be sufficient? But
then you must be careful not to pass non-floats to it, I guess.
Right,
MartinS
- Raw text -