# HG changeset patch # User "Yann E. MORIN" # Date 1249248817 -7200 # Node ID acee1a44d10d5a6667bf238f1964c188240697c2 # Parent 2fbb4aea2a88ae0c09c5886b72fb59b9c3081829 [comp-lib-gmp] Add latest versions Add 4.3.0 and 4.3.1. diff -r 2fbb4aea2a88 -r acee1a44d10d config/companion_libs/gmp.in --- a/config/companion_libs/gmp.in Sun Aug 02 23:33:37 2009 +0200 +++ b/config/companion_libs/gmp.in Sun Aug 02 23:33:37 2009 +0200 @@ -12,6 +12,14 @@ bool prompt "4.2.4" +config GMP_V_4_3_0 + bool + prompt "4.3.0" + +config GMP_V_4_3_1 + bool + prompt "4.3.1" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice @@ -20,5 +28,7 @@ string default "4.2.2" if GMP_V_4_2_2 default "4.2.4" if GMP_V_4_2_4 + default "4.3.0" if GMP_V_4_3_0 + default "4.3.1" if GMP_V_4_3_1 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! diff -r 2fbb4aea2a88 -r acee1a44d10d patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch Sun Aug 02 23:33:37 2009 +0200 @@ -0,0 +1,33 @@ +diff --git a/mpz/remove.c b/mpz/remove.c +--- a/mpz/remove.c ++++ b/mpz/remove.c +@@ -23,7 +23,7 @@ + unsigned long int + mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f) + { +- mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */ ++ mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */ + mpz_t x, rem; + unsigned long int pwr; + int p; +@@ -69,7 +69,7 @@ + mpz_set (dest, x); + } + +- pwr = (1 << p) - 1; ++ pwr = (1L << p) - 1; + + mpz_clear (fpow[p]); + +diff --git a/mpz/remove.c b/mpz/remove.c +--- a/mpz/remove.c ++++ b/mpz/remove.c +@@ -80,7 +80,7 @@ + mpz_tdiv_qr (x, rem, dest, fpow[p]); + if (SIZ (rem) == 0) + { +- pwr += 1 << p; ++ pwr += 1L << p; + mpz_set (dest, x); + } + mpz_clear (fpow[p]); diff -r 2fbb4aea2a88 -r acee1a44d10d patches/gmp/4.3.1/110-unbounded-alloc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gmp/4.3.1/110-unbounded-alloc.patch Sun Aug 02 23:33:37 2009 +0200 @@ -0,0 +1,31 @@ +diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c +--- a/mpn/generic/toom44_mul.c ++++ b/mpn/generic/toom44_mul.c +@@ -116,17 +116,16 @@ + + TMP_MARK; + +- as1 = TMP_SALLOC_LIMBS (n + 1); +- asm1 = TMP_SALLOC_LIMBS (n + 1); +- as2 = TMP_SALLOC_LIMBS (n + 1); +- ash = TMP_SALLOC_LIMBS (n + 1); +- asmh = TMP_SALLOC_LIMBS (n + 1); +- +- bs1 = TMP_SALLOC_LIMBS (n + 1); +- bsm1 = TMP_SALLOC_LIMBS (n + 1); +- bs2 = TMP_SALLOC_LIMBS (n + 1); +- bsh = TMP_SALLOC_LIMBS (n + 1); +- bsmh = TMP_SALLOC_LIMBS (n + 1); ++ as1 = TMP_ALLOC_LIMBS (10 * n + 10); ++ asm1 = as1 + n + 1; ++ as2 = asm1 + n + 1; ++ ash = as2 + n + 1; ++ asmh = ash + n + 1; ++ bs1 = asmh + n + 1; ++ bsm1 = bs1 + n + 1; ++ bs2 = bsm1 + n + 1; ++ bsh = bs2 + n + 1; ++ bsmh = bsh + n + 1; + + gp = pp; + hp = pp + n + 1;