diff options
author | Keith Packard via Newlib <newlib@sourceware.org> | 2020-08-03 10:55:03 -0700 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-08-04 19:30:45 +0200 |
commit | bb166cfc3e45ceb712fb867c116b7cae4834209d (patch) | |
tree | 5c1f74a4a7971cb6deef9b98057ffe297913d551 | |
parent | 4f5b52ffe7e91866fea18072b69c912385397648 (diff) | |
download | newlib-bb166cfc3e45ceb712fb867c116b7cae4834209d.zip newlib-bb166cfc3e45ceb712fb867c116b7cae4834209d.tar.gz newlib-bb166cfc3e45ceb712fb867c116b7cae4834209d.tar.bz2 |
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>
-rw-r--r-- | newlib/libm/common/math_config.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h index 1a2d0f6..3be7e63 100644 --- a/newlib/libm/common/math_config.h +++ b/newlib/libm/common/math_config.h @@ -36,7 +36,9 @@ /* Correct special case results in non-nearest rounding modes. */ # define WANT_ROUNDING 1 #endif -#ifndef WANT_ERRNO +#ifdef _IEEE_LIBM +# define WANT_ERRNO 0 +#else /* Set errno according to ISO C with (math_errhandling & MATH_ERRNO) != 0. */ # define WANT_ERRNO 1 #endif |