This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] math: guard BSD finite/isinf/isnan functions properly in math.h


On 04/04/2016 03:27 PM, Yaakov Selkowitz wrote:
Now that we have properly functioning feature test macros, the BSD
floating-point classification functions can go into math.h instead of
the non-standard ieeefp.h, and not under the C99 guard:
The patch misses adjusting the comment at about line 212 of math.h which points to ieeefp.h for isinf and isnan prototypes.

http://man7.org/linux/man-pages/man3/finite.3.html

The isnan function was in earlier versions of SUS but removed starting with
POSIX.1-2001, compare:

http://pubs.opengroup.org/onlinepubs/007908799/xsh/math.h.html
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/math.h.html

Note that the isinf and isnan functions (but not the variants) conflict
with functions by the same name in C++11, hence they (and only they)
need to be hidden:
Umm, what about the C99 isinf and isnan macros?  They strictly conflict, too.

https://sourceware.org/git/?p=glibc.git;a=commit;h=d9b965fa56350d6eea9f7f438a0714c7ffbb183f
https://sourceware.org/git/?p=glibc.git;a=commit;h=3c47c83a9730c20e602694505b9278c25637b0d0

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]