From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 8F2603840C0A; Tue, 4 Aug 2020 17:31:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F2603840C0A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libm/common: Set WANT_ERRNO based on _IEEE_LIBM value X-Act-Checkin: newlib-cygwin X-Git-Author: Keith Packard via Newlib X-Git-Refname: refs/heads/master X-Git-Oldrev: 4f5b52ffe7e91866fea18072b69c912385397648 X-Git-Newrev: bb166cfc3e45ceb712fb867c116b7cae4834209d Message-Id: <20200804173103.8F2603840C0A@sourceware.org> Date: Tue, 4 Aug 2020 17:31:03 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2020 17:31:03 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bb166cfc3e45ceb712fb867c116b7cae4834209d commit bb166cfc3e45ceb712fb867c116b7cae4834209d Author: Keith Packard via Newlib 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 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