* Chris Kuethe <[EMAIL PROTECTED]> [080210 12:34]: > On Feb 10, 2008 8:31 AM, Jim Razmus <[EMAIL PROTECTED]> wrote: > > I'm trying to compile a program that uses NAN. It includes math.h which > > I'm told C99 says should define it. I've grepped the entire source tree > > and read up on man 3 math and man 3 isinf. Still no joy. > > > > Trying to compile the program yields "error: `NAN' undeclared (first use > > in this function)". > > > > Can anyone point me in the right direction? > > #ifndef NAN > #define NAN (0.0/0.0) > #endif > > > -- > GDB has a 'break' feature; why doesn't it have 'fix' too? >
I'm told that math.h should do this for me. Moreover, I think NAN is a machine dependent value. Adding the line you mention would break on VAX (assuming I understand this correctly). Although I don't think anyone would run this program on a VAX, if it's in the ports tree there's the possibility. Worst case, I could add those defines though. Thanks. Jim