patches/mpfr/2.4.1/140-zeta_ui-shift.patch
changeset 1322 135e90f9b2ed
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/mpfr/2.4.1/140-zeta_ui-shift.patch	Tue May 05 20:49:08 2009 +0000
     1.3 @@ -0,0 +1,47 @@
     1.4 +diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
     1.5 +--- mpfr-2.4.1-a/PATCHES	2009-03-13 02:50:47.000000000 +0000
     1.6 ++++ mpfr-2.4.1-b/PATCHES	2009-03-13 02:50:48.000000000 +0000
     1.7 +@@ -0,0 +1 @@
     1.8 ++zeta_ui-shift
     1.9 +diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
    1.10 +--- mpfr-2.4.1-a/VERSION	2009-03-10 01:44:40.000000000 +0000
    1.11 ++++ mpfr-2.4.1-b/VERSION	2009-03-13 02:50:48.000000000 +0000
    1.12 +@@ -1 +1 @@
    1.13 +-2.4.1-p4
    1.14 ++2.4.1-p5
    1.15 +diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
    1.16 +--- mpfr-2.4.1-a/mpfr.h	2009-03-10 01:44:40.000000000 +0000
    1.17 ++++ mpfr-2.4.1-b/mpfr.h	2009-03-13 02:50:48.000000000 +0000
    1.18 +@@ -27,7 +27,7 @@
    1.19 + #define MPFR_VERSION_MAJOR 2
    1.20 + #define MPFR_VERSION_MINOR 4
    1.21 + #define MPFR_VERSION_PATCHLEVEL 1
    1.22 +-#define MPFR_VERSION_STRING "2.4.1-p4"
    1.23 ++#define MPFR_VERSION_STRING "2.4.1-p5"
    1.24 + 
    1.25 + /* Macros dealing with MPFR VERSION */
    1.26 + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    1.27 +diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
    1.28 +--- mpfr-2.4.1-a/version.c	2009-03-10 01:44:40.000000000 +0000
    1.29 ++++ mpfr-2.4.1-b/version.c	2009-03-13 02:50:48.000000000 +0000
    1.30 +@@ -25,5 +25,5 @@
    1.31 + const char *
    1.32 + mpfr_get_version (void)
    1.33 + {
    1.34 +-  return "2.4.1-p4";
    1.35 ++  return "2.4.1-p5";
    1.36 + }
    1.37 +diff -Naurd mpfr-2.4.1-a/zeta_ui.c mpfr-2.4.1-b/zeta_ui.c
    1.38 +--- mpfr-2.4.1-a/zeta_ui.c	2009-02-20 09:43:17.000000000 +0000
    1.39 ++++ mpfr-2.4.1-b/zeta_ui.c	2009-03-13 02:50:48.000000000 +0000
    1.40 +@@ -177,7 +177,9 @@
    1.41 +                   mpz_mul_ui (t, t, 2 * k - 1);
    1.42 +                 }
    1.43 +               mpz_div_2exp (t, t, 1);
    1.44 +-              if (n < 1UL << (BITS_PER_MP_LIMB / 2))
    1.45 ++              /* Warning: the test below assumes that an unsigned long
    1.46 ++                 has no padding bits. */
    1.47 ++              if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2))
    1.48 +                 /* (n - k + 1) * (n + k - 1) < n^2 */
    1.49 +                 mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1));
    1.50 +               else