Module Name: src
Committed By: christos
Date: Sat Aug 27 09:56:22 UTC 2022
Modified Files:
src/lib/libm: Makefile
src/lib/libm/noieee_src: n_sincos.c
Added Files:
src/lib/libm/noieee_src: n_sincos1.c
Log Message:
Fix vax build.
To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 src/lib/libm/Makefile
cvs rdiff -u -r1.8 -r1.9 src/lib/libm/noieee_src/n_sincos.c
cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_sincos1.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.217 src/lib/libm/Makefile:1.218
--- src/lib/libm/Makefile:1.217 Sat Aug 27 04:31:58 2022
+++ src/lib/libm/Makefile Sat Aug 27 05:56:21 2022
@@ -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 @@ NOIEEE_SRCS = n_asincos.c n_acosh.c n_as
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
Index: src/lib/libm/noieee_src/n_sincos.c
diff -u src/lib/libm/noieee_src/n_sincos.c:1.8 src/lib/libm/noieee_src/n_sincos.c:1.9
--- src/lib/libm/noieee_src/n_sincos.c:1.8 Sat Aug 27 04:31:59 2022
+++ src/lib/libm/noieee_src/n_sincos.c Sat Aug 27 05:56:21 2022
@@ -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 @@ static char sccsid[] = "@(#)sincos.c 8.1
#ifdef __weak_alias
__weak_alias(_sinl, sin);
__weak_alias(_cosl, cos);
-__weak_alias(_sincosl, sincos);
#endif
double
Added files:
Index: src/lib/libm/noieee_src/n_sincos1.c
diff -u /dev/null src/lib/libm/noieee_src/n_sincos1.c:1.1
--- /dev/null Sat Aug 27 05:56:22 2022
+++ src/lib/libm/noieee_src/n_sincos1.c Sat Aug 27 05:56:21 2022
@@ -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);
+}