4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-08 18:19:08 +08:00

libm/common: Set WANT_ERRNO based on _IEEE_LIBM value

_IEEE_LIBM is the configuration value which controls whether the
original libm functions modify errno. Use that in the new math code as
well so that the resulting library is internally consistent.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard via Newlib 2020-08-03 10:55:03 -07:00 committed by Ken Brown
parent 10f6c392b0
commit 325de9664e

View File

@ -36,7 +36,9 @@
/* Correct special case results in non-nearest rounding modes. */ /* Correct special case results in non-nearest rounding modes. */
# define WANT_ROUNDING 1 # define WANT_ROUNDING 1
#endif #endif
#ifndef WANT_ERRNO #ifdef _IEEE_LIBM
# define WANT_ERRNO 0
#else
/* Set errno according to ISO C with (math_errhandling & MATH_ERRNO) != 0. */ /* Set errno according to ISO C with (math_errhandling & MATH_ERRNO) != 0. */
# define WANT_ERRNO 1 # define WANT_ERRNO 1
#endif #endif