1 |
vapier 14/11/01 07:24:34 |
2 |
|
3 |
Added: patch09 patch08 patch10 patch07 patch06 |
4 |
Log: |
5 |
Version bump. Add multilib support #510248 by Thibaud CANALE. |
6 |
|
7 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-libs/mpfr/files/3.1.2/patch09 |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch09?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch09?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: patch09 |
16 |
=================================================================== |
17 |
diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES |
18 |
--- mpfr-3.1.2-a/PATCHES 2014-06-30 15:15:25.533266905 +0000 |
19 |
+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:15:25.617269178 +0000 |
20 |
@@ -0,0 +1 @@ |
21 |
+div-overflow |
22 |
diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION |
23 |
--- mpfr-3.1.2-a/VERSION 2014-06-30 15:15:25.529266797 +0000 |
24 |
+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:15:25.617269178 +0000 |
25 |
@@ -1 +1 @@ |
26 |
-3.1.2-p8 |
27 |
+3.1.2-p9 |
28 |
diff -Naurd mpfr-3.1.2-a/src/div.c mpfr-3.1.2-b/src/div.c |
29 |
--- mpfr-3.1.2-a/src/div.c 2013-03-13 15:37:33.000000000 +0000 |
30 |
+++ mpfr-3.1.2-b/src/div.c 2014-06-30 15:15:25.585268312 +0000 |
31 |
@@ -750,7 +750,9 @@ |
32 |
truncate_check_qh: |
33 |
if (qh) |
34 |
{ |
35 |
- qexp ++; |
36 |
+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) |
37 |
+ qexp ++; |
38 |
+ /* else qexp is now incorrect, but one will still get an overflow */ |
39 |
q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; |
40 |
} |
41 |
goto truncate; |
42 |
@@ -765,7 +767,9 @@ |
43 |
inex = 1; /* always here */ |
44 |
if (mpn_add_1 (q0p, q0p, q0size, MPFR_LIMB_ONE << sh)) |
45 |
{ |
46 |
- qexp ++; |
47 |
+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) |
48 |
+ qexp ++; |
49 |
+ /* else qexp is now incorrect, but one will still get an overflow */ |
50 |
q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; |
51 |
} |
52 |
|
53 |
diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h |
54 |
--- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:15:25.533266905 +0000 |
55 |
+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:15:25.613269070 +0000 |
56 |
@@ -27,7 +27,7 @@ |
57 |
#define MPFR_VERSION_MAJOR 3 |
58 |
#define MPFR_VERSION_MINOR 1 |
59 |
#define MPFR_VERSION_PATCHLEVEL 2 |
60 |
-#define MPFR_VERSION_STRING "3.1.2-p8" |
61 |
+#define MPFR_VERSION_STRING "3.1.2-p9" |
62 |
|
63 |
/* Macros dealing with MPFR VERSION */ |
64 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
65 |
diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c |
66 |
--- mpfr-3.1.2-a/src/version.c 2014-06-30 15:15:25.533266905 +0000 |
67 |
+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:15:25.613269070 +0000 |
68 |
@@ -25,5 +25,5 @@ |
69 |
const char * |
70 |
mpfr_get_version (void) |
71 |
{ |
72 |
- return "3.1.2-p8"; |
73 |
+ return "3.1.2-p9"; |
74 |
} |
75 |
diff -Naurd mpfr-3.1.2-a/tests/tdiv.c mpfr-3.1.2-b/tests/tdiv.c |
76 |
--- mpfr-3.1.2-a/tests/tdiv.c 2013-03-13 15:37:44.000000000 +0000 |
77 |
+++ mpfr-3.1.2-b/tests/tdiv.c 2014-06-30 15:15:25.585268312 +0000 |
78 |
@@ -1104,6 +1104,96 @@ |
79 |
#define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) |
80 |
#include "tgeneric.c" |
81 |
|
82 |
+static void |
83 |
+test_extreme (void) |
84 |
+{ |
85 |
+ mpfr_t x, y, z; |
86 |
+ mpfr_exp_t emin, emax; |
87 |
+ mpfr_prec_t p[4] = { 8, 32, 64, 256 }; |
88 |
+ int xi, yi, zi, j, r; |
89 |
+ unsigned int flags, ex_flags; |
90 |
+ |
91 |
+ emin = mpfr_get_emin (); |
92 |
+ emax = mpfr_get_emax (); |
93 |
+ |
94 |
+ mpfr_set_emin (MPFR_EMIN_MIN); |
95 |
+ mpfr_set_emax (MPFR_EMAX_MAX); |
96 |
+ |
97 |
+ for (xi = 0; xi < 4; xi++) |
98 |
+ { |
99 |
+ mpfr_init2 (x, p[xi]); |
100 |
+ mpfr_setmax (x, MPFR_EMAX_MAX); |
101 |
+ MPFR_ASSERTN (mpfr_check (x)); |
102 |
+ for (yi = 0; yi < 4; yi++) |
103 |
+ { |
104 |
+ mpfr_init2 (y, p[yi]); |
105 |
+ mpfr_setmin (y, MPFR_EMIN_MIN); |
106 |
+ for (j = 0; j < 2; j++) |
107 |
+ { |
108 |
+ MPFR_ASSERTN (mpfr_check (y)); |
109 |
+ for (zi = 0; zi < 4; zi++) |
110 |
+ { |
111 |
+ mpfr_init2 (z, p[zi]); |
112 |
+ RND_LOOP (r) |
113 |
+ { |
114 |
+ mpfr_clear_flags (); |
115 |
+ mpfr_div (z, x, y, (mpfr_rnd_t) r); |
116 |
+ flags = __gmpfr_flags; |
117 |
+ MPFR_ASSERTN (mpfr_check (z)); |
118 |
+ ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; |
119 |
+ if (flags != ex_flags) |
120 |
+ { |
121 |
+ printf ("Bad flags in test_extreme on z = a/b" |
122 |
+ " with %s and\n", |
123 |
+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); |
124 |
+ printf ("a = "); |
125 |
+ mpfr_dump (x); |
126 |
+ printf ("b = "); |
127 |
+ mpfr_dump (y); |
128 |
+ printf ("Expected flags:"); |
129 |
+ flags_out (ex_flags); |
130 |
+ printf ("Got flags: "); |
131 |
+ flags_out (flags); |
132 |
+ printf ("z = "); |
133 |
+ mpfr_dump (z); |
134 |
+ exit (1); |
135 |
+ } |
136 |
+ mpfr_clear_flags (); |
137 |
+ mpfr_div (z, y, x, (mpfr_rnd_t) r); |
138 |
+ flags = __gmpfr_flags; |
139 |
+ MPFR_ASSERTN (mpfr_check (z)); |
140 |
+ ex_flags = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; |
141 |
+ if (flags != ex_flags) |
142 |
+ { |
143 |
+ printf ("Bad flags in test_extreme on z = a/b" |
144 |
+ " with %s and\n", |
145 |
+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); |
146 |
+ printf ("a = "); |
147 |
+ mpfr_dump (y); |
148 |
+ printf ("b = "); |
149 |
+ mpfr_dump (x); |
150 |
+ printf ("Expected flags:"); |
151 |
+ flags_out (ex_flags); |
152 |
+ printf ("Got flags: "); |
153 |
+ flags_out (flags); |
154 |
+ printf ("z = "); |
155 |
+ mpfr_dump (z); |
156 |
+ exit (1); |
157 |
+ } |
158 |
+ } |
159 |
+ mpfr_clear (z); |
160 |
+ } /* zi */ |
161 |
+ mpfr_nextabove (y); |
162 |
+ } /* j */ |
163 |
+ mpfr_clear (y); |
164 |
+ } /* yi */ |
165 |
+ mpfr_clear (x); |
166 |
+ } /* xi */ |
167 |
+ |
168 |
+ set_emin (emin); |
169 |
+ set_emax (emax); |
170 |
+} |
171 |
+ |
172 |
int |
173 |
main (int argc, char *argv[]) |
174 |
{ |
175 |
@@ -1130,6 +1220,7 @@ |
176 |
test_20070603 (); |
177 |
test_20070628 (); |
178 |
test_generic (2, 800, 50); |
179 |
+ test_extreme (); |
180 |
|
181 |
tests_end_mpfr (); |
182 |
return 0; |
183 |
|
184 |
|
185 |
|
186 |
1.1 dev-libs/mpfr/files/3.1.2/patch08 |
187 |
|
188 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch08?rev=1.1&view=markup |
189 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch08?rev=1.1&content-type=text/plain |
190 |
|
191 |
Index: patch08 |
192 |
=================================================================== |
193 |
diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES |
194 |
--- mpfr-3.1.2-a/PATCHES 2014-04-15 22:20:32.243481506 +0000 |
195 |
+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:22:32.418722707 +0000 |
196 |
@@ -0,0 +1 @@ |
197 |
+gmp6-compat |
198 |
diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION |
199 |
--- mpfr-3.1.2-a/VERSION 2014-04-15 22:20:20.755171478 +0000 |
200 |
+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:21:45.225450147 +0000 |
201 |
@@ -1 +1 @@ |
202 |
-3.1.2-p7 |
203 |
+3.1.2-p8 |
204 |
diff -Naurd mpfr-3.1.2-a/configure mpfr-3.1.2-b/configure |
205 |
--- mpfr-3.1.2-a/configure 2013-03-13 15:38:20.000000000 +0000 |
206 |
+++ mpfr-3.1.2-b/configure 2014-04-15 22:21:38.821277476 +0000 |
207 |
@@ -14545,26 +14545,30 @@ |
208 |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
209 |
fi |
210 |
|
211 |
-if test "$use_gmp_build" = yes ; then |
212 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid GMP_NUMB_BITS" >&5 |
213 |
-$as_echo_n "checking for valid GMP_NUMB_BITS... " >&6; } |
214 |
- if test "$cross_compiling" = yes; then : |
215 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency" >&5 |
216 |
+$as_echo_n "checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... " >&6; } |
217 |
+if test "$cross_compiling" = yes; then : |
218 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't test" >&5 |
219 |
$as_echo "can't test" >&6; } |
220 |
else |
221 |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
222 |
/* end confdefs.h. */ |
223 |
|
224 |
+#include <stdio.h> |
225 |
#include <limits.h> |
226 |
#include "gmp.h" |
227 |
-#include "gmp-impl.h" |
228 |
|
229 |
int |
230 |
main () |
231 |
{ |
232 |
|
233 |
- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT |
234 |
- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; |
235 |
+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT) |
236 |
+ return 0; |
237 |
+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS); |
238 |
+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t)); |
239 |
+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n", |
240 |
+ (long) (sizeof(mp_limb_t) * CHAR_BIT)); |
241 |
+ return 1; |
242 |
|
243 |
; |
244 |
return 0; |
245 |
@@ -14577,14 +14581,14 @@ |
246 |
|
247 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
248 |
$as_echo "no" >&6; } |
249 |
- as_fn_error $? "GMP_NUMB_BITS is incorrect. |
250 |
-You probably need to change some of the GMP or MPFR compile options." "$LINENO" 5 |
251 |
+ as_fn_error $? "GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. |
252 |
+You probably need to change some of the GMP or MPFR compile options. |
253 |
+See 'config.log' for details (search for GMP_NUMB_BITS)." "$LINENO" 5 |
254 |
fi |
255 |
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
256 |
conftest.$ac_objext conftest.beam conftest.$ac_ext |
257 |
fi |
258 |
|
259 |
-fi |
260 |
|
261 |
|
262 |
if test "$dont_link_with_gmp" = yes ; then |
263 |
diff -Naurd mpfr-3.1.2-a/configure.ac mpfr-3.1.2-b/configure.ac |
264 |
--- mpfr-3.1.2-a/configure.ac 2013-03-13 15:37:46.000000000 +0000 |
265 |
+++ mpfr-3.1.2-b/configure.ac 2013-03-13 15:37:46.000000000 +0000 |
266 |
@@ -435,23 +435,29 @@ |
267 |
]) |
268 |
fi |
269 |
|
270 |
-dnl Check for valid GMP_NUMB_BITS and BYTES_PER_MP_LIMB |
271 |
+dnl Check for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency. |
272 |
+dnl Problems may occur if gmp.h was generated with some ABI |
273 |
+dnl and is used with another ABI (or if nails are used). |
274 |
dnl This test doesn't need to link with libgmp (at least it shouldn't). |
275 |
-if test "$use_gmp_build" = yes ; then |
276 |
- AC_MSG_CHECKING(for valid GMP_NUMB_BITS) |
277 |
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
278 |
+AC_MSG_CHECKING(for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency) |
279 |
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ |
280 |
+#include <stdio.h> |
281 |
#include <limits.h> |
282 |
#include "gmp.h" |
283 |
-#include "gmp-impl.h" |
284 |
]], [[ |
285 |
- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT |
286 |
- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; |
287 |
+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT) |
288 |
+ return 0; |
289 |
+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS); |
290 |
+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t)); |
291 |
+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n", |
292 |
+ (long) (sizeof(mp_limb_t) * CHAR_BIT)); |
293 |
+ return 1; |
294 |
]])], [AC_MSG_RESULT(yes)], [ |
295 |
AC_MSG_RESULT(no) |
296 |
- AC_MSG_ERROR([GMP_NUMB_BITS is incorrect. |
297 |
-You probably need to change some of the GMP or MPFR compile options.])], |
298 |
+ AC_MSG_ERROR([GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. |
299 |
+You probably need to change some of the GMP or MPFR compile options. |
300 |
+See 'config.log' for details (search for GMP_NUMB_BITS).])], |
301 |
[AC_MSG_RESULT([can't test])]) |
302 |
-fi |
303 |
|
304 |
|
305 |
dnl We really need to link using libtool. But it is impossible with the current |
306 |
diff -Naurd mpfr-3.1.2-a/src/init2.c mpfr-3.1.2-b/src/init2.c |
307 |
--- mpfr-3.1.2-a/src/init2.c 2013-03-13 15:37:32.000000000 +0000 |
308 |
+++ mpfr-3.1.2-b/src/init2.c 2014-04-15 22:21:06.220398489 +0000 |
309 |
@@ -30,11 +30,11 @@ |
310 |
|
311 |
/* Check if we can represent the number of limbs |
312 |
* associated to the maximum of mpfr_prec_t*/ |
313 |
- MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/BYTES_PER_MP_LIMB) ); |
314 |
+ MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/MPFR_BYTES_PER_MP_LIMB) ); |
315 |
|
316 |
- /* Check for correct GMP_NUMB_BITS and BYTES_PER_MP_LIMB */ |
317 |
- MPFR_ASSERTN( GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT |
318 |
- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ); |
319 |
+ /* Check for correct GMP_NUMB_BITS and MPFR_BYTES_PER_MP_LIMB */ |
320 |
+ MPFR_ASSERTN( GMP_NUMB_BITS == MPFR_BYTES_PER_MP_LIMB * CHAR_BIT |
321 |
+ && sizeof(mp_limb_t) == MPFR_BYTES_PER_MP_LIMB ); |
322 |
|
323 |
MPFR_ASSERTN (mp_bits_per_limb == GMP_NUMB_BITS); |
324 |
|
325 |
diff -Naurd mpfr-3.1.2-a/src/mpfr-gmp.h mpfr-3.1.2-b/src/mpfr-gmp.h |
326 |
--- mpfr-3.1.2-a/src/mpfr-gmp.h 2013-03-13 15:37:32.000000000 +0000 |
327 |
+++ mpfr-3.1.2-b/src/mpfr-gmp.h 2014-04-15 22:21:06.220398489 +0000 |
328 |
@@ -72,7 +72,6 @@ |
329 |
#endif |
330 |
|
331 |
/* Define some macros */ |
332 |
-#define BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT) |
333 |
|
334 |
#define MP_LIMB_T_MAX (~(mp_limb_t)0) |
335 |
|
336 |
@@ -96,19 +95,19 @@ |
337 |
#define SHRT_HIGHBIT SHRT_MIN |
338 |
|
339 |
/* MP_LIMB macros */ |
340 |
-#define MPN_ZERO(dst, n) memset((dst), 0, (n)*BYTES_PER_MP_LIMB) |
341 |
-#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB) |
342 |
-#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB) |
343 |
+#define MPN_ZERO(dst, n) memset((dst), 0, (n)*MPFR_BYTES_PER_MP_LIMB) |
344 |
+#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB) |
345 |
+#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB) |
346 |
#define MPN_COPY(dst,src,n) \ |
347 |
do \ |
348 |
{ \ |
349 |
if ((dst) != (src)) \ |
350 |
{ \ |
351 |
MPFR_ASSERTD ((char *) (dst) >= (char *) (src) + \ |
352 |
- (n) * BYTES_PER_MP_LIMB || \ |
353 |
+ (n) * MPFR_BYTES_PER_MP_LIMB || \ |
354 |
(char *) (src) >= (char *) (dst) + \ |
355 |
- (n) * BYTES_PER_MP_LIMB); \ |
356 |
- memcpy ((dst), (src), (n) * BYTES_PER_MP_LIMB); \ |
357 |
+ (n) * MPFR_BYTES_PER_MP_LIMB); \ |
358 |
+ memcpy ((dst), (src), (n) * MPFR_BYTES_PER_MP_LIMB); \ |
359 |
} \ |
360 |
} \ |
361 |
while (0) |
362 |
diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h |
363 |
--- mpfr-3.1.2-a/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000 |
364 |
+++ mpfr-3.1.2-b/src/mpfr-impl.h 2014-04-15 22:21:06.220398489 +0000 |
365 |
@@ -191,7 +191,7 @@ |
366 |
# endif |
367 |
#endif |
368 |
|
369 |
- |
370 |
+#define MPFR_BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT) |
371 |
|
372 |
/****************************************************** |
373 |
******************** Check GMP *********************** |
374 |
@@ -930,7 +930,7 @@ |
375 |
#define MPFR_SET_ALLOC_SIZE(x, n) \ |
376 |
( ((mp_size_t*) MPFR_MANT(x))[-1] = n) |
377 |
#define MPFR_MALLOC_SIZE(s) \ |
378 |
- ( sizeof(mpfr_size_limb_t) + BYTES_PER_MP_LIMB * ((size_t) s) ) |
379 |
+ ( sizeof(mpfr_size_limb_t) + MPFR_BYTES_PER_MP_LIMB * ((size_t) s) ) |
380 |
#define MPFR_SET_MANT_PTR(x,p) \ |
381 |
(MPFR_MANT(x) = (mp_limb_t*) ((mpfr_size_limb_t*) p + 1)) |
382 |
#define MPFR_GET_REAL_PTR(x) \ |
383 |
@@ -964,7 +964,7 @@ |
384 |
#endif |
385 |
|
386 |
#define MPFR_TMP_LIMBS_ALLOC(N) \ |
387 |
- ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * BYTES_PER_MP_LIMB)) |
388 |
+ ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * MPFR_BYTES_PER_MP_LIMB)) |
389 |
|
390 |
/* temporary allocate 1 limb at xp, and initialize mpfr variable x */ |
391 |
/* The temporary var doesn't have any size field, but it doesn't matter |
392 |
diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h |
393 |
--- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:20:20.755171478 +0000 |
394 |
+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:21:45.225450147 +0000 |
395 |
@@ -27,7 +27,7 @@ |
396 |
#define MPFR_VERSION_MAJOR 3 |
397 |
#define MPFR_VERSION_MINOR 1 |
398 |
#define MPFR_VERSION_PATCHLEVEL 2 |
399 |
-#define MPFR_VERSION_STRING "3.1.2-p7" |
400 |
+#define MPFR_VERSION_STRING "3.1.2-p8" |
401 |
|
402 |
/* Macros dealing with MPFR VERSION */ |
403 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
404 |
diff -Naurd mpfr-3.1.2-a/src/mul.c mpfr-3.1.2-b/src/mul.c |
405 |
--- mpfr-3.1.2-a/src/mul.c 2013-03-13 15:37:37.000000000 +0000 |
406 |
+++ mpfr-3.1.2-b/src/mul.c 2014-04-15 22:21:06.224398597 +0000 |
407 |
@@ -106,7 +106,7 @@ |
408 |
MPFR_ASSERTD(tn <= k); |
409 |
|
410 |
/* Check for no size_t overflow*/ |
411 |
- MPFR_ASSERTD((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB); |
412 |
+ MPFR_ASSERTD((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB); |
413 |
MPFR_TMP_MARK(marker); |
414 |
tmp = MPFR_TMP_LIMBS_ALLOC (k); |
415 |
|
416 |
@@ -301,7 +301,7 @@ |
417 |
MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */ |
418 |
|
419 |
/* Check for no size_t overflow*/ |
420 |
- MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB); |
421 |
+ MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB); |
422 |
MPFR_TMP_MARK (marker); |
423 |
tmp = MPFR_TMP_LIMBS_ALLOC (k); |
424 |
|
425 |
diff -Naurd mpfr-3.1.2-a/src/stack_interface.c mpfr-3.1.2-b/src/stack_interface.c |
426 |
--- mpfr-3.1.2-a/src/stack_interface.c 2013-03-13 15:37:32.000000000 +0000 |
427 |
+++ mpfr-3.1.2-b/src/stack_interface.c 2014-04-15 22:21:06.220398489 +0000 |
428 |
@@ -26,7 +26,7 @@ |
429 |
size_t |
430 |
mpfr_custom_get_size (mpfr_prec_t prec) |
431 |
{ |
432 |
- return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB; |
433 |
+ return MPFR_PREC2LIMBS (prec) * MPFR_BYTES_PER_MP_LIMB; |
434 |
} |
435 |
|
436 |
#undef mpfr_custom_init |
437 |
diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c |
438 |
--- mpfr-3.1.2-a/src/version.c 2014-04-15 22:20:20.755171478 +0000 |
439 |
+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:21:45.225450147 +0000 |
440 |
@@ -25,5 +25,5 @@ |
441 |
const char * |
442 |
mpfr_get_version (void) |
443 |
{ |
444 |
- return "3.1.2-p7"; |
445 |
+ return "3.1.2-p8"; |
446 |
} |
447 |
|
448 |
|
449 |
|
450 |
1.1 dev-libs/mpfr/files/3.1.2/patch10 |
451 |
|
452 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch10?rev=1.1&view=markup |
453 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch10?rev=1.1&content-type=text/plain |
454 |
|
455 |
Index: patch10 |
456 |
=================================================================== |
457 |
diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES |
458 |
--- mpfr-3.1.2-a/PATCHES 2014-06-30 15:17:53.337268149 +0000 |
459 |
+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:17:53.417270314 +0000 |
460 |
@@ -0,0 +1 @@ |
461 |
+vasprintf |
462 |
diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION |
463 |
--- mpfr-3.1.2-a/VERSION 2014-06-30 15:17:53.337268149 +0000 |
464 |
+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:17:53.413270206 +0000 |
465 |
@@ -1 +1 @@ |
466 |
-3.1.2-p9 |
467 |
+3.1.2-p10 |
468 |
diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h |
469 |
--- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:17:53.337268149 +0000 |
470 |
+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:17:53.413270206 +0000 |
471 |
@@ -27,7 +27,7 @@ |
472 |
#define MPFR_VERSION_MAJOR 3 |
473 |
#define MPFR_VERSION_MINOR 1 |
474 |
#define MPFR_VERSION_PATCHLEVEL 2 |
475 |
-#define MPFR_VERSION_STRING "3.1.2-p9" |
476 |
+#define MPFR_VERSION_STRING "3.1.2-p10" |
477 |
|
478 |
/* Macros dealing with MPFR VERSION */ |
479 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
480 |
diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c |
481 |
--- mpfr-3.1.2-a/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 |
482 |
+++ mpfr-3.1.2-b/src/vasprintf.c 2014-06-30 15:17:53.377269231 +0000 |
483 |
@@ -884,14 +884,18 @@ |
484 |
first digit, we want the exponent for radix two and the decimal |
485 |
point AFTER the first digit. */ |
486 |
{ |
487 |
- MPFR_ASSERTN (exp > MPFR_EMIN_MIN /4); /* possible overflow */ |
488 |
+ /* An integer overflow is normally not possible since MPFR_EXP_MIN |
489 |
+ is twice as large as MPFR_EMIN_MIN. */ |
490 |
+ MPFR_ASSERTN (exp > (MPFR_EXP_MIN + 3) / 4); |
491 |
exp = (exp - 1) * 4; |
492 |
} |
493 |
else |
494 |
/* EXP is the exponent for decimal point BEFORE the first digit, we |
495 |
want the exponent for decimal point AFTER the first digit. */ |
496 |
{ |
497 |
- MPFR_ASSERTN (exp > MPFR_EMIN_MIN); /* possible overflow */ |
498 |
+ /* An integer overflow is normally not possible since MPFR_EXP_MIN |
499 |
+ is twice as large as MPFR_EMIN_MIN. */ |
500 |
+ MPFR_ASSERTN (exp > MPFR_EXP_MIN); |
501 |
--exp; |
502 |
} |
503 |
} |
504 |
diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c |
505 |
--- mpfr-3.1.2-a/src/version.c 2014-06-30 15:17:53.337268149 +0000 |
506 |
+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:17:53.413270206 +0000 |
507 |
@@ -25,5 +25,5 @@ |
508 |
const char * |
509 |
mpfr_get_version (void) |
510 |
{ |
511 |
- return "3.1.2-p9"; |
512 |
+ return "3.1.2-p10"; |
513 |
} |
514 |
diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c |
515 |
--- mpfr-3.1.2-a/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 |
516 |
+++ mpfr-3.1.2-b/tests/tsprintf.c 2014-06-30 15:17:53.377269231 +0000 |
517 |
@@ -1184,6 +1184,69 @@ |
518 |
check_emax_aux (MPFR_EMAX_MAX); |
519 |
} |
520 |
|
521 |
+static void |
522 |
+check_emin_aux (mpfr_exp_t e) |
523 |
+{ |
524 |
+ mpfr_t x; |
525 |
+ char *s1, s2[256]; |
526 |
+ int i; |
527 |
+ mpfr_exp_t emin; |
528 |
+ mpz_t ee; |
529 |
+ |
530 |
+ MPFR_ASSERTN (e >= LONG_MIN); |
531 |
+ emin = mpfr_get_emin (); |
532 |
+ set_emin (e); |
533 |
+ |
534 |
+ mpfr_init2 (x, 16); |
535 |
+ mpz_init (ee); |
536 |
+ |
537 |
+ mpfr_setmin (x, e); |
538 |
+ mpz_set_si (ee, e); |
539 |
+ mpz_sub_ui (ee, ee, 1); |
540 |
+ |
541 |
+ i = mpfr_asprintf (&s1, "%Ra", x); |
542 |
+ MPFR_ASSERTN (i > 0); |
543 |
+ |
544 |
+ gmp_snprintf (s2, 256, "0x1p%Zd", ee); |
545 |
+ |
546 |
+ if (strcmp (s1, s2) != 0) |
547 |
+ { |
548 |
+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e); |
549 |
+ printf ("Expected %s\n", s2); |
550 |
+ printf ("Got %s\n", s1); |
551 |
+ exit (1); |
552 |
+ } |
553 |
+ |
554 |
+ mpfr_free_str (s1); |
555 |
+ |
556 |
+ i = mpfr_asprintf (&s1, "%Rb", x); |
557 |
+ MPFR_ASSERTN (i > 0); |
558 |
+ |
559 |
+ gmp_snprintf (s2, 256, "1p%Zd", ee); |
560 |
+ |
561 |
+ if (strcmp (s1, s2) != 0) |
562 |
+ { |
563 |
+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e); |
564 |
+ printf ("Expected %s\n", s2); |
565 |
+ printf ("Got %s\n", s1); |
566 |
+ exit (1); |
567 |
+ } |
568 |
+ |
569 |
+ mpfr_free_str (s1); |
570 |
+ |
571 |
+ mpfr_clear (x); |
572 |
+ mpz_clear (ee); |
573 |
+ set_emin (emin); |
574 |
+} |
575 |
+ |
576 |
+static void |
577 |
+check_emin (void) |
578 |
+{ |
579 |
+ check_emin_aux (-15); |
580 |
+ check_emin_aux (mpfr_get_emin ()); |
581 |
+ check_emin_aux (MPFR_EMIN_MIN); |
582 |
+} |
583 |
+ |
584 |
int |
585 |
main (int argc, char **argv) |
586 |
{ |
587 |
@@ -1203,6 +1266,7 @@ |
588 |
decimal (); |
589 |
mixed (); |
590 |
check_emax (); |
591 |
+ check_emin (); |
592 |
|
593 |
#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) |
594 |
locale_da_DK (); |
595 |
|
596 |
|
597 |
|
598 |
1.1 dev-libs/mpfr/files/3.1.2/patch07 |
599 |
|
600 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch07?rev=1.1&view=markup |
601 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch07?rev=1.1&content-type=text/plain |
602 |
|
603 |
Index: patch07 |
604 |
=================================================================== |
605 |
diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES |
606 |
--- mpfr-3.1.2-a/PATCHES 2014-04-15 22:04:57.090286262 +0000 |
607 |
+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:04:57.162288198 +0000 |
608 |
@@ -0,0 +1 @@ |
609 |
+exp3 |
610 |
diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION |
611 |
--- mpfr-3.1.2-a/VERSION 2014-04-15 22:04:57.086286154 +0000 |
612 |
+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:04:57.162288198 +0000 |
613 |
@@ -1 +1 @@ |
614 |
-3.1.2-p6 |
615 |
+3.1.2-p7 |
616 |
diff -Naurd mpfr-3.1.2-a/src/exp3.c mpfr-3.1.2-b/src/exp3.c |
617 |
--- mpfr-3.1.2-a/src/exp3.c 2013-03-13 15:37:34.000000000 +0000 |
618 |
+++ mpfr-3.1.2-b/src/exp3.c 2014-04-15 22:04:57.126287230 +0000 |
619 |
@@ -283,7 +283,7 @@ |
620 |
} |
621 |
} |
622 |
|
623 |
- if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDD, MPFR_RNDZ, |
624 |
+ if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDN, MPFR_RNDZ, |
625 |
MPFR_PREC(y) + (rnd_mode == MPFR_RNDN))) |
626 |
{ |
627 |
inexact = mpfr_set (y, shift_x > 0 ? t : tmp, rnd_mode); |
628 |
diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h |
629 |
--- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:04:57.086286154 +0000 |
630 |
+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:04:57.162288198 +0000 |
631 |
@@ -27,7 +27,7 @@ |
632 |
#define MPFR_VERSION_MAJOR 3 |
633 |
#define MPFR_VERSION_MINOR 1 |
634 |
#define MPFR_VERSION_PATCHLEVEL 2 |
635 |
-#define MPFR_VERSION_STRING "3.1.2-p6" |
636 |
+#define MPFR_VERSION_STRING "3.1.2-p7" |
637 |
|
638 |
/* Macros dealing with MPFR VERSION */ |
639 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
640 |
diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c |
641 |
--- mpfr-3.1.2-a/src/version.c 2014-04-15 22:04:57.090286262 +0000 |
642 |
+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:04:57.162288198 +0000 |
643 |
@@ -25,5 +25,5 @@ |
644 |
const char * |
645 |
mpfr_get_version (void) |
646 |
{ |
647 |
- return "3.1.2-p6"; |
648 |
+ return "3.1.2-p7"; |
649 |
} |
650 |
diff -Naurd mpfr-3.1.2-a/tests/texp.c mpfr-3.1.2-b/tests/texp.c |
651 |
--- mpfr-3.1.2-a/tests/texp.c 2013-03-13 15:37:44.000000000 +0000 |
652 |
+++ mpfr-3.1.2-b/tests/texp.c 2014-04-15 22:04:57.126287230 +0000 |
653 |
@@ -150,6 +150,22 @@ |
654 |
exit (1); |
655 |
} |
656 |
|
657 |
+ mpfr_set_prec (x, 118); |
658 |
+ mpfr_set_str_binary (x, "0.1110010100011101010000111110011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E-86"); |
659 |
+ mpfr_set_prec (y, 118); |
660 |
+ mpfr_exp_2 (y, x, MPFR_RNDU); |
661 |
+ mpfr_exp_3 (x, x, MPFR_RNDU); |
662 |
+ if (mpfr_cmp (x, y)) |
663 |
+ { |
664 |
+ printf ("mpfr_exp_2 and mpfr_exp_3 differ for prec=118\n"); |
665 |
+ printf ("mpfr_exp_2 gives "); |
666 |
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN); |
667 |
+ printf ("\nmpfr_exp_3 gives "); |
668 |
+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN); |
669 |
+ printf ("\n"); |
670 |
+ exit (1); |
671 |
+ } |
672 |
+ |
673 |
mpfr_clear (x); |
674 |
mpfr_clear (y); |
675 |
return 0; |
676 |
|
677 |
|
678 |
|
679 |
1.1 dev-libs/mpfr/files/3.1.2/patch06 |
680 |
|
681 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch06?rev=1.1&view=markup |
682 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.1.2/patch06?rev=1.1&content-type=text/plain |
683 |
|
684 |
Index: patch06 |
685 |
=================================================================== |
686 |
diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES |
687 |
--- mpfr-3.1.2-a/PATCHES 2014-04-15 21:56:49.609057464 +0000 |
688 |
+++ mpfr-3.1.2-b/PATCHES 2014-04-15 21:56:49.697059857 +0000 |
689 |
@@ -0,0 +1 @@ |
690 |
+li2-return |
691 |
diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION |
692 |
--- mpfr-3.1.2-a/VERSION 2014-04-15 21:56:49.609057464 +0000 |
693 |
+++ mpfr-3.1.2-b/VERSION 2014-04-15 21:56:49.697059857 +0000 |
694 |
@@ -1 +1 @@ |
695 |
-3.1.2-p5 |
696 |
+3.1.2-p6 |
697 |
diff -Naurd mpfr-3.1.2-a/src/li2.c mpfr-3.1.2-b/src/li2.c |
698 |
--- mpfr-3.1.2-a/src/li2.c 2013-03-13 15:37:32.000000000 +0000 |
699 |
+++ mpfr-3.1.2-b/src/li2.c 2014-04-15 21:56:49.653058661 +0000 |
700 |
@@ -630,5 +630,5 @@ |
701 |
return mpfr_check_range (y, inexact, rnd_mode); |
702 |
} |
703 |
|
704 |
- MPFR_ASSERTN (0); /* should never reach this point */ |
705 |
+ MPFR_RET_NEVER_GO_HERE (); |
706 |
} |
707 |
diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h |
708 |
--- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 21:56:49.609057464 +0000 |
709 |
+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 21:56:49.697059857 +0000 |
710 |
@@ -27,7 +27,7 @@ |
711 |
#define MPFR_VERSION_MAJOR 3 |
712 |
#define MPFR_VERSION_MINOR 1 |
713 |
#define MPFR_VERSION_PATCHLEVEL 2 |
714 |
-#define MPFR_VERSION_STRING "3.1.2-p5" |
715 |
+#define MPFR_VERSION_STRING "3.1.2-p6" |
716 |
|
717 |
/* Macros dealing with MPFR VERSION */ |
718 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
719 |
diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c |
720 |
--- mpfr-3.1.2-a/src/version.c 2014-04-15 21:56:49.609057464 +0000 |
721 |
+++ mpfr-3.1.2-b/src/version.c 2014-04-15 21:56:49.697059857 +0000 |
722 |
@@ -25,5 +25,5 @@ |
723 |
const char * |
724 |
mpfr_get_version (void) |
725 |
{ |
726 |
- return "3.1.2-p5"; |
727 |
+ return "3.1.2-p6"; |
728 |
} |