[comp-lib-gmp] Add latest versions
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Aug 02 23:33:37 2009 +0200 (2009-08-02)
changeset 1440acee1a44d10d
parent 1439 2fbb4aea2a88
child 1441 0c44af8a8b5a
[comp-lib-gmp] Add latest versions

Add 4.3.0 and 4.3.1.
config/companion_libs/gmp.in
patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch
patches/gmp/4.3.1/110-unbounded-alloc.patch
     1.1 --- a/config/companion_libs/gmp.in	Sun Aug 02 23:33:37 2009 +0200
     1.2 +++ b/config/companion_libs/gmp.in	Sun Aug 02 23:33:37 2009 +0200
     1.3 @@ -12,6 +12,14 @@
     1.4      bool
     1.5      prompt "4.2.4"
     1.6  
     1.7 +config GMP_V_4_3_0
     1.8 +    bool
     1.9 +    prompt "4.3.0"
    1.10 +
    1.11 +config GMP_V_4_3_1
    1.12 +    bool
    1.13 +    prompt "4.3.1"
    1.14 +
    1.15  # CT_INSERT_VERSION_ABOVE
    1.16  # Don't remove above line!
    1.17  endchoice
    1.18 @@ -20,5 +28,7 @@
    1.19      string
    1.20      default "4.2.2" if GMP_V_4_2_2
    1.21      default "4.2.4" if GMP_V_4_2_4
    1.22 +    default "4.3.0" if GMP_V_4_3_0
    1.23 +    default "4.3.1" if GMP_V_4_3_1
    1.24  # CT_INSERT_VERSION_STRING_ABOVE
    1.25  # Don't remove above line!
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch	Sun Aug 02 23:33:37 2009 +0200
     2.3 @@ -0,0 +1,33 @@
     2.4 +diff --git a/mpz/remove.c b/mpz/remove.c
     2.5 +--- a/mpz/remove.c
     2.6 ++++ b/mpz/remove.c
     2.7 +@@ -23,7 +23,7 @@
     2.8 + unsigned long int
     2.9 + mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f)
    2.10 + {
    2.11 +-  mpz_t fpow[40];		/* inexhaustible...until year 2020 or so */
    2.12 ++  mpz_t fpow[GMP_LIMB_BITS];		/* Really MP_SIZE_T_BITS */
    2.13 +   mpz_t x, rem;
    2.14 +   unsigned long int pwr;
    2.15 +   int p;
    2.16 +@@ -69,7 +69,7 @@
    2.17 +       mpz_set (dest, x);
    2.18 +     }
    2.19 + 
    2.20 +-  pwr = (1 << p) - 1;
    2.21 ++  pwr = (1L << p) - 1;
    2.22 + 
    2.23 +   mpz_clear (fpow[p]);
    2.24 + 
    2.25 +diff --git a/mpz/remove.c b/mpz/remove.c
    2.26 +--- a/mpz/remove.c
    2.27 ++++ b/mpz/remove.c
    2.28 +@@ -80,7 +80,7 @@
    2.29 +       mpz_tdiv_qr (x, rem, dest, fpow[p]);
    2.30 +       if (SIZ (rem) == 0)
    2.31 + 	{
    2.32 +-	  pwr += 1 << p;
    2.33 ++	  pwr += 1L << p;
    2.34 + 	  mpz_set (dest, x);
    2.35 + 	}
    2.36 +       mpz_clear (fpow[p]);
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/gmp/4.3.1/110-unbounded-alloc.patch	Sun Aug 02 23:33:37 2009 +0200
     3.3 @@ -0,0 +1,31 @@
     3.4 +diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
     3.5 +--- a/mpn/generic/toom44_mul.c
     3.6 ++++ b/mpn/generic/toom44_mul.c
     3.7 +@@ -116,17 +116,16 @@
     3.8 + 
     3.9 +   TMP_MARK;
    3.10 + 
    3.11 +-  as1  = TMP_SALLOC_LIMBS (n + 1);
    3.12 +-  asm1 = TMP_SALLOC_LIMBS (n + 1);
    3.13 +-  as2  = TMP_SALLOC_LIMBS (n + 1);
    3.14 +-  ash  = TMP_SALLOC_LIMBS (n + 1);
    3.15 +-  asmh = TMP_SALLOC_LIMBS (n + 1);
    3.16 +-
    3.17 +-  bs1  = TMP_SALLOC_LIMBS (n + 1);
    3.18 +-  bsm1 = TMP_SALLOC_LIMBS (n + 1);
    3.19 +-  bs2  = TMP_SALLOC_LIMBS (n + 1);
    3.20 +-  bsh  = TMP_SALLOC_LIMBS (n + 1);
    3.21 +-  bsmh = TMP_SALLOC_LIMBS (n + 1);
    3.22 ++  as1  = TMP_ALLOC_LIMBS (10 * n + 10);
    3.23 ++  asm1 = as1  + n + 1;
    3.24 ++  as2  = asm1 + n + 1;
    3.25 ++  ash  = as2  + n + 1;
    3.26 ++  asmh = ash  + n + 1;
    3.27 ++  bs1  = asmh + n + 1;
    3.28 ++  bsm1 = bs1  + n + 1;
    3.29 ++  bs2  = bsm1 + n + 1;
    3.30 ++  bsh  = bs2  + n + 1;
    3.31 ++  bsmh = bsh  + n + 1;
    3.32 + 
    3.33 +   gp = pp;
    3.34 +   hp = pp + n + 1;