From: "deckerben" Newsgroups: comp.os.msdos.djgpp References: <3ee4efa9$0$31822$9b622d9e AT news DOT freenet DOT de> <3ee62e57$0$16604$9b622d9e AT news DOT freenet DOT de> Subject: Re: wierd math.h error ---isinff, "long"? Date: Wed, 11 Jun 2003 21:10:59 +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: 45 Message-ID: <3ee77fa5$0$170$9b622d9e@news.freenet.de> NNTP-Posting-Host: 80.184.60.37 X-Trace: 1055358886 news.freenet.de 170 80.184.60.37:1234 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 "Martin Stromberg" wrote in message news:bc6ikb$s6a$1 AT antares DOT lu DOT erisoft DOT se... > deckerben (bdeck AT lycos DOT co DOT uk) wrote: > > : "Hans-Bernhard Broeker" wrote in message > : news:bc470i$1cb$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE... > : > deckerben 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); > Does it help to switch the #include order? Well, the source code calls four internal includes that call two other masters which call dozens of DJGPP headers, and probably math.h in one place and ieeefp.h in the other... At any rate, many packages that requires both of these headers seems to fail... > 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.) After your comments, I simply #ifdef'ed the three lines out from ieeefp.h and let it use the prototypes in math.h. No more errors (although the original error did say '/dev/d/usr/djgpp/include/math.h:150: parse error before "long" '.) The function should probably be kept for backward compatibility. > Perhaps removing the function declaration(s) would be sufficient? But > then you must be careful not to pass non-floats to it, I guess. I'll keep it in mind. Thanks. Ben