Closed Bug 1320560 Opened 9 years ago Closed 8 years ago

use C99 isfinite() for all modern libc implementations

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: anarchy, Assigned: anarchy)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Use-C99-math-isfinite.patch (obsolete) — Splinter Review
Patch is straight forward, modern libc implementations do no use finite.
Comment on attachment 8814704 [details] [diff] [review] Use-C99-math-isfinite.patch Review of attachment 8814704 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/ds/nsMathUtils.h @@ +107,5 @@ > // Darwin has deprecated |finite| and recommends |isfinite|. The former is > // not present in the iOS SDK. > return std::isfinite(aNum); > #else > + return isfinite(aNum); Is isfinite different from std::isfinite? If it is the same, could it be merged into above elif?
Attached patch Use-C99-math-isfinite.patch (obsolete) — Splinter Review
After further review we can switch to isfinite as finite has been depreciated and is no longer used on modern implementations
Attachment #8814704 - Attachment is obsolete: true
Sorry for the noise, I attached the wrong revision of patch
Attachment #8824784 - Attachment is obsolete: true
Attachment #8824795 - Flags: review?(jacheng)
Comment on attachment 8824795 [details] [diff] [review] Use-C99-math-isfinite.patch Review of attachment 8824795 [details] [diff] [review]: ----------------------------------------------------------------- Look good to me. Make sure it can be compiled by all platforms. But I'm not capable of reviewing this code. Forward to Nathan to review.
Attachment #8824795 - Flags: review?(jacheng) → review?(nfroyd)
Comment on attachment 8824795 [details] [diff] [review] Use-C99-math-isfinite.patch Review of attachment 8824795 [details] [diff] [review]: ----------------------------------------------------------------- Sure, we can do this. Thanks!
Attachment #8824795 - Flags: review?(nfroyd) → review+
Nathan what do we need to do in order to get this landed on mozilla-central?
just fill the keywords with "checkin-needed", I did it and the sheriff will help to land it to inbound then central. Thank you
Keywords: checkin-needed
Assignee: nobody → anarchy
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4723934741c5 Use C99 math isfinite, finite has been depreciated and all modern libc implementations use isfinite. r=froydnj
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: