diff options
author | Kirill K. Smirnov <kirill.k.smirnov@gmail.com> | 2016-09-17 21:57:43 (GMT) |
---|---|---|
committer | Kirill K. Smirnov <kirill.k.smirnov@gmail.com> | 2016-09-17 21:57:43 (GMT) |
commit | bcb6b03df97fcb96867771fbb24491b4a03449b5 (patch) | |
tree | a01d0a482db3107db8fa16f52f4c872c29005fc5 /patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch | |
parent | 5a88b7fd2a0c24f65cf64e3d3050b0b5bdcd4e53 (diff) |
patches: add patches for gmp
This changeset adds official patches published on gmp website.
Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
Diffstat (limited to 'patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch')
-rw-r--r-- | patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch b/patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch new file mode 100644 index 0000000..f60e88f --- /dev/null +++ b/patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch @@ -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]); |