diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-10-19 04:19:14 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-10-19 04:19:14 +0000 |
commit | 1e644f45746e6e7d4677d2adfbcce74afa2655e9 (patch) | |
tree | 3660735891644d45d2d382149b04f85c966fd08a /dev-libs/mpfr/files | |
parent | Version bump. (diff) | |
download | gentoo-2-1e644f45746e6e7d4677d2adfbcce74afa2655e9.tar.gz gentoo-2-1e644f45746e6e7d4677d2adfbcce74afa2655e9.tar.bz2 gentoo-2-1e644f45746e6e7d4677d2adfbcce74afa2655e9.zip |
split mpfr out from gmp
(Portage version: 2.0.53_rc5)
Diffstat (limited to 'dev-libs/mpfr/files')
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch01 | 41 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch02 | 71 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch03 | 12 | ||||
-rw-r--r-- | dev-libs/mpfr/files/2.2.0/patch04 | 20 | ||||
-rw-r--r-- | dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 | 1 |
5 files changed, 145 insertions, 0 deletions
diff --git a/dev-libs/mpfr/files/2.2.0/patch01 b/dev-libs/mpfr/files/2.2.0/patch01 new file mode 100644 index 000000000000..7beb6624e5eb --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch01 @@ -0,0 +1,41 @@ +diff -Naurd mpfr-2.2.0/lngamma.c mpfr-2.2.0-p1/lngamma.c +--- mpfr-2.2.0/lngamma.c 2005-09-09 15:17:58.000000000 +0000 ++++ mpfr-2.2.0-p1/lngamma.c 2005-09-29 11:27:04.000000000 +0000 +@@ -167,8 +167,8 @@ + compared = mpfr_cmp_ui (z0, 1); + + #ifndef IS_GAMMA +- if (compared == 0) /* lngamma(1) = +0 */ +- return mpfr_set_ui (y, 0, GMP_RNDN); ++ if (compared == 0 || (compared > 0 && mpfr_cmp_ui (z0, 2) == 0)) ++ return mpfr_set_ui (y, 0, GMP_RNDN); /* lngamma(1 or 2) = +0 */ + #endif + + mpfr_init2 (s, MPFR_PREC_MIN); +diff -Naurd mpfr-2.2.0/tests/tlngamma.c mpfr-2.2.0-p1/tests/tlngamma.c +--- mpfr-2.2.0/tests/tlngamma.c 2005-09-09 15:17:59.000000000 +0000 ++++ mpfr-2.2.0-p1/tests/tlngamma.c 2005-09-29 11:20:34.000000000 +0000 +@@ -79,7 +79,7 @@ + + mpfr_set_ui (x, 1, GMP_RNDN); + mpfr_lngamma (y, x, GMP_RNDN); +- if (mpfr_cmp_ui (y, 0)) ++ if (mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) + { + printf ("Error for lngamma(1)\n"); + exit (1); +@@ -93,6 +93,14 @@ + exit (1); + } + ++ mpfr_set_ui (x, 2, GMP_RNDN); ++ mpfr_lngamma (y, x, GMP_RNDN); ++ if (mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) ++ { ++ printf ("Error for lngamma(2)\n"); ++ exit (1); ++ } ++ + mpfr_set_prec (x, 53); + mpfr_set_prec (y, 53); + diff --git a/dev-libs/mpfr/files/2.2.0/patch02 b/dev-libs/mpfr/files/2.2.0/patch02 new file mode 100644 index 000000000000..493e63de4e1f --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch02 @@ -0,0 +1,71 @@ +diff -Naurd mpfr-2.2.0-p1/mpfr.h mpfr-2.2.0-p2/mpfr.h +--- mpfr-2.2.0-p1/mpfr.h 2005-09-06 15:02:12.000000000 +0000 ++++ mpfr-2.2.0-p2/mpfr.h 2005-09-29 11:36:36.000000000 +0000 +@@ -630,12 +630,17 @@ + (__builtin_constant_p (_s) && (_s) >= 0 ? \ + mpfr_cmp_ui ((_f), (_s)) : \ + mpfr_cmp_si_2exp ((_f), (_s), 0)) ++#if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 + #undef mpfr_set_ui + #define mpfr_set_ui(_f,_u,_r) \ + (__builtin_constant_p (_u) && (_u) == 0 ? \ +- ((_f)->_mpfr_sign = 1, \ +- (_f)->_mpfr_exp = __MPFR_EXP_ZERO, 0): \ +- mpfr_set_ui (_f,_u,_r)) ++ __extension__ ({ \ ++ mpfr_ptr _p = (_f); \ ++ _p->_mpfr_sign = 1; \ ++ _p->_mpfr_exp = __MPFR_EXP_ZERO; \ ++ (void) (_r); 0; }) : \ ++ mpfr_set_ui (_f,_u,_r)) ++#endif + #undef mpfr_set_si + #define mpfr_set_si(_f,_s,_r) \ + (__builtin_constant_p (_s) && (_s) >= 0 ? \ +diff -Naurd mpfr-2.2.0-p1/tests/tset_si.c mpfr-2.2.0-p2/tests/tset_si.c +--- mpfr-2.2.0-p1/tests/tset_si.c 2005-08-18 17:03:17.000000000 +0000 ++++ mpfr-2.2.0-p2/tests/tset_si.c 2005-09-29 09:19:39.000000000 +0000 +@@ -72,6 +72,35 @@ + mpfr_clear (x); + } + ++static void ++test_macros (void) ++{ ++ mpfr_t x[3]; ++ mpfr_ptr p; ++ mpfr_rnd_t r; ++ ++ mpfr_inits (x[0], x[1], x[2], NULL); ++ p = x[0]; ++ r = 0; ++ mpfr_set_ui (p++, 0, r++); ++ if (p != x[1] || r != 1) ++ { ++ printf ("Error in mpfr_set_ui macro: p - x[0] = %d (expecting 1), " ++ "r = %d (expecting 1)\n", (int) (p - x[0]), r); ++ exit (1); ++ } ++ p = x[0]; ++ r = 0; ++ mpfr_set_si (p++, 0, r++); ++ if (p != x[1] || r != 1) ++ { ++ printf ("Error in mpfr_set_si macro: p - x[0] = %d (expecting 1), " ++ "r = %d (expecting 1)\n", (int) (p - x[0]), r); ++ exit (1); ++ } ++ mpfr_clears (x[0], x[1], x[2], NULL); ++} ++ + /* FIXME: Comparing against mpfr_get_si/ui is not ideal, it'd be better to + have all tests examine the bits in mpfr_t for what should come out. */ + +@@ -324,6 +353,7 @@ + mpfr_clear (x); + + test_2exp (); ++ test_macros (); + tests_end_mpfr (); + return 0; + } diff --git a/dev-libs/mpfr/files/2.2.0/patch03 b/dev-libs/mpfr/files/2.2.0/patch03 new file mode 100644 index 000000000000..d479590d5c0f --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch03 @@ -0,0 +1,12 @@ +diff -Naurd mpfr-2.2.0-p2/configure mpfr-2.2.0-p3/configure +--- mpfr-2.2.0-p2/configure 2005-09-19 13:31:58.000000000 +0000 ++++ mpfr-2.2.0-p3/configure 2005-10-02 10:49:55.000000000 +0000 +@@ -10519,7 +10519,7 @@ + ;; + + darwin* | rhapsody*) +- if test "$GXX" = yes ; then ++ if test "$GCC" = yes ; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) diff --git a/dev-libs/mpfr/files/2.2.0/patch04 b/dev-libs/mpfr/files/2.2.0/patch04 new file mode 100644 index 000000000000..203e1489404d --- /dev/null +++ b/dev-libs/mpfr/files/2.2.0/patch04 @@ -0,0 +1,20 @@ +diff -Naurd mpfr-2.2.0-p3/tests/tpow.c mpfr-2.2.0-p4/tests/tpow.c +--- mpfr-2.2.0-p3/tests/tpow.c 2005-06-02 16:12:05.000000000 +0000 ++++ mpfr-2.2.0-p4/tests/tpow.c 2005-10-06 09:54:52.000000000 +0000 +@@ -509,6 +509,7 @@ + for (i = 0; i < 11; i++) + for (j = 0; j < 11; j++) + { ++ double d; + int p; + static int q[11][11] = { + /* NaN +inf -inf +0 -0 +1 -1 +2 -2 +0.5 -0.5 */ +@@ -527,7 +528,7 @@ + test_pow (r, t[i], t[j], GMP_RNDN); + p = mpfr_nan_p (r) ? 0 : mpfr_inf_p (r) ? 1 : + mpfr_cmp_ui (r, 0) == 0 ? 2 : +- (int) (fabs (mpfr_get_d (r, GMP_RNDN)) * 128.0); ++ (d = mpfr_get_d (r, GMP_RNDN), (int) (ABS(d) * 128.0)); + if (p != 0 && MPFR_SIGN(r) < 0) + p = -p; + if (p != q[i][j]) diff --git a/dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 b/dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 new file mode 100644 index 000000000000..ae8d596e7d0a --- /dev/null +++ b/dev-libs/mpfr/files/digest-mpfr-2.2.0_p4 @@ -0,0 +1 @@ +MD5 1a81f721ee78cb027f6c41a243d3a33d mpfr-2.2.0.tar.bz2 728490 |