Last Comment Bug 682319 - use C99 isfinite() on OS X
: use C99 isfinite() on OS X
Status: RESOLVED FIXED
[iOS] fixed-in-bs
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: ARM iOS 4
: -- normal (vote)
: mozilla9
Assigned To: Ted Mielczarek [:ted.mielczarek]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-26 09:55 PDT by Ted Mielczarek [:ted.mielczarek]
Modified: 2011-08-31 08:07 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
use C99 isfinite on OS X, since finite is deprecated (and not present on iOS) (803 bytes, patch)
2011-08-26 09:58 PDT, Ted Mielczarek [:ted.mielczarek]
bzbarsky: review+
Details | Diff | Review
use C99 isfinite on OS X, since finite is deprecated (and not present on iOS). (925 bytes, patch)
2011-08-26 12:53 PDT, Ted Mielczarek [:ted.mielczarek]
no flags Details | Diff | Review

Description Ted Mielczarek [:ted.mielczarek] 2011-08-26 09:55:09 PDT
math.h in the OS X SDK says about finite:
/* Legacy API: please use C99 isfinite() instead. */

It's not present in the iOS SDK. I'm not sure if it's safe to totally replace finite with isfinite, since the latter is C99, and glibc might not make it available in non-C99 mode. My patch just uses it on OS X, where it should always be available.
Comment 1 Ted Mielczarek [:ted.mielczarek] 2011-08-26 09:58:45 PDT
Created attachment 556057 [details] [diff] [review]
use C99 isfinite on OS X, since finite is deprecated (and not present on iOS)

This builds fine for me on iOS and OS X.
Comment 2 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-08-26 10:08:01 PDT
Comment on attachment 556057 [details] [diff] [review]
use C99 isfinite on OS X, since finite is deprecated (and not present on iOS)

This seems fine, though a comment explaining why might be nice.
Comment 3 Ted Mielczarek [:ted.mielczarek] 2011-08-26 12:53:26 PDT
Created attachment 556109 [details] [diff] [review]
use C99 isfinite on OS X, since finite is deprecated (and not present on iOS).

Updated patch. I changed the #define around and added a comment.
Comment 4 Ted Mielczarek [:ted.mielczarek] 2011-08-29 08:20:09 PDT
http://hg.mozilla.org/projects/build-system/rev/80b591f7b135
Comment 5 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-08-31 08:07:13 PDT
http://hg.mozilla.org/mozilla-central/rev/80b591f7b135

Note You need to log in before you can comment on or make changes to this bug.