From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35980 invoked by alias); 10 Oct 2018 16:04:41 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 35958 invoked by uid 9078); 10 Oct 2018 16:04:41 -0000 Date: Wed, 10 Oct 2018 16:04:00 -0000 Message-ID: <20181010160441.35956.qmail@sourceware.org> 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] newlib: strtold: use __builtin_nanl to avoid libm dependency X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 682c4a9f1e77ced554e354bd2c1297b9afe2c6aa X-Git-Newrev: 35555851d700a267cca5070e65670c5a5f352d95 X-SW-Source: 2018-q4/txt/msg00008.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=35555851d700a267cca5070e65670c5a5f352d95 commit 35555851d700a267cca5070e65670c5a5f352d95 Author: Corinna Vinschen Date: Wed Oct 10 17:53:55 2018 +0200 newlib: strtold: use __builtin_nanl to avoid libm dependency Commit 6c212a8b7873703c4f98c6b68579b234918be83a ("Fix strtod ("nan") and strtold ("nan") returns wrong negative NaN") introduced an unconditional dependency to nanl and, in turn, to libm. Rather than including nanl in libc as well, just call __builtin_nanl from here. Requires GCC 3.3 or later. Signed-off-by: Corinna Vinschen Diff: --- newlib/libc/stdlib/strtorx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/stdlib/strtorx.c b/newlib/libc/stdlib/strtorx.c index a35dabe..4faed85 100644 --- a/newlib/libc/stdlib/strtorx.c +++ b/newlib/libc/stdlib/strtorx.c @@ -89,7 +89,7 @@ ULtox(__UShort *L, __ULong *bits, Long exp, int k) break; case STRTOG_NaN: - *((long double*)L) = nanl (""); + *((long double*)L) = __builtin_nanl (""); } if (k & STRTOG_Neg) L[_0] |= 0x8000;