Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm Fix vax build.
details: https://anonhg.NetBSD.org/src/rev/117ef72a18a7
branches: trunk
changeset: 369660:117ef72a18a7
user: christos <christos%NetBSD.org@localhost>
date: Sat Aug 27 09:56:21 2022 +0000
description:
Fix vax build.
diffstat:
lib/libm/Makefile | 4 +-
lib/libm/noieee_src/n_sincos.c | 3 +-
lib/libm/noieee_src/n_sincos1.c | 52 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 4 deletions(-)
diffs (91 lines):
diff -r 8d9d5922b7d6 -r 117ef72a18a7 lib/libm/Makefile
--- a/lib/libm/Makefile Sat Aug 27 08:58:31 2022 +0000
+++ b/lib/libm/Makefile Sat Aug 27 09:56:21 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.217 2022/08/27 08:31:58 christos Exp $
+# $NetBSD: Makefile,v 1.218 2022/08/27 09:56:21 christos Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -313,7 +313,7 @@
n_fmod.c n_gamma.c n_ilogb.c \
n_lgamma.c n_j0.c n_j1.c n_jn.c n_log.c n_log10.c n_log1p.c \
n_log2.c n_log__L.c n_pow.c n_sinh.c n_tanh.c \
- n_sincos.c n_tan.c \
+ n_sincos.c n_sincos1.c n_tan.c \
n_round.c n_roundf.c n_lround.c n_lroundf.c \
n_fmax.c n_fmaxf.c n_fmin.c n_fminf.c
# n_sqrt.c n_argred.c n_infnan.c n_atan2.c n_cabs.c n_cbrt.c n_support.c
diff -r 8d9d5922b7d6 -r 117ef72a18a7 lib/libm/noieee_src/n_sincos.c
--- a/lib/libm/noieee_src/n_sincos.c Sat Aug 27 08:58:31 2022 +0000
+++ b/lib/libm/noieee_src/n_sincos.c Sat Aug 27 09:56:21 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: n_sincos.c,v 1.8 2022/08/27 08:31:59 christos Exp $ */
+/* $NetBSD: n_sincos.c,v 1.9 2022/08/27 09:56:21 christos Exp $ */
/*
* Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved.
@@ -41,7 +41,6 @@
#ifdef __weak_alias
__weak_alias(_sinl, sin);
__weak_alias(_cosl, cos);
-__weak_alias(_sincosl, sincos);
#endif
double
diff -r 8d9d5922b7d6 -r 117ef72a18a7 lib/libm/noieee_src/n_sincos1.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/noieee_src/n_sincos1.c Sat Aug 27 09:56:21 2022 +0000
@@ -0,0 +1,52 @@
+/* $NetBSD: n_sincos1.c,v 1.1 2022/08/27 09:56:21 christos Exp $ */
+
+/*-
+ * Copyright (c) 2022 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: n_sincos1.c,v 1.1 2022/08/27 09:56:21 christos Exp $");
+
+#include <math.h>
+
+#ifdef __weak_alias
+__weak_alias(_sincosl, sincos)
+#endif
+
+void
+sincos(double x, double *s, double *c)
+{
+ *s = sin(x);
+ *c = cos(x);
+}
+
+void
+sincosf(float x, float *s, float *c)
+{
+ *s = sinf(x);
+ *c = cosf(x);
+}
Home |
Main Index |
Thread Index |
Old Index