Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm Define copysignl on !long double platforms. Be cons...
details: https://anonhg.NetBSD.org/src/rev/2cff8282be4b
branches: trunk
changeset: 803843:2cff8282be4b
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Nov 14 14:53:17 2014 +0000
description:
Define copysignl on !long double platforms. Be consistent in the use of
weak aliases.
diffstat:
lib/libm/arch/vax/n_support.S | 5 +++--
lib/libm/src/namespace.h | 3 ++-
lib/libm/src/s_copysign.c | 7 ++++++-
lib/libm/src/s_copysignl.c | 12 ++++++++++--
4 files changed, 21 insertions(+), 6 deletions(-)
diffs (94 lines):
diff -r afb1ae94aa2e -r 2cff8282be4b lib/libm/arch/vax/n_support.S
--- a/lib/libm/arch/vax/n_support.S Fri Nov 14 14:45:34 2014 +0000
+++ b/lib/libm/arch/vax/n_support.S Fri Nov 14 14:53:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: n_support.S,v 1.9 2014/03/15 14:12:56 martin Exp $ */
+/* $NetBSD: n_support.S,v 1.10 2014/11/14 14:53:17 joerg Exp $ */
/*
* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
@@ -32,7 +32,8 @@
#include <machine/asm.h>
WEAK_ALIAS(logbl,logb)
-WEAK_ALIAS(copysignl, copysign)
+WEAK_ALIAS(copysignl, _copysignl)
+WEAK_ALIAS(_copysignl, copysign)
.text
_sccsid:
diff -r afb1ae94aa2e -r 2cff8282be4b lib/libm/src/namespace.h
--- a/lib/libm/src/namespace.h Fri Nov 14 14:45:34 2014 +0000
+++ b/lib/libm/src/namespace.h Fri Nov 14 14:53:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.12 2014/11/14 03:31:41 christos Exp $ */
+/* $NetBSD: namespace.h,v 1.13 2014/11/14 14:53:17 joerg Exp $ */
#define atan2 _atan2
#define atan2f _atan2f
@@ -46,6 +46,7 @@
#define scalblnf _scalblnf
#define scalblnl _scalblnl
+#define copysignl _copysignl
#define sqrtl _sqrtl
#define cbrtl _cbrtl
#define ceill _ceill
diff -r afb1ae94aa2e -r 2cff8282be4b lib/libm/src/s_copysign.c
--- a/lib/libm/src/s_copysign.c Fri Nov 14 14:45:34 2014 +0000
+++ b/lib/libm/src/s_copysign.c Fri Nov 14 14:53:17 2014 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: s_copysign.c,v 1.11 2002/05/26 22:01:54 wiz Exp $");
+__RCSID("$NetBSD: s_copysign.c,v 1.12 2014/11/14 14:53:17 joerg Exp $");
#endif
/*
@@ -24,6 +24,11 @@
#include "math.h"
#include "math_private.h"
+#ifndef __HAVE_LONG_DOUBLE
+__strong_alias(_copysignl, copysign)
+__weak_alias(copysignl, copysign)
+#endif
+
double
copysign(double x, double y)
{
diff -r afb1ae94aa2e -r 2cff8282be4b lib/libm/src/s_copysignl.c
--- a/lib/libm/src/s_copysignl.c Fri Nov 14 14:45:34 2014 +0000
+++ b/lib/libm/src/s_copysignl.c Fri Nov 14 14:53:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s_copysignl.c,v 1.3 2014/10/22 10:32:50 joerg Exp $ */
+/* $NetBSD: s_copysignl.c,v 1.4 2014/11/14 14:53:17 joerg Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -26,11 +26,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: s_copysignl.c,v 1.3 2014/10/22 10:32:50 joerg Exp $");
+__RCSID("$NetBSD: s_copysignl.c,v 1.4 2014/11/14 14:53:17 joerg Exp $");
+#include "namespace.h"
#include <math.h>
#include <machine/ieee.h>
+#ifdef __HAVE_LONG_DOUBLE
+
+#ifdef __weak_alias
+__weak_alias(copysignl, _copysignl)
+#endif
+
/*
* copysignl(long double x, long double y)
* This function returns a value with the magnitude of x and the sign of y.
@@ -62,3 +69,4 @@
return ux.ldblu_ld;
}
#endif
+#endif /* __HAVE_LONG_DOUBLE */
Home |
Main Index |
Thread Index |
Old Index