public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libm/common: Set WANT_ERRNO based on _IEEE_LIBM value Date: Tue, 4 Aug 2020 17:31:03 +0000 (GMT) [thread overview] Message-ID: <20200804173103.8F2603840C0A@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bb166cfc3e45ceb712fb867c116b7cae4834209d commit bb166cfc3e45ceb712fb867c116b7cae4834209d Author: Keith Packard via Newlib <newlib@sourceware.org> Date: Mon Aug 3 10:55:03 2020 -0700 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> Diff: --- newlib/libm/common/math_config.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h index 1a2d0f639..3be7e6320 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
reply other threads:[~2020-08-04 17:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200804173103.8F2603840C0A@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).