summaryrefslogtreecommitdiff
path: root/math/R/patches
diff options
context:
space:
mode:
Diffstat (limited to 'math/R/patches')
-rw-r--r--math/R/patches/patch-src_library_stats_src_cov.c17
-rw-r--r--math/R/patches/patch-src_main_format.c71
-rw-r--r--math/R/patches/patch-src_nmath_dnbeta.c15
-rw-r--r--math/R/patches/patch-src_nmath_pnbeta.c15
-rw-r--r--math/R/patches/patch-src_nmath_pnchisq.c18
5 files changed, 0 insertions, 136 deletions
diff --git a/math/R/patches/patch-src_library_stats_src_cov.c b/math/R/patches/patch-src_library_stats_src_cov.c
deleted file mode 100644
index d2933585fc1..00000000000
--- a/math/R/patches/patch-src_library_stats_src_cov.c
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-src_library_stats_src_cov.c,v 1.1 2013/08/13 19:53:30 markd Exp $
-
-No sqrtl() in NetBSD 6.x
-
---- src/library/stats/src/cov.c.orig 2013-03-05 23:02:24.000000000 +0000
-+++ src/library/stats/src/cov.c
-@@ -27,6 +27,10 @@
-
- #include "statsR.h"
-
-+#ifdef __NetBSD__
-+#define sqrtl sqrt
-+#endif
-+
- static SEXP corcov(SEXP x, SEXP y, SEXP na_method, SEXP kendall, Rboolean cor);
-
-
diff --git a/math/R/patches/patch-src_main_format.c b/math/R/patches/patch-src_main_format.c
deleted file mode 100644
index 8d91689b1b3..00000000000
--- a/math/R/patches/patch-src_main_format.c
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD: patch-src_main_format.c,v 1.4 2013/08/13 19:53:30 markd Exp $
-
-NetBSD does not have rintl() or floorl() so use the OpenBSD implementation
-of rintl() in that case. The same case exists for DragonFly.
-
---- src/main/format.c.orig 2013-03-05 23:02:40.000000000 +0000
-+++ src/main/format.c
-@@ -130,6 +130,7 @@ void formatInteger(int *x, R_xlen_t n, i
- # define R_nearbyintl rintl
- # else
- # define R_nearbyintl private_nearbyintl
-+# if !defined(__NetBSD__) && !defined(__DragonFly__)
- LDOUBLE private_nearbyintl(LDOUBLE x)
- {
- LDOUBLE x1;
-@@ -142,6 +143,55 @@ LDOUBLE private_nearbyintl(LDOUBLE x)
- if (x/2.0 == floorl(x/2.0)) return(x); else return(x1);
- }
- }
-+# else
-+#include <machine/ieee.h>
-+
-+#if LDBL_MAX_EXP != 0x4000
-+/* We also require the usual bias, min exp and expsign packing. */
-+#error "Unsupported long double format"
-+#endif
-+
-+#define BIAS (LDBL_MAX_EXP - 1)
-+
-+static const float
-+shift[2] = {
-+#if LDBL_MANT_DIG == 64
-+ 0x1.0p63, -0x1.0p63
-+#elif LDBL_MANT_DIG == 113
-+ 0x1.0p112, -0x1.0p112
-+#else
-+#error "Unsupported long double format"
-+#endif
-+};
-+static const float zero[2] = { 0.0, -0.0 };
-+
-+long double private_nearbyintl(long double x)
-+{
-+ union {
-+ long double e;
-+ struct ieee_ext bits;
-+ } u;
-+ uint32_t expsign;
-+ int ex, sign;
-+ u.e = x;
-+ expsign = (u.bits.ext_sign << 15) | u.bits.ext_exp;
-+ ex = expsign & 0x7fff;
-+
-+ if (ex >= BIAS + LDBL_MANT_DIG - 1) {
-+ if (ex == BIAS + LDBL_MAX_EXP)
-+ return (x + x); /* Inf, NaN, or unsupported format */
-+ return (x); /* finite and already an integer */
-+ }
-+ sign = expsign >> 15;
-+ x += shift[sign];
-+ x -= shift[sign];
-+
-+ if (ex < BIAS && x == 0.0L)
-+ return (zero[sign]);
-+
-+ return (x);
-+}
-+# endif
- # endif
- # else /* no long double */
- # ifdef HAVE_NEARBYINT
diff --git a/math/R/patches/patch-src_nmath_dnbeta.c b/math/R/patches/patch-src_nmath_dnbeta.c
deleted file mode 100644
index c66ef2d42f7..00000000000
--- a/math/R/patches/patch-src_nmath_dnbeta.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_nmath_dnbeta.c,v 1.2 2013/12/15 19:58:11 asau Exp $
-
-No logl() in NetBSD 6.x and FreeBSD 9.
-
---- src/nmath/dnbeta.c.orig 2013-03-05 23:02:41.000000000 +0000
-+++ src/nmath/dnbeta.c
-@@ -118,7 +118,7 @@ double dnbeta(double x, double a, double
- sum += term;
- } while (term > sum * eps);
-
--#ifdef HAVE_LONG_DOUBLE
-+#if defined(HAVE_LONG_DOUBLE) && ! defined(__NetBSD__) && ! defined(__FreeBSD__)
- return R_D_exp((double)(p_k + logl(sum)));
- #else
- return R_D_exp((double)(p_k + log(sum)));
diff --git a/math/R/patches/patch-src_nmath_pnbeta.c b/math/R/patches/patch-src_nmath_pnbeta.c
deleted file mode 100644
index 6284db756fb..00000000000
--- a/math/R/patches/patch-src_nmath_pnbeta.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_nmath_pnbeta.c,v 1.2 2013/12/15 19:58:11 asau Exp $
-
-No logl() in NetBSD 6.x and FreeBSD 9.
-
---- src/nmath/pnbeta.c.orig 2013-03-05 23:02:41.000000000 +0000
-+++ src/nmath/pnbeta.c
-@@ -92,7 +92,7 @@ pnbeta2(double x, double o_x, double a,
-
- /* return R_DT_val(ans), but we want to warn about cancellation here */
- if (lower_tail)
--#ifdef HAVE_LONG_DOUBLE
-+#if defined(HAVE_LONG_DOUBLE) && ! defined(__NetBSD__) && ! defined(__FreeBSD__)
- return (double) (log_p ? logl(ans) : ans);
- #else
- return log_p ? log(ans) : ans;
diff --git a/math/R/patches/patch-src_nmath_pnchisq.c b/math/R/patches/patch-src_nmath_pnchisq.c
deleted file mode 100644
index a579a77e37c..00000000000
--- a/math/R/patches/patch-src_nmath_pnchisq.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-src_nmath_pnchisq.c,v 1.2 2013/12/15 19:58:11 asau Exp $
-
-No expl() in NetBSD 6.x and FreeBSD 9.
-
---- src/nmath/pnchisq.c.orig 2013-03-05 23:02:41.000000000 +0000
-+++ src/nmath/pnchisq.c
-@@ -27,7 +27,11 @@
- */
-
- #ifdef HAVE_LONG_DOUBLE
-+#if defined(__NetBSD__) || defined(__FreeBSD__)
-+# define EXP exp
-+#else
- # define EXP expl
-+#endif
- # define FABS fabsl
- #else
- # define EXP exp