<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-legacy-support.
</pre>
<p><a href="https://github.com/macports/macports-legacy-support/commit/c64c24c328d5fc6bfd82843d1982aad9a0512d2d">https://github.com/macports/macports-legacy-support/commit/c64c24c328d5fc6bfd82843d1982aad9a0512d2d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit c64c24c328d5fc6bfd82843d1982aad9a0512d2d
</span>Author: Chris Jones <jonesc@hep.phy.cam.ac.uk>
AuthorDate: Thu Aug 15 14:54:50 2019 +0100
<span style='display:block; white-space:pre;color:#404040;'> move __sincos(f) implementations to library
</span>---
include/math.h | 27 ++++++++++++---------------
src/sincos.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 15 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/include/math.h b/include/math.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 4e7dfc3..a961108 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/include/math.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/include/math.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -71,6 +71,13 @@ __MP__END_DECLS
</span>
#endif /* __MP_LEGACY_SUPPORT_LLROUND__ */
<span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Include the next math.h, which might be from the primary system or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * it might be within GCC's c or c++ (yup!) headers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include_next <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> #if __MP_LEGACY_SUPPORT_COSSIN__
/* Following is borrowed from math.h on macOS 10.9+ */
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -78,23 +85,13 @@ __MP__END_DECLS
</span> /* __sincos and __sincosf were introduced in OSX 10.9 and iOS 7.0. When
targeting an older system, we simply split them up into discrete calls
to sin( ) and cos( ). */
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __sincosf(float __x, float *__sinp, float *__cosp) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *__sinp = sinf(__x);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *__cosp = cosf(__x);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-void __sincos(double __x, double *__sinp, double *__cosp) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *__sinp = sin(__x);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- *__cosp = cos(__x);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#endif /* __MP_LEGACY_SUPPORT_COSSIN__ */
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-/*
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * Include the next math.h, which might be from the primary system or
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- * it might be within GCC's c or c++ (yup!) headers
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+__MP__BEGIN_DECLS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extern void __sincosf(float __x, float *__sinp, float *__cosp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extern void __sincos(double __x, double *__sinp, double *__cosp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+__MP__END_DECLS
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#include_next <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __MP_LEGACY_SUPPORT_COSSIN__ */
</span>
#if __MP_LEGACY_SUPPORT_LLROUND__
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/sincos.c b/src/sincos.c
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..d09f200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/sincos.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,37 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Copyright (c) 2010 Chris Jones <jonesc@macports.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Copyright (c) 2019 Michael Dickens <michaelld@macports.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Permission to use, copy, modify, and distribute this software for any
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * purpose with or without fee is hereby granted, provided that the above
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * copyright notice and this permission notice appear in all copies.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* MP support header */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include <math.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if __MP_LEGACY_SUPPORT_COSSIN__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* Following is borrowed from math.h on macOS 10.9+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+/* __sincos and __sincosf were introduced in OSX 10.9 and iOS 7.0. When
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ targeting an older system, we simply split them up into discrete calls
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to sin( ) and cos( ). */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __sincosf(float __x, float *__sinp, float *__cosp) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *__sinp = sinf(__x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *__cosp = cosf(__x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __sincos(double __x, double *__sinp, double *__cosp) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *__sinp = sin(__x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *__cosp = cos(__x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif /* __MP_LEGACY_SUPPORT_COSSIN__ */
</span></pre><pre style='margin:0'>
</pre>