From 07d3f56792e85fbf2ace4137dd5d767b180fea49 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 29 Nov 2013 22:16:10 +0000 Subject: [PATCH] Use normal style for checking for long double support. Add missing aliases for fminl and fmaxl, fabsl is here just for symmetry. --- lib/libm/src/s_fabs.c | 6 +++++- lib/libm/src/s_fabsl.c | 6 +++--- lib/libm/src/s_fmax.c | 6 +++++- lib/libm/src/s_fmaxl.c | 4 ++-- lib/libm/src/s_fmin.c | 6 +++++- lib/libm/src/s_fminl.c | 4 ++-- 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/lib/libm/src/s_fabs.c b/lib/libm/src/s_fabs.c index 93227cfc1ca2..67ed8ba5555e 100644 --- a/lib/libm/src/s_fabs.c +++ b/lib/libm/src/s_fabs.c @@ -12,7 +12,7 @@ #include #if defined(LIBM_SCCS) && !defined(lint) -__RCSID("$NetBSD: s_fabs.c,v 1.10 2002/05/26 22:01:55 wiz Exp $"); +__RCSID("$NetBSD: s_fabs.c,v 1.11 2013/11/29 22:16:10 joerg Exp $"); #endif /* @@ -22,6 +22,10 @@ __RCSID("$NetBSD: s_fabs.c,v 1.10 2002/05/26 22:01:55 wiz Exp $"); #include "math.h" #include "math_private.h" +#ifndef __HAVE_LONG_DOUBLE +__strong_alias(fabsl, fabs) +#endif + double fabs(double x) { diff --git a/lib/libm/src/s_fabsl.c b/lib/libm/src/s_fabsl.c index b2c8cfc01784..57c74891b938 100644 --- a/lib/libm/src/s_fabsl.c +++ b/lib/libm/src/s_fabsl.c @@ -1,4 +1,4 @@ -/* $NetBSD: s_fabsl.c,v 1.2 2010/09/17 20:39:39 christos Exp $ */ +/* $NetBSD: s_fabsl.c,v 1.3 2013/11/29 22:16:10 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,7 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: s_fabsl.c,v 1.2 2010/09/17 20:39:39 christos Exp $"); +__RCSID("$NetBSD: s_fabsl.c,v 1.3 2013/11/29 22:16:10 joerg Exp $"); #include #include @@ -35,7 +35,7 @@ __RCSID("$NetBSD: s_fabsl.c,v 1.2 2010/09/17 20:39:39 christos Exp $"); * fabsl(long double x) * This function returns the absolute value of its argumetn x, |x|. */ -#ifdef EXT_EXP_INFNAN +#ifdef __HAVE_LONG_DOUBLE long double fabsl(long double x) { diff --git a/lib/libm/src/s_fmax.c b/lib/libm/src/s_fmax.c index 728a4dfc0627..72f6b5dc1121 100644 --- a/lib/libm/src/s_fmax.c +++ b/lib/libm/src/s_fmax.c @@ -25,7 +25,7 @@ */ #include -__RCSID("$NetBSD: s_fmax.c,v 1.2 2010/03/08 01:05:20 snj Exp $"); +__RCSID("$NetBSD: s_fmax.c,v 1.3 2013/11/29 22:16:10 joerg Exp $"); #ifdef notdef __FBSDID("$FreeBSD: src/lib/msun/src/s_fmax.c,v 1.1 2004/06/30 07:04:01 das Exp $"); #endif @@ -34,6 +34,10 @@ __FBSDID("$FreeBSD: src/lib/msun/src/s_fmax.c,v 1.1 2004/06/30 07:04:01 das Exp #include +#ifndef __HAVE_LONG_DOUBLE +__strong_alias(fmaxl, fmax) +#endif + double fmax(double x, double y) { diff --git a/lib/libm/src/s_fmaxl.c b/lib/libm/src/s_fmaxl.c index 39d92d8141e8..6a06938d9e67 100644 --- a/lib/libm/src/s_fmaxl.c +++ b/lib/libm/src/s_fmaxl.c @@ -25,7 +25,7 @@ */ #include -__RCSID("$NetBSD: s_fmaxl.c,v 1.3 2011/07/04 11:46:41 mrg Exp $"); +__RCSID("$NetBSD: s_fmaxl.c,v 1.4 2013/11/29 22:16:10 joerg Exp $"); #ifdef notdef __FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxl.c,v 1.1 2004/06/30 07:04:01 das Exp $"); #endif @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxl.c,v 1.1 2004/06/30 07:04:01 das Exp #include #include -#ifdef EXT_EXP_INFNAN +#ifdef __HAVE_LONG_DOUBLE long double fmaxl(long double x, long double y) { diff --git a/lib/libm/src/s_fmin.c b/lib/libm/src/s_fmin.c index dcf2e388b36f..ad4bed611b23 100644 --- a/lib/libm/src/s_fmin.c +++ b/lib/libm/src/s_fmin.c @@ -25,7 +25,7 @@ */ #include -__RCSID("$NetBSD: s_fmin.c,v 1.1 2009/10/04 22:04:30 christos Exp $"); +__RCSID("$NetBSD: s_fmin.c,v 1.2 2013/11/29 22:16:10 joerg Exp $"); #ifdef notdef __FBSDID("$FreeBSD: src/lib/msun/src/s_fmin.c,v 1.1 2004/06/30 07:04:01 das Exp $"); #endif @@ -34,6 +34,10 @@ __FBSDID("$FreeBSD: src/lib/msun/src/s_fmin.c,v 1.1 2004/06/30 07:04:01 das Exp #include +#ifndef __HAVE_LONG_DOUBLE +__strong_alias(fminl, fmin) +#endif + double fmin(double x, double y) { diff --git a/lib/libm/src/s_fminl.c b/lib/libm/src/s_fminl.c index 3e06c3dbf3b0..8f45b378402f 100644 --- a/lib/libm/src/s_fminl.c +++ b/lib/libm/src/s_fminl.c @@ -25,7 +25,7 @@ */ #include -__RCSID("$NetBSD: s_fminl.c,v 1.3 2011/07/04 11:46:41 mrg Exp $"); +__RCSID("$NetBSD: s_fminl.c,v 1.4 2013/11/29 22:16:10 joerg Exp $"); #ifdef notdef __FBSDID("$FreeBSD: src/lib/msun/src/s_fminl.c,v 1.1 2004/06/30 07:04:01 das Exp $"); #endif @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD: src/lib/msun/src/s_fminl.c,v 1.1 2004/06/30 07:04:01 das Exp #include #include -#ifdef EXT_EXP_INFNAN +#ifdef __HAVE_LONG_DOUBLE long double fminl(long double x, long double y) {