Update the patchset for MPFR 2.4.1 from upstream.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 05 20:49:08 2009 +0000 (2009-05-05)
changeset 1322135e90f9b2ed
parent 1321 56cfef0d2c24
child 1323 2790edc36b62
Update the patchset for MPFR 2.4.1 from upstream.

-------- diffstat follows --------
/trunk/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch | 25 25 0 0 ++++++++++++
/trunk/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch | 45 45 0 0 ++++++++++++++++++++++
/trunk/patches/mpfr/2.4.1/140-zeta_ui-shift.patch | 47 47 0 0 +++++++++++++++++++++++
3 files changed, 117 insertions(+)
patches/mpfr/2.4.1/120-cast-to-void-ptr.patch
patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch
patches/mpfr/2.4.1/140-zeta_ui-shift.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch	Tue May 05 20:49:08 2009 +0000
     1.3 @@ -0,0 +1,25 @@
     1.4 +diff -Naurd mpfr-2.4.1-a/tests/tfprintf.c mpfr-2.4.1-b/tests/tfprintf.c
     1.5 +--- mpfr-2.4.1-a/tests/tfprintf.c	2009-02-20 09:43:15.000000000 +0000
     1.6 ++++ mpfr-2.4.1-b/tests/tfprintf.c	2009-03-10 01:12:45.000000000 +0000
     1.7 +@@ -195,7 +195,7 @@
     1.8 +   check_vfprintf (fout, "a. %Pu, b. %c, c. %Zi%Zn", prec, ch, mpz, &mpz);
     1.9 +   check_length_with_cmp (6, mpz, 17, mpz_cmp_ui (mpz, 17), Zi);
    1.10 +   check_vfprintf (fout, "%% a. %#.0RNg, b. %Qx%Rn, c. %p", mpfr, mpq, &mpfr,
    1.11 +-                  &i);
    1.12 ++                  (void *) &i);
    1.13 +   check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg);
    1.14 + 
    1.15 + #ifndef NPRINTF_T
    1.16 +diff -Naurd mpfr-2.4.1-a/tests/tprintf.c mpfr-2.4.1-b/tests/tprintf.c
    1.17 +--- mpfr-2.4.1-a/tests/tprintf.c	2009-02-20 09:43:15.000000000 +0000
    1.18 ++++ mpfr-2.4.1-b/tests/tprintf.c	2009-03-10 01:12:45.000000000 +0000
    1.19 +@@ -191,7 +191,8 @@
    1.20 +   check_length (5, sz, 34, zu);
    1.21 +   check_vprintf ("a. %Pu, b. %c, c. %RUG, d. %Zi%Zn", prec, ch, mpfr, mpz, &mpz);
    1.22 +   check_length_with_cmp (6, mpz, 24, mpz_cmp_ui (mpz, 24), Zi);
    1.23 +-  check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", mpfr, mpq, &mpfr, &i);
    1.24 ++  check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p",
    1.25 ++                 mpfr, mpq, &mpfr, (void *) &i);
    1.26 +   check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg);
    1.27 + 
    1.28 + #ifndef NPRINTF_T
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch	Tue May 05 20:49:08 2009 +0000
     2.3 @@ -0,0 +1,45 @@
     2.4 +diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
     2.5 +--- mpfr-2.4.1-a/PATCHES	2009-03-10 01:44:39.000000000 +0000
     2.6 ++++ mpfr-2.4.1-b/PATCHES	2009-03-10 01:44:40.000000000 +0000
     2.7 +@@ -0,0 +1 @@
     2.8 ++vasprintf-mp_limb_t
     2.9 +diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
    2.10 +--- mpfr-2.4.1-a/VERSION	2009-03-04 13:16:46.000000000 +0000
    2.11 ++++ mpfr-2.4.1-b/VERSION	2009-03-10 01:44:40.000000000 +0000
    2.12 +@@ -1 +1 @@
    2.13 +-2.4.1-p2
    2.14 ++2.4.1-p4
    2.15 +diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
    2.16 +--- mpfr-2.4.1-a/mpfr.h	2009-03-04 13:16:46.000000000 +0000
    2.17 ++++ mpfr-2.4.1-b/mpfr.h	2009-03-10 01:44:40.000000000 +0000
    2.18 +@@ -27,7 +27,7 @@
    2.19 + #define MPFR_VERSION_MAJOR 2
    2.20 + #define MPFR_VERSION_MINOR 4
    2.21 + #define MPFR_VERSION_PATCHLEVEL 1
    2.22 +-#define MPFR_VERSION_STRING "2.4.1-p2"
    2.23 ++#define MPFR_VERSION_STRING "2.4.1-p4"
    2.24 + 
    2.25 + /* Macros dealing with MPFR VERSION */
    2.26 + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    2.27 +diff -Naurd mpfr-2.4.1-a/vasprintf.c mpfr-2.4.1-b/vasprintf.c
    2.28 +--- mpfr-2.4.1-a/vasprintf.c	2009-02-20 09:43:17.000000000 +0000
    2.29 ++++ mpfr-2.4.1-b/vasprintf.c	2009-03-10 01:44:40.000000000 +0000
    2.30 +@@ -398,7 +398,7 @@
    2.31 +         (void) va_arg ((ap), mpq_srcptr);       \
    2.32 +         break;                                  \
    2.33 +       case MP_LIMB_ARG:                         \
    2.34 +-        (void) va_arg ((ap), mp_ptr);           \
    2.35 ++        (void) va_arg ((ap), mp_limb_t);        \
    2.36 +         break;                                  \
    2.37 +       case MP_LIMB_ARRAY_ARG:                   \
    2.38 +         (void) va_arg ((ap), mp_ptr);           \
    2.39 +diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
    2.40 +--- mpfr-2.4.1-a/version.c	2009-03-04 13:16:46.000000000 +0000
    2.41 ++++ mpfr-2.4.1-b/version.c	2009-03-10 01:44:40.000000000 +0000
    2.42 +@@ -25,5 +25,5 @@
    2.43 + const char *
    2.44 + mpfr_get_version (void)
    2.45 + {
    2.46 +-  return "2.4.1-p2";
    2.47 ++  return "2.4.1-p4";
    2.48 + }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/mpfr/2.4.1/140-zeta_ui-shift.patch	Tue May 05 20:49:08 2009 +0000
     3.3 @@ -0,0 +1,47 @@
     3.4 +diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
     3.5 +--- mpfr-2.4.1-a/PATCHES	2009-03-13 02:50:47.000000000 +0000
     3.6 ++++ mpfr-2.4.1-b/PATCHES	2009-03-13 02:50:48.000000000 +0000
     3.7 +@@ -0,0 +1 @@
     3.8 ++zeta_ui-shift
     3.9 +diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
    3.10 +--- mpfr-2.4.1-a/VERSION	2009-03-10 01:44:40.000000000 +0000
    3.11 ++++ mpfr-2.4.1-b/VERSION	2009-03-13 02:50:48.000000000 +0000
    3.12 +@@ -1 +1 @@
    3.13 +-2.4.1-p4
    3.14 ++2.4.1-p5
    3.15 +diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
    3.16 +--- mpfr-2.4.1-a/mpfr.h	2009-03-10 01:44:40.000000000 +0000
    3.17 ++++ mpfr-2.4.1-b/mpfr.h	2009-03-13 02:50:48.000000000 +0000
    3.18 +@@ -27,7 +27,7 @@
    3.19 + #define MPFR_VERSION_MAJOR 2
    3.20 + #define MPFR_VERSION_MINOR 4
    3.21 + #define MPFR_VERSION_PATCHLEVEL 1
    3.22 +-#define MPFR_VERSION_STRING "2.4.1-p4"
    3.23 ++#define MPFR_VERSION_STRING "2.4.1-p5"
    3.24 + 
    3.25 + /* Macros dealing with MPFR VERSION */
    3.26 + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    3.27 +diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
    3.28 +--- mpfr-2.4.1-a/version.c	2009-03-10 01:44:40.000000000 +0000
    3.29 ++++ mpfr-2.4.1-b/version.c	2009-03-13 02:50:48.000000000 +0000
    3.30 +@@ -25,5 +25,5 @@
    3.31 + const char *
    3.32 + mpfr_get_version (void)
    3.33 + {
    3.34 +-  return "2.4.1-p4";
    3.35 ++  return "2.4.1-p5";
    3.36 + }
    3.37 +diff -Naurd mpfr-2.4.1-a/zeta_ui.c mpfr-2.4.1-b/zeta_ui.c
    3.38 +--- mpfr-2.4.1-a/zeta_ui.c	2009-02-20 09:43:17.000000000 +0000
    3.39 ++++ mpfr-2.4.1-b/zeta_ui.c	2009-03-13 02:50:48.000000000 +0000
    3.40 +@@ -177,7 +177,9 @@
    3.41 +                   mpz_mul_ui (t, t, 2 * k - 1);
    3.42 +                 }
    3.43 +               mpz_div_2exp (t, t, 1);
    3.44 +-              if (n < 1UL << (BITS_PER_MP_LIMB / 2))
    3.45 ++              /* Warning: the test below assumes that an unsigned long
    3.46 ++                 has no padding bits. */
    3.47 ++              if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2))
    3.48 +                 /* (n - k + 1) * (n + k - 1) < n^2 */
    3.49 +                 mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1));
    3.50 +               else