bug 682319 - use C99 isfinite on OS X, since finite is deprecated (and not present on iOS). r=bz

This commit is contained in:
Ted Mielczarek 2011-08-29 11:14:27 -04:00
parent 7868e3e2a5
commit a4f0dbd4f0

View File

@ -130,6 +130,10 @@ inline NS_HIDDEN_(bool) NS_finite(double d)
#ifdef WIN32
// NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
return !!_finite(d);
#elif defined(XP_DARWIN)
// Darwin has deprecated |finite| and recommends |isfinite|. The former is
// not present in the iOS SDK.
return isfinite(d);
#else
return finite(d);
#endif