NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/57960: math.h symbols are inconsistently declared, defined, and tested
>Number: 57960
>Category: lib
>Synopsis: math.h symbols are inconsistently declared, defined, and tested
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 24 02:45:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, 8, ...
>Organization:
The NetLibm Foundation
>Environment:
>Description:
Some examples:
- math.h declaration of copysign is restricted to when _NETBSD_SOURCE is defined, despite being in C99
- math.h declaration of copysign is restricted to when _XOPEN_SOURCE or _NETBSD_SOURCE is defined, despite being in C99
- various architectures dropped symbols like atanl recently and nobody noticed
- various architectures are or were for a long time missing various libm symbols, like https://gnats.netbsd.org/53234 and https://gnats.netbsd.org/57881
We have a scattering of libm tests of functionality, and it takes some effort to write correct numerical tests, but we should have automatic tests to ensure systematically that:
- every function/variable/macro is declared under the correct sets of feature macros
- every symbol is defined by libm
It is relatively inexpensive to fix the implementations of symbols in libm on release branches, but forbidden to add missing symbols, so this is very painful every time we notice.
>How-To-Repeat:
do stuff with libm on certain architectures
>Fix:
Yes, please!
Home |
Main Index |
Thread Index |
Old Index