patches/mpfr/2.4.1/140-zeta_ui-shift.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
     2 --- mpfr-2.4.1-a/PATCHES	2009-03-13 02:50:47.000000000 +0000
     3 +++ mpfr-2.4.1-b/PATCHES	2009-03-13 02:50:48.000000000 +0000
     4 @@ -0,0 +1 @@
     5 +zeta_ui-shift
     6 diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
     7 --- mpfr-2.4.1-a/VERSION	2009-03-10 01:44:40.000000000 +0000
     8 +++ mpfr-2.4.1-b/VERSION	2009-03-13 02:50:48.000000000 +0000
     9 @@ -1 +1 @@
    10 -2.4.1-p4
    11 +2.4.1-p5
    12 diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
    13 --- mpfr-2.4.1-a/mpfr.h	2009-03-10 01:44:40.000000000 +0000
    14 +++ mpfr-2.4.1-b/mpfr.h	2009-03-13 02:50:48.000000000 +0000
    15 @@ -27,7 +27,7 @@
    16  #define MPFR_VERSION_MAJOR 2
    17  #define MPFR_VERSION_MINOR 4
    18  #define MPFR_VERSION_PATCHLEVEL 1
    19 -#define MPFR_VERSION_STRING "2.4.1-p4"
    20 +#define MPFR_VERSION_STRING "2.4.1-p5"
    21  
    22  /* Macros dealing with MPFR VERSION */
    23  #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    24 diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
    25 --- mpfr-2.4.1-a/version.c	2009-03-10 01:44:40.000000000 +0000
    26 +++ mpfr-2.4.1-b/version.c	2009-03-13 02:50:48.000000000 +0000
    27 @@ -25,5 +25,5 @@
    28  const char *
    29  mpfr_get_version (void)
    30  {
    31 -  return "2.4.1-p4";
    32 +  return "2.4.1-p5";
    33  }
    34 diff -Naurd mpfr-2.4.1-a/zeta_ui.c mpfr-2.4.1-b/zeta_ui.c
    35 --- mpfr-2.4.1-a/zeta_ui.c	2009-02-20 09:43:17.000000000 +0000
    36 +++ mpfr-2.4.1-b/zeta_ui.c	2009-03-13 02:50:48.000000000 +0000
    37 @@ -177,7 +177,9 @@
    38                    mpz_mul_ui (t, t, 2 * k - 1);
    39                  }
    40                mpz_div_2exp (t, t, 1);
    41 -              if (n < 1UL << (BITS_PER_MP_LIMB / 2))
    42 +              /* Warning: the test below assumes that an unsigned long
    43 +                 has no padding bits. */
    44 +              if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2))
    45                  /* (n - k + 1) * (n + k - 1) < n^2 */
    46                  mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1));
    47                else