Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Cmath and math.h Changes in Xcode 2.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cmath and math.h Changes in Xcode 2.4

Was there some change to Xcode (and the entire tool chain) in Xcode 2.4 that
would affect the isnan(x) function?

I have now come across two open source packages that get hung up on
"isnan(x) is undeclared in this context"  type errors.

The projects are OpenSceneGraph ( and ITK

In ITK's case I had to change a #define to look like the following:

#if defined(__APPLE__)
#if (__GNUC__ >= 4)
  #include <cmath>
  #define isnan(x) std::isnan(x)
  #include <math.h>
  #define isnan(x) __isnand((double)x)

Where as it used to be just:
#if defined(__APPLE__)
  #include <math.h>
  #define isnan(x) __isnand((double)x)

 Just curious....

Mike Jackson
imikejackson <at> gmail <dot> com

Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.