diff options
Diffstat (limited to 'mpi-patches')
-rw-r--r-- | mpi-patches/add-bitops | 14 | ||||
-rw-r--r-- | mpi-patches/add-mp-hash | 10 | ||||
-rw-r--r-- | mpi-patches/add-mp-set-intptr | 10 | ||||
-rw-r--r-- | mpi-patches/add-mpi-toradix-with-case | 14 | ||||
-rw-r--r-- | mpi-patches/bit-search-optimizations | 12 | ||||
-rw-r--r-- | mpi-patches/export-mp-eq | 10 | ||||
-rw-r--r-- | mpi-patches/faster-square-root | 12 | ||||
-rw-r--r-- | mpi-patches/fix-bad-shifts | 14 | ||||
-rw-r--r-- | mpi-patches/fix-ctype-warnings | 10 | ||||
-rw-r--r-- | mpi-patches/fix-mult-bug | 16 | ||||
-rw-r--r-- | mpi-patches/mpi-set-double-intptr | 10 | ||||
-rw-r--r-- | mpi-patches/mpi-set-mpi-word | 10 | ||||
-rw-r--r-- | mpi-patches/mpi-to-double | 12 | ||||
-rw-r--r-- | mpi-patches/use-txr-allocator | 20 |
14 files changed, 86 insertions, 88 deletions
diff --git a/mpi-patches/add-bitops b/mpi-patches/add-bitops index 81d7de2b..19b9fee9 100644 --- a/mpi-patches/add-bitops +++ b/mpi-patches/add-bitops @@ -1,7 +1,7 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2014-06-16 11:22:15.632802821 -0700 -+++ mpi-1.8.6/mpi.c 2014-06-28 07:42:26.140352649 -0700 +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:33:17.280186661 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:33:19.412149446 -0800 @@ -16,6 +16,9 @@ #include <ctype.h> #include <math.h> @@ -10,9 +10,9 @@ Index: mpi-1.8.6/mpi.c +#define MIN(A, B) ((A) < (B) ? (A) : (B)) + typedef unsigned char mem_t; - extern mem_t *chk_malloc(size_t size); extern mem_t *chk_calloc(size_t n, size_t size); -@@ -159,6 +162,7 @@ + +@@ -157,6 +160,7 @@ mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */ mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */ @@ -20,7 +20,7 @@ Index: mpi-1.8.6/mpi.c int s_highest_bit_mp(mp_int *a); mp_err s_mp_set_bit(mp_int *a, int bit); -@@ -2336,6 +2340,430 @@ +@@ -2334,6 +2338,430 @@ /* }}} */ @@ -453,8 +453,8 @@ Index: mpi-1.8.6/mpi.c int ix; Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2014-06-16 11:22:15.620803044 -0700 -+++ mpi-1.8.6/mpi.h 2014-06-28 08:46:48.354193482 -0700 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:33:14.612233293 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:33:19.412149446 -0800 @@ -54,6 +54,7 @@ /* Macros for accessing the mp_int internals */ diff --git a/mpi-patches/add-mp-hash b/mpi-patches/add-mp-hash index bd5e9bfa..71123678 100644 --- a/mpi-patches/add-mp-hash +++ b/mpi-patches/add-mp-hash @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2012-04-05 16:26:22.206340007 -0700 -+++ mpi-1.8.6/mpi.c 2012-04-09 08:59:09.673643507 -0700 -@@ -1960,6 +1960,34 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:43.876775527 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:46.612726878 -0800 +@@ -1958,6 +1958,34 @@ /* }}} */ @@ -39,8 +39,8 @@ Index: mpi-1.8.6/mpi.c Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2012-04-05 16:26:22.206340007 -0700 -+++ mpi-1.8.6/mpi.h 2012-04-09 08:58:17.100087507 -0700 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:43.876775527 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:32:46.612726878 -0800 @@ -165,6 +165,8 @@ int mp_isodd(mp_int *a); int mp_iseven(mp_int *a); diff --git a/mpi-patches/add-mp-set-intptr b/mpi-patches/add-mp-set-intptr index 87e4ebb4..cbaa9bf4 100644 --- a/mpi-patches/add-mp-set-intptr +++ b/mpi-patches/add-mp-set-intptr @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-10 18:20:55.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-10 19:40:53.000000000 -0800 -@@ -528,6 +528,59 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:35.248929450 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:37.136895701 -0800 +@@ -526,6 +526,59 @@ /* }}} */ @@ -64,8 +64,8 @@ Index: mpi-1.8.6/mpi.c Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2011-12-10 18:19:39.000000000 -0800 -+++ mpi-1.8.6/mpi.h 2011-12-10 19:39:58.000000000 -0800 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:35.236929664 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:32:37.136895701 -0800 @@ -94,6 +94,8 @@ void mp_zero(mp_int *mp); void mp_set(mp_int *mp, mp_digit d); diff --git a/mpi-patches/add-mpi-toradix-with-case b/mpi-patches/add-mpi-toradix-with-case index 8d5b1e73..e9983bf6 100644 --- a/mpi-patches/add-mpi-toradix-with-case +++ b/mpi-patches/add-mpi-toradix-with-case @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:32.456841257 -0800 -+++ mpi-1.8.6/mpi.c 2012-03-04 11:49:39.720925007 -0800 -@@ -2628,9 +2628,9 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:46.612726878 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:48.892686392 -0800 +@@ -2626,9 +2626,9 @@ /* }}} */ @@ -14,7 +14,7 @@ Index: mpi-1.8.6/mpi.c { int ix, pos = 0; -@@ -2661,7 +2661,7 @@ +@@ -2659,7 +2659,7 @@ } /* Generate digits, use capital letters */ @@ -23,7 +23,7 @@ Index: mpi-1.8.6/mpi.c str[pos++] = ch; } -@@ -2689,10 +2689,15 @@ +@@ -2687,10 +2687,15 @@ return MP_OKAY; @@ -42,8 +42,8 @@ Index: mpi-1.8.6/mpi.c int mp_char2value(char ch, int r) Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2012-03-04 11:49:32.196695007 -0800 -+++ mpi-1.8.6/mpi.h 2012-03-04 11:49:39.724927257 -0800 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:46.612726878 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:32:48.892686392 -0800 @@ -213,6 +213,7 @@ int mp_radix_size(mp_int *mp, int radix); int mp_value_radix_size(int num, int qty, int radix); diff --git a/mpi-patches/bit-search-optimizations b/mpi-patches/bit-search-optimizations index 3dfaaa52..305d6728 100644 --- a/mpi-patches/bit-search-optimizations +++ b/mpi-patches/bit-search-optimizations @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:59.676143507 -0800 -+++ mpi-1.8.6/mpi.c 2012-03-04 11:50:07.500542257 -0800 -@@ -2921,6 +2921,218 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:33:01.740459238 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:33:04.528410164 -0800 +@@ -2919,6 +2919,218 @@ /* }}} */ @@ -221,7 +221,7 @@ Index: mpi-1.8.6/mpi.c /* {{{ s_mp_exch(a, b) */ /* Exchange the data for a and b; (b, a) = (a, b) */ -@@ -3198,10 +3410,9 @@ +@@ -3196,10 +3408,9 @@ mp_digit t, d = 0; t = DIGIT(b, USED(b) - 1); @@ -235,7 +235,7 @@ Index: mpi-1.8.6/mpi.c if(d != 0) { s_mp_mul_2d(a, d); -@@ -3984,27 +4195,23 @@ +@@ -3982,27 +4193,23 @@ d = DIGIT(v, uv - 1); /* most significant digit of v */ @@ -275,7 +275,7 @@ Index: mpi-1.8.6/mpi.c } /* end s_mp_ispow2() */ /* }}} */ -@@ -4013,17 +4220,12 @@ +@@ -4011,17 +4218,12 @@ int s_mp_ispow2d(mp_digit d) { diff --git a/mpi-patches/export-mp-eq b/mpi-patches/export-mp-eq index e9ea7a49..121aa9c7 100644 --- a/mpi-patches/export-mp-eq +++ b/mpi-patches/export-mp-eq @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-09 13:56:19.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-09 13:56:23.000000000 -0800 -@@ -86,14 +86,6 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:37.136895701 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:43.876775527 -0800 +@@ -84,14 +84,6 @@ /* }}} */ @@ -19,8 +19,8 @@ Index: mpi-1.8.6/mpi.c /* Constant strings returned by mp_strerror() */ Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2011-12-09 13:56:19.000000000 -0800 -+++ mpi-1.8.6/mpi.h 2011-12-09 13:56:23.000000000 -0800 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:37.136895701 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:32:43.876775527 -0800 @@ -42,6 +42,10 @@ #define MP_UNDEF -5 /* answer is undefined */ #define MP_LAST_CODE MP_UNDEF diff --git a/mpi-patches/faster-square-root b/mpi-patches/faster-square-root index 36fa4993..c8663314 100644 --- a/mpi-patches/faster-square-root +++ b/mpi-patches/faster-square-root @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2014-02-17 22:25:46.042680203 -0800 -+++ mpi-1.8.6/mpi.c 2014-02-19 19:00:21.279452088 -0800 -@@ -158,6 +158,9 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:33:04.528410164 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:33:11.780282866 -0800 +@@ -156,6 +156,9 @@ mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */ mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */ @@ -12,7 +12,7 @@ Index: mpi-1.8.6/mpi.c void s_mp_clamp(mp_int *mp); /* clip leading zeroes */ void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */ -@@ -1535,77 +1538,61 @@ +@@ -1533,77 +1536,61 @@ /* {{{ mp_sqrt(a, b) */ @@ -136,7 +136,7 @@ Index: mpi-1.8.6/mpi.c /* }}} */ -@@ -2554,21 +2541,9 @@ +@@ -2552,21 +2539,9 @@ int mp_count_bits(mp_int *mp) { @@ -159,7 +159,7 @@ Index: mpi-1.8.6/mpi.c } /* end mp_count_bits() */ /* }}} */ -@@ -3132,6 +3107,27 @@ +@@ -3130,6 +3105,27 @@ abort(); } diff --git a/mpi-patches/fix-bad-shifts b/mpi-patches/fix-bad-shifts index abe109a2..acd77f51 100644 --- a/mpi-patches/fix-bad-shifts +++ b/mpi-patches/fix-bad-shifts @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:57.142719257 -0800 -+++ mpi-1.8.6/mpi.c 2012-03-04 11:49:59.676143507 -0800 -@@ -764,7 +764,7 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:58.456517144 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:33:01.740459238 -0800 +@@ -762,7 +762,7 @@ if((pow = s_mp_ispow2d(d)) >= 0) { mp_digit mask; @@ -11,7 +11,7 @@ Index: mpi-1.8.6/mpi.c rem = DIGIT(a, 0) & mask; if(q) { -@@ -3081,7 +3081,7 @@ +@@ -3079,7 +3079,7 @@ return; /* Flush all the bits above 2^d in its digit */ @@ -20,7 +20,7 @@ Index: mpi-1.8.6/mpi.c dp[ndig] &= dmask; /* Flush all digits above the one with 2^d in it */ -@@ -3114,7 +3114,7 @@ +@@ -3112,7 +3112,7 @@ dp = DIGITS(mp); used = USED(mp); d %= DIGIT_BIT; @@ -29,7 +29,7 @@ Index: mpi-1.8.6/mpi.c /* If the shift requires another digit, make sure we've got one to work with */ -@@ -3162,7 +3162,7 @@ +@@ -3160,7 +3160,7 @@ s_mp_rshd(mp, d / DIGIT_BIT); d %= DIGIT_BIT; @@ -38,7 +38,7 @@ Index: mpi-1.8.6/mpi.c save = 0; for(ix = USED(mp) - 1; ix >= 0; ix--) { -@@ -3842,7 +3842,7 @@ +@@ -3840,7 +3840,7 @@ if((res = s_mp_pad(a, dig + 1)) != MP_OKAY) return res; diff --git a/mpi-patches/fix-ctype-warnings b/mpi-patches/fix-ctype-warnings index aa84542d..5ec95101 100644 --- a/mpi-patches/fix-ctype-warnings +++ b/mpi-patches/fix-ctype-warnings @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2014-02-19 19:01:29.294491437 -0800 -+++ mpi-1.8.6/mpi.c 2014-02-19 19:01:39.562347737 -0800 -@@ -200,7 +200,7 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:33:14.608233363 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:33:17.280186661 -0800 +@@ -198,7 +198,7 @@ int s_mp_ispow2(mp_int *v); /* is v a power of 2? */ int s_mp_ispow2d(mp_digit d); /* is d a power of 2? */ @@ -11,7 +11,7 @@ Index: mpi-1.8.6/mpi.c char s_mp_todigit(int val, int r, int low); /* convert val to digit */ int s_mp_outlen(int bits, int r); /* output length in bytes */ -@@ -4264,7 +4264,7 @@ +@@ -4262,7 +4262,7 @@ The results will be odd if you use a radix < 2 or > 62, you are expected to know what you're up to. */ @@ -20,7 +20,7 @@ Index: mpi-1.8.6/mpi.c { int val, xch; -@@ -4308,7 +4308,7 @@ +@@ -4306,7 +4306,7 @@ char s_mp_todigit(int val, int r, int low) { diff --git a/mpi-patches/fix-mult-bug b/mpi-patches/fix-mult-bug index a3e375df..5ddb3094 100644 --- a/mpi-patches/fix-mult-bug +++ b/mpi-patches/fix-mult-bug @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2012-03-04 11:49:39.720925007 -0800 -+++ mpi-1.8.6/mpi.c 2012-03-04 11:49:47.661389007 -0800 -@@ -3268,7 +3268,7 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:48.892686392 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:53.524604501 -0800 +@@ -3266,7 +3266,7 @@ unless absolutely necessary. */ max = USED(a); @@ -11,7 +11,7 @@ Index: mpi-1.8.6/mpi.c if(CARRYOUT(w) != 0) { if((res = s_mp_pad(a, max + 1)) != MP_OKAY) return res; -@@ -3276,7 +3276,7 @@ +@@ -3274,7 +3274,7 @@ } for(ix = 0; ix < max; ix++) { @@ -20,7 +20,7 @@ Index: mpi-1.8.6/mpi.c dp[ix] = ACCUM(w); k = CARRYOUT(w); } -@@ -3493,7 +3493,7 @@ +@@ -3491,7 +3491,7 @@ pa = DIGITS(a); for(jx = 0; jx < ua; ++jx, ++pa) { pt = pbt + ix + jx; @@ -29,7 +29,7 @@ Index: mpi-1.8.6/mpi.c *pt = ACCUM(w); k = CARRYOUT(w); } -@@ -3575,7 +3575,7 @@ +@@ -3573,7 +3573,7 @@ if(*pa1 == 0) continue; @@ -38,7 +38,7 @@ Index: mpi-1.8.6/mpi.c pbt[ix + ix] = ACCUM(w); k = CARRYOUT(w); -@@ -3597,7 +3597,7 @@ +@@ -3595,7 +3595,7 @@ pt = pbt + ix + jx; /* Compute the multiplicative step */ @@ -47,7 +47,7 @@ Index: mpi-1.8.6/mpi.c /* If w is more than half MP_WORD_MAX, the doubling will overflow, and we need to record a carry out into the next -@@ -3641,7 +3641,7 @@ +@@ -3639,7 +3639,7 @@ */ kx = 1; while(k) { diff --git a/mpi-patches/mpi-set-double-intptr b/mpi-patches/mpi-set-double-intptr index fb5dc52c..4cd89766 100644 --- a/mpi-patches/mpi-set-double-intptr +++ b/mpi-patches/mpi-set-double-intptr @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-10 19:13:25.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-10 19:16:43.000000000 -0800 -@@ -573,6 +573,36 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:56.016560235 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:58.456517144 -0800 +@@ -571,6 +571,36 @@ return MP_OKAY; } @@ -41,8 +41,8 @@ Index: mpi-1.8.6/mpi.c USED(mp) = 2; Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2011-12-10 19:13:25.000000000 -0800 -+++ mpi-1.8.6/mpi.h 2011-12-10 19:14:04.000000000 -0800 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:56.016560235 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:32:58.456517144 -0800 @@ -100,6 +100,9 @@ mp_err mp_set_int(mp_int *mp, long z); mp_err mp_set_intptr(mp_int *mp, int_ptr_t z); diff --git a/mpi-patches/mpi-set-mpi-word b/mpi-patches/mpi-set-mpi-word index a7ea7a55..b696037e 100644 --- a/mpi-patches/mpi-set-mpi-word +++ b/mpi-patches/mpi-set-mpi-word @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-10 17:41:38.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-10 18:19:29.000000000 -0800 -@@ -573,6 +573,15 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:32:53.524604501 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:56.016560235 -0800 +@@ -571,6 +571,15 @@ return MP_OKAY; } @@ -20,8 +20,8 @@ Index: mpi-1.8.6/mpi.c Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2011-12-10 17:41:38.000000000 -0800 -+++ mpi-1.8.6/mpi.h 2011-12-10 18:19:29.000000000 -0800 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:32:48.892686392 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:32:56.016560235 -0800 @@ -100,6 +100,7 @@ mp_err mp_set_int(mp_int *mp, long z); mp_err mp_set_intptr(mp_int *mp, int_ptr_t z); diff --git a/mpi-patches/mpi-to-double b/mpi-patches/mpi-to-double index dae195b2..3facb923 100644 --- a/mpi-patches/mpi-to-double +++ b/mpi-patches/mpi-to-double @@ -1,7 +1,7 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2014-02-19 19:00:21.279452088 -0800 -+++ mpi-1.8.6/mpi.c 2014-02-19 19:01:29.294491437 -0800 +--- mpi-1.8.6.orig/mpi.c 2015-02-07 19:33:11.780282866 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:33:14.608233363 -0800 @@ -14,6 +14,7 @@ #include <stdlib.h> #include <string.h> @@ -9,8 +9,8 @@ Index: mpi-1.8.6/mpi.c +#include <math.h> typedef unsigned char mem_t; - extern mem_t *chk_malloc(size_t size); -@@ -2335,6 +2336,29 @@ + extern mem_t *chk_calloc(size_t n, size_t size); +@@ -2333,6 +2334,29 @@ /* }}} */ @@ -42,8 +42,8 @@ Index: mpi-1.8.6/mpi.c Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2014-02-19 18:59:53.335849528 -0800 -+++ mpi-1.8.6/mpi.h 2014-02-19 19:01:29.302491325 -0800 +--- mpi-1.8.6.orig/mpi.h 2015-02-07 19:33:08.688337078 -0800 ++++ mpi-1.8.6/mpi.h 2015-02-07 19:33:14.612233293 -0800 @@ -187,6 +187,11 @@ #endif /* end MP_NUMTH */ diff --git a/mpi-patches/use-txr-allocator b/mpi-patches/use-txr-allocator index 2f85a574..dcc51a62 100644 --- a/mpi-patches/use-txr-allocator +++ b/mpi-patches/use-txr-allocator @@ -1,20 +1,18 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-08 22:17:15.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-08 22:27:07.000000000 -0800 -@@ -15,6 +15,11 @@ +--- mpi-1.8.6.orig/mpi.c 2015-02-03 08:18:36.625505588 -0800 ++++ mpi-1.8.6/mpi.c 2015-02-07 19:32:14.481303143 -0800 +@@ -15,6 +15,9 @@ #include <string.h> #include <ctype.h> +typedef unsigned char mem_t; -+extern mem_t *chk_malloc(size_t size); +extern mem_t *chk_calloc(size_t n, size_t size); -+extern mem_t *chk_realloc(mem_t *, size_t size); + #if MP_DEBUG #include <stdio.h> -@@ -154,7 +159,7 @@ +@@ -154,7 +157,7 @@ #define s_mp_copy(sp, dp, count) memcpy(dp, sp, (count) * sizeof(mp_digit)) #endif /* MP_MEMCPY */ @@ -23,7 +21,7 @@ Index: mpi-1.8.6/mpi.c #define s_mp_free(ptr) {if(ptr) free(ptr);} #endif /* MP_MACRO */ -@@ -282,7 +287,7 @@ +@@ -282,7 +285,7 @@ { ARGCHK(mp != NULL && prec > 0, MP_BADARG); @@ -32,7 +30,7 @@ Index: mpi-1.8.6/mpi.c return MP_MEM; SIGN(mp) = MP_ZPOS; -@@ -312,7 +317,7 @@ +@@ -312,7 +315,7 @@ if(mp == from) return MP_OKAY; @@ -41,7 +39,7 @@ Index: mpi-1.8.6/mpi.c return MP_MEM; s_mp_copy(DIGITS(from), DIGITS(mp), USED(from)); -@@ -358,7 +363,7 @@ +@@ -358,7 +361,7 @@ s_mp_copy(DIGITS(from), DIGITS(to), USED(from)); } else { @@ -50,7 +48,7 @@ Index: mpi-1.8.6/mpi.c return MP_MEM; s_mp_copy(DIGITS(from), tmp, USED(from)); -@@ -2670,7 +2675,7 @@ +@@ -2670,7 +2673,7 @@ /* Set min to next nearest default precision block size */ min = ((min + (s_mp_defprec - 1)) / s_mp_defprec) * s_mp_defprec; @@ -59,7 +57,7 @@ Index: mpi-1.8.6/mpi.c return MP_MEM; s_mp_copy(DIGITS(mp), tmp, USED(mp)); -@@ -2757,7 +2762,7 @@ +@@ -2757,7 +2760,7 @@ /* Allocate ni records of nb bytes each, and return a pointer to that */ void *s_mp_alloc(size_t nb, size_t ni) { |