[PATCH 0/5] errno changes for libm
Keith Packard via Newlib <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Here's a series which reflects the review I did about newlib errno in various math functions. Patches 1-3 change the errno value used in gamma and y functions to match the POSIX spec which uses ERANGE in several places that used to set EDOM. Patches 1-3 and patch 4 change POSIX math functions so that they don't adjust values returned from the IEEE functions; none of those adjustments were necessary, and some of them were incorrect when compared with POSIX. This way, enabling errno support in the library doesn't also change what the functions return. Patch 5 is a proposed method for making newlib errno reporting consistent between all math functions. It uses _IEEE_LIBM across the whole library to select whether errno is set at library build time. When _IEEE_LIBM is not set, errno is always set by math functions when required. When _IEEE_LIBM is set, errno is never modified by math functions.