RFR: Use isnan instead of isnanf

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Apr 12 09:52:06 UTC 2017


On 2017-04-12 02:30, David Holmes wrote:
> Hi Mikael,
>
> On 12/04/2017 9:04 AM, Mikael Vidstedt wrote:
>>
>> isnanf is not available in musl. posix says that isnan handles both 
>> float and double arguments (typically through a macro checking the 
>> size of the operand and delegation to the corresponding/actual isnan 
>> primitive).
>>
>> This change makes the two JDK wrapper macros call isnan instead of 
>> isnanf. I’ve tried to verify that the toolchains I have access to 
>> does the Right(tm) thing for float, but additional 
>> verification/testing is probably warranted before this is “productized”.
>>
>> hotspot: 
>> http://cr.openjdk.java.net/~mikael/webrevs/portola/isnan/webrev.00/hotspot/webrev/
>> jdk: 
>> http://cr.openjdk.java.net/~mikael/webrevs/portola/isnan/webrev.00/jdk/webrev/
>
> Are we building with C99 support enabled?
No, we are not. In fact, on Solaris, we build with c99 explicitly off.

We probably *should* move to C99 in JDK 10, but that is (perhaps?) 
another story.

/Magnus
>
> The feature test macros are shown as:
>
> isnan():
>   _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE || 
> _POSIX_C_SOURCE >= 200112L;
>   or cc -std=c99
>
> isnanf(), isnanl():
>   _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600
>
> On linux we don't seem to do anything to explicitly enable access to 
> either of these ??
>
> Thanks,
> David
>
>> Cheers,
>> Mikael
>>



More information about the portola-dev mailing list