1 |
vapier 10/08/30 17:32:53 |
2 |
|
3 |
Added: patch02 patch03 patch01 |
4 |
Log: |
5 |
Version bump. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-libs/mpfr/files/3.0.0/patch02 |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.0.0/patch02?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.0.0/patch02?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: patch02 |
15 |
=================================================================== |
16 |
diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in |
17 |
--- mpfr-3.0.0-a/Makefile.in 2010-06-10 11:00:52.000000000 +0000 |
18 |
+++ mpfr-3.0.0-b/Makefile.in 2010-06-10 11:00:52.000000000 +0000 |
19 |
@@ -239,6 +239,7 @@ |
20 |
distuninstallcheck_listfiles = find . -type f -print |
21 |
distcleancheck_listfiles = find . -type f -print |
22 |
ACLOCAL = @ACLOCAL@ |
23 |
+ALLOCA = @ALLOCA@ |
24 |
AMTAR = @AMTAR@ |
25 |
AR = @AR@ |
26 |
AS = @AS@ |
27 |
diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES |
28 |
--- mpfr-3.0.0-a/PATCHES 2010-06-23 11:03:36.000000000 +0000 |
29 |
+++ mpfr-3.0.0-b/PATCHES 2010-06-25 13:23:13.000000000 +0000 |
30 |
@@ -0,0 +1 @@ |
31 |
+alloca |
32 |
diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION |
33 |
--- mpfr-3.0.0-a/VERSION 2010-06-23 11:03:20.000000000 +0000 |
34 |
+++ mpfr-3.0.0-b/VERSION 2010-06-25 13:23:13.000000000 +0000 |
35 |
@@ -1 +1 @@ |
36 |
-3.0.0-p1 |
37 |
+3.0.0-p2 |
38 |
diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4 |
39 |
--- mpfr-3.0.0-a/acinclude.m4 2010-06-10 11:00:14.000000000 +0000 |
40 |
+++ mpfr-3.0.0-b/acinclude.m4 2010-06-10 11:00:14.000000000 +0000 |
41 |
@@ -59,6 +59,9 @@ |
42 |
dnl sys/fpu.h - MIPS specific |
43 |
AC_CHECK_HEADERS([sys/time.h sys/fpu.h]) |
44 |
|
45 |
+dnl Check how to get `alloca' |
46 |
+AC_FUNC_ALLOCA |
47 |
+ |
48 |
dnl SIZE_MAX macro |
49 |
gl_SIZE_MAX |
50 |
|
51 |
diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure |
52 |
--- mpfr-3.0.0-a/configure 2010-06-10 11:00:51.000000000 +0000 |
53 |
+++ mpfr-3.0.0-b/configure 2010-06-25 13:23:05.000000000 +0000 |
54 |
@@ -783,6 +783,7 @@ |
55 |
OBJDUMP |
56 |
DLLTOOL |
57 |
AS |
58 |
+ALLOCA |
59 |
MPFR_LIBM |
60 |
ANSI2KNR |
61 |
U |
62 |
@@ -5622,6 +5623,197 @@ |
63 |
done |
64 |
|
65 |
|
66 |
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
67 |
+# for constant arguments. Useless! |
68 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
69 |
+$as_echo_n "checking for working alloca.h... " >&6; } |
70 |
+if test "${ac_cv_working_alloca_h+set}" = set; then : |
71 |
+ $as_echo_n "(cached) " >&6 |
72 |
+else |
73 |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
74 |
+/* end confdefs.h. */ |
75 |
+#include <alloca.h> |
76 |
+int |
77 |
+main () |
78 |
+{ |
79 |
+char *p = (char *) alloca (2 * sizeof (int)); |
80 |
+ if (p) return 0; |
81 |
+ ; |
82 |
+ return 0; |
83 |
+} |
84 |
+_ACEOF |
85 |
+if ac_fn_c_try_link "$LINENO"; then : |
86 |
+ ac_cv_working_alloca_h=yes |
87 |
+else |
88 |
+ ac_cv_working_alloca_h=no |
89 |
+fi |
90 |
+rm -f core conftest.err conftest.$ac_objext \ |
91 |
+ conftest$ac_exeext conftest.$ac_ext |
92 |
+fi |
93 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
94 |
+$as_echo "$ac_cv_working_alloca_h" >&6; } |
95 |
+if test $ac_cv_working_alloca_h = yes; then |
96 |
+ |
97 |
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
98 |
+ |
99 |
+fi |
100 |
+ |
101 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
102 |
+$as_echo_n "checking for alloca... " >&6; } |
103 |
+if test "${ac_cv_func_alloca_works+set}" = set; then : |
104 |
+ $as_echo_n "(cached) " >&6 |
105 |
+else |
106 |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
107 |
+/* end confdefs.h. */ |
108 |
+#ifdef __GNUC__ |
109 |
+# define alloca __builtin_alloca |
110 |
+#else |
111 |
+# ifdef _MSC_VER |
112 |
+# include <malloc.h> |
113 |
+# define alloca _alloca |
114 |
+# else |
115 |
+# ifdef HAVE_ALLOCA_H |
116 |
+# include <alloca.h> |
117 |
+# else |
118 |
+# ifdef _AIX |
119 |
+ #pragma alloca |
120 |
+# else |
121 |
+# ifndef alloca /* predefined by HP cc +Olibcalls */ |
122 |
+char *alloca (); |
123 |
+# endif |
124 |
+# endif |
125 |
+# endif |
126 |
+# endif |
127 |
+#endif |
128 |
+ |
129 |
+int |
130 |
+main () |
131 |
+{ |
132 |
+char *p = (char *) alloca (1); |
133 |
+ if (p) return 0; |
134 |
+ ; |
135 |
+ return 0; |
136 |
+} |
137 |
+_ACEOF |
138 |
+if ac_fn_c_try_link "$LINENO"; then : |
139 |
+ ac_cv_func_alloca_works=yes |
140 |
+else |
141 |
+ ac_cv_func_alloca_works=no |
142 |
+fi |
143 |
+rm -f core conftest.err conftest.$ac_objext \ |
144 |
+ conftest$ac_exeext conftest.$ac_ext |
145 |
+fi |
146 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
147 |
+$as_echo "$ac_cv_func_alloca_works" >&6; } |
148 |
+ |
149 |
+if test $ac_cv_func_alloca_works = yes; then |
150 |
+ |
151 |
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
152 |
+ |
153 |
+else |
154 |
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
155 |
+# that cause trouble. Some versions do not even contain alloca or |
156 |
+# contain a buggy version. If you still want to use their alloca, |
157 |
+# use ar to extract alloca.o from them instead of compiling alloca.c. |
158 |
+ |
159 |
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
160 |
+ |
161 |
+$as_echo "#define C_ALLOCA 1" >>confdefs.h |
162 |
+ |
163 |
+ |
164 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
165 |
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } |
166 |
+if test "${ac_cv_os_cray+set}" = set; then : |
167 |
+ $as_echo_n "(cached) " >&6 |
168 |
+else |
169 |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
170 |
+/* end confdefs.h. */ |
171 |
+#if defined CRAY && ! defined CRAY2 |
172 |
+webecray |
173 |
+#else |
174 |
+wenotbecray |
175 |
+#endif |
176 |
+ |
177 |
+_ACEOF |
178 |
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
179 |
+ $EGREP "webecray" >/dev/null 2>&1; then : |
180 |
+ ac_cv_os_cray=yes |
181 |
+else |
182 |
+ ac_cv_os_cray=no |
183 |
+fi |
184 |
+rm -f conftest* |
185 |
+ |
186 |
+fi |
187 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
188 |
+$as_echo "$ac_cv_os_cray" >&6; } |
189 |
+if test $ac_cv_os_cray = yes; then |
190 |
+ for ac_func in _getb67 GETB67 getb67; do |
191 |
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
192 |
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
193 |
+eval as_val=\$$as_ac_var |
194 |
+ if test "x$as_val" = x""yes; then : |
195 |
+ |
196 |
+cat >>confdefs.h <<_ACEOF |
197 |
+#define CRAY_STACKSEG_END $ac_func |
198 |
+_ACEOF |
199 |
+ |
200 |
+ break |
201 |
+fi |
202 |
+ |
203 |
+ done |
204 |
+fi |
205 |
+ |
206 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
207 |
+$as_echo_n "checking stack direction for C alloca... " >&6; } |
208 |
+if test "${ac_cv_c_stack_direction+set}" = set; then : |
209 |
+ $as_echo_n "(cached) " >&6 |
210 |
+else |
211 |
+ if test "$cross_compiling" = yes; then : |
212 |
+ ac_cv_c_stack_direction=0 |
213 |
+else |
214 |
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
215 |
+/* end confdefs.h. */ |
216 |
+$ac_includes_default |
217 |
+int |
218 |
+find_stack_direction () |
219 |
+{ |
220 |
+ static char *addr = 0; |
221 |
+ auto char dummy; |
222 |
+ if (addr == 0) |
223 |
+ { |
224 |
+ addr = &dummy; |
225 |
+ return find_stack_direction (); |
226 |
+ } |
227 |
+ else |
228 |
+ return (&dummy > addr) ? 1 : -1; |
229 |
+} |
230 |
+ |
231 |
+int |
232 |
+main () |
233 |
+{ |
234 |
+ return find_stack_direction () < 0; |
235 |
+} |
236 |
+_ACEOF |
237 |
+if ac_fn_c_try_run "$LINENO"; then : |
238 |
+ ac_cv_c_stack_direction=1 |
239 |
+else |
240 |
+ ac_cv_c_stack_direction=-1 |
241 |
+fi |
242 |
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
243 |
+ conftest.$ac_objext conftest.beam conftest.$ac_ext |
244 |
+fi |
245 |
+ |
246 |
+fi |
247 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 |
248 |
+$as_echo "$ac_cv_c_stack_direction" >&6; } |
249 |
+cat >>confdefs.h <<_ACEOF |
250 |
+#define STACK_DIRECTION $ac_cv_c_stack_direction |
251 |
+_ACEOF |
252 |
+ |
253 |
+ |
254 |
+fi |
255 |
+ |
256 |
+ |
257 |
|
258 |
for ac_header in stdint.h |
259 |
do : |
260 |
@@ -7564,13 +7756,13 @@ |
261 |
else |
262 |
lt_cv_nm_interface="BSD nm" |
263 |
echo "int some_variable = 0;" > conftest.$ac_ext |
264 |
- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5) |
265 |
+ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5) |
266 |
(eval "$ac_compile" 2>conftest.err) |
267 |
cat conftest.err >&5 |
268 |
- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |
269 |
+ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |
270 |
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
271 |
cat conftest.err >&5 |
272 |
- (eval echo "\"\$as_me:7573: output\"" >&5) |
273 |
+ (eval echo "\"\$as_me:7765: output\"" >&5) |
274 |
cat conftest.out >&5 |
275 |
if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
276 |
lt_cv_nm_interface="MS dumpbin" |
277 |
@@ -8772,7 +8964,7 @@ |
278 |
;; |
279 |
*-*-irix6*) |
280 |
# Find out which ABI we are using. |
281 |
- echo '#line 8775 "configure"' > conftest.$ac_ext |
282 |
+ echo '#line 8967 "configure"' > conftest.$ac_ext |
283 |
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
284 |
(eval $ac_compile) 2>&5 |
285 |
ac_status=$? |
286 |
@@ -10032,11 +10224,11 @@ |
287 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
288 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
289 |
-e 's:$: $lt_compiler_flag:'` |
290 |
- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5) |
291 |
+ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5) |
292 |
(eval "$lt_compile" 2>conftest.err) |
293 |
ac_status=$? |
294 |
cat conftest.err >&5 |
295 |
- echo "$as_me:10039: \$? = $ac_status" >&5 |
296 |
+ echo "$as_me:10231: \$? = $ac_status" >&5 |
297 |
if (exit $ac_status) && test -s "$ac_outfile"; then |
298 |
# The compiler can only warn and ignore the option if not recognized |
299 |
# So say no if there are warnings other than the usual output. |
300 |
@@ -10371,11 +10563,11 @@ |
301 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
302 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
303 |
-e 's:$: $lt_compiler_flag:'` |
304 |
- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5) |
305 |
+ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5) |
306 |
(eval "$lt_compile" 2>conftest.err) |
307 |
ac_status=$? |
308 |
cat conftest.err >&5 |
309 |
- echo "$as_me:10378: \$? = $ac_status" >&5 |
310 |
+ echo "$as_me:10570: \$? = $ac_status" >&5 |
311 |
if (exit $ac_status) && test -s "$ac_outfile"; then |
312 |
# The compiler can only warn and ignore the option if not recognized |
313 |
# So say no if there are warnings other than the usual output. |
314 |
@@ -10476,11 +10668,11 @@ |
315 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
316 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
317 |
-e 's:$: $lt_compiler_flag:'` |
318 |
- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5) |
319 |
+ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5) |
320 |
(eval "$lt_compile" 2>out/conftest.err) |
321 |
ac_status=$? |
322 |
cat out/conftest.err >&5 |
323 |
- echo "$as_me:10483: \$? = $ac_status" >&5 |
324 |
+ echo "$as_me:10675: \$? = $ac_status" >&5 |
325 |
if (exit $ac_status) && test -s out/conftest2.$ac_objext |
326 |
then |
327 |
# The compiler can only warn and ignore the option if not recognized |
328 |
@@ -10531,11 +10723,11 @@ |
329 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
330 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
331 |
-e 's:$: $lt_compiler_flag:'` |
332 |
- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5) |
333 |
+ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5) |
334 |
(eval "$lt_compile" 2>out/conftest.err) |
335 |
ac_status=$? |
336 |
cat out/conftest.err >&5 |
337 |
- echo "$as_me:10538: \$? = $ac_status" >&5 |
338 |
+ echo "$as_me:10730: \$? = $ac_status" >&5 |
339 |
if (exit $ac_status) && test -s out/conftest2.$ac_objext |
340 |
then |
341 |
# The compiler can only warn and ignore the option if not recognized |
342 |
@@ -12915,7 +13107,7 @@ |
343 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
344 |
lt_status=$lt_dlunknown |
345 |
cat > conftest.$ac_ext <<_LT_EOF |
346 |
-#line 12918 "configure" |
347 |
+#line 13110 "configure" |
348 |
#include "confdefs.h" |
349 |
|
350 |
#if HAVE_DLFCN_H |
351 |
@@ -13011,7 +13203,7 @@ |
352 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
353 |
lt_status=$lt_dlunknown |
354 |
cat > conftest.$ac_ext <<_LT_EOF |
355 |
-#line 13014 "configure" |
356 |
+#line 13206 "configure" |
357 |
#include "confdefs.h" |
358 |
|
359 |
#if HAVE_DLFCN_H |
360 |
diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h |
361 |
--- mpfr-3.0.0-a/mpfr.h 2010-06-23 11:03:20.000000000 +0000 |
362 |
+++ mpfr-3.0.0-b/mpfr.h 2010-06-25 13:23:13.000000000 +0000 |
363 |
@@ -27,7 +27,7 @@ |
364 |
#define MPFR_VERSION_MAJOR 3 |
365 |
#define MPFR_VERSION_MINOR 0 |
366 |
#define MPFR_VERSION_PATCHLEVEL 0 |
367 |
-#define MPFR_VERSION_STRING "3.0.0-p1" |
368 |
+#define MPFR_VERSION_STRING "3.0.0-p2" |
369 |
|
370 |
/* Macros dealing with MPFR VERSION */ |
371 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
372 |
diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in |
373 |
--- mpfr-3.0.0-a/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000 |
374 |
+++ mpfr-3.0.0-b/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000 |
375 |
@@ -960,6 +960,7 @@ |
376 |
red=; grn=; lgn=; blu=; std= |
377 |
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
378 |
ACLOCAL = @ACLOCAL@ |
379 |
+ALLOCA = @ALLOCA@ |
380 |
AMTAR = @AMTAR@ |
381 |
AR = @AR@ |
382 |
AS = @AS@ |
383 |
diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c |
384 |
--- mpfr-3.0.0-a/version.c 2010-06-23 11:03:20.000000000 +0000 |
385 |
+++ mpfr-3.0.0-b/version.c 2010-06-25 13:23:13.000000000 +0000 |
386 |
@@ -25,5 +25,5 @@ |
387 |
const char * |
388 |
mpfr_get_version (void) |
389 |
{ |
390 |
- return "3.0.0-p1"; |
391 |
+ return "3.0.0-p2"; |
392 |
} |
393 |
|
394 |
|
395 |
|
396 |
1.1 dev-libs/mpfr/files/3.0.0/patch03 |
397 |
|
398 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.0.0/patch03?rev=1.1&view=markup |
399 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.0.0/patch03?rev=1.1&content-type=text/plain |
400 |
|
401 |
Index: patch03 |
402 |
=================================================================== |
403 |
diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES |
404 |
--- mpfr-3.0.0-a/PATCHES 2010-07-10 00:11:19.000000000 +0000 |
405 |
+++ mpfr-3.0.0-b/PATCHES 2010-07-10 00:12:50.000000000 +0000 |
406 |
@@ -0,0 +1 @@ |
407 |
+gamma_underflow |
408 |
diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION |
409 |
--- mpfr-3.0.0-a/VERSION 2010-06-25 13:23:13.000000000 +0000 |
410 |
+++ mpfr-3.0.0-b/VERSION 2010-07-10 00:11:53.000000000 +0000 |
411 |
@@ -1 +1 @@ |
412 |
-3.0.0-p2 |
413 |
+3.0.0-p3 |
414 |
diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c |
415 |
--- mpfr-3.0.0-a/gamma.c 2010-06-10 11:00:14.000000000 +0000 |
416 |
+++ mpfr-3.0.0-b/gamma.c 2010-07-10 00:11:46.000000000 +0000 |
417 |
@@ -274,7 +274,7 @@ |
418 |
/* we want an upper bound for x * [log(2-x)-1]. |
419 |
since x < 0, we need a lower bound on log(2-x) */ |
420 |
mpfr_ui_sub (xp, 2, x, MPFR_RNDD); |
421 |
- mpfr_log (xp, xp, MPFR_RNDD); |
422 |
+ mpfr_log2 (xp, xp, MPFR_RNDD); |
423 |
mpfr_sub_ui (xp, xp, 1, MPFR_RNDD); |
424 |
mpfr_mul (xp, xp, x, MPFR_RNDU); |
425 |
|
426 |
@@ -303,8 +303,8 @@ |
427 |
{ |
428 |
mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */ |
429 |
mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */ |
430 |
- mpfr_log (tmp, tmp, MPFR_RNDU); |
431 |
- mpfr_add (tmp, tmp, xp, MPFR_RNDU); |
432 |
+ mpfr_log2 (tmp, tmp, MPFR_RNDU); |
433 |
+ mpfr_add (xp, tmp, xp, MPFR_RNDU); |
434 |
underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0; |
435 |
} |
436 |
|
437 |
diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h |
438 |
--- mpfr-3.0.0-a/mpfr.h 2010-06-25 13:23:13.000000000 +0000 |
439 |
+++ mpfr-3.0.0-b/mpfr.h 2010-07-10 00:11:53.000000000 +0000 |
440 |
@@ -27,7 +27,7 @@ |
441 |
#define MPFR_VERSION_MAJOR 3 |
442 |
#define MPFR_VERSION_MINOR 0 |
443 |
#define MPFR_VERSION_PATCHLEVEL 0 |
444 |
-#define MPFR_VERSION_STRING "3.0.0-p2" |
445 |
+#define MPFR_VERSION_STRING "3.0.0-p3" |
446 |
|
447 |
/* Macros dealing with MPFR VERSION */ |
448 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
449 |
diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c |
450 |
--- mpfr-3.0.0-a/tests/tgamma.c 2010-06-10 11:00:13.000000000 +0000 |
451 |
+++ mpfr-3.0.0-b/tests/tgamma.c 2010-07-10 00:11:46.000000000 +0000 |
452 |
@@ -461,6 +461,20 @@ |
453 |
mpfr_clear (x); |
454 |
} |
455 |
|
456 |
+/* bug found by Stathis, only occurs on 32-bit machines */ |
457 |
+static void |
458 |
+test20100709 (void) |
459 |
+{ |
460 |
+ mpfr_t x; |
461 |
+ int inex; |
462 |
+ |
463 |
+ mpfr_init2 (x, 100); |
464 |
+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN); |
465 |
+ inex = mpfr_gamma (x, x, MPFR_RNDN); |
466 |
+ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0); |
467 |
+ mpfr_clear (x); |
468 |
+} |
469 |
+ |
470 |
int |
471 |
main (int argc, char *argv[]) |
472 |
{ |
473 |
@@ -471,6 +485,7 @@ |
474 |
test_generic (2, 100, 2); |
475 |
gamma_integer (); |
476 |
test20071231 (); |
477 |
+ test20100709 (); |
478 |
|
479 |
data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); |
480 |
|
481 |
diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c |
482 |
--- mpfr-3.0.0-a/version.c 2010-06-25 13:23:13.000000000 +0000 |
483 |
+++ mpfr-3.0.0-b/version.c 2010-07-10 00:11:53.000000000 +0000 |
484 |
@@ -25,5 +25,5 @@ |
485 |
const char * |
486 |
mpfr_get_version (void) |
487 |
{ |
488 |
- return "3.0.0-p2"; |
489 |
+ return "3.0.0-p3"; |
490 |
} |
491 |
|
492 |
|
493 |
|
494 |
1.1 dev-libs/mpfr/files/3.0.0/patch01 |
495 |
|
496 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.0.0/patch01?rev=1.1&view=markup |
497 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/mpfr/files/3.0.0/patch01?rev=1.1&content-type=text/plain |
498 |
|
499 |
Index: patch01 |
500 |
=================================================================== |
501 |
diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES |
502 |
--- mpfr-3.0.0-a/PATCHES 2010-06-23 11:02:49.000000000 +0000 |
503 |
+++ mpfr-3.0.0-b/PATCHES 2010-06-23 11:03:36.000000000 +0000 |
504 |
@@ -0,0 +1 @@ |
505 |
+mpfr_out_str |
506 |
diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION |
507 |
--- mpfr-3.0.0-a/VERSION 2010-06-10 11:00:14.000000000 +0000 |
508 |
+++ mpfr-3.0.0-b/VERSION 2010-06-23 11:03:20.000000000 +0000 |
509 |
@@ -1 +1 @@ |
510 |
-3.0.0 |
511 |
+3.0.0-p1 |
512 |
diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h |
513 |
--- mpfr-3.0.0-a/mpfr.h 2010-06-10 11:00:14.000000000 +0000 |
514 |
+++ mpfr-3.0.0-b/mpfr.h 2010-06-23 11:03:20.000000000 +0000 |
515 |
@@ -27,7 +27,7 @@ |
516 |
#define MPFR_VERSION_MAJOR 3 |
517 |
#define MPFR_VERSION_MINOR 0 |
518 |
#define MPFR_VERSION_PATCHLEVEL 0 |
519 |
-#define MPFR_VERSION_STRING "3.0.0" |
520 |
+#define MPFR_VERSION_STRING "3.0.0-p1" |
521 |
|
522 |
/* Macros dealing with MPFR VERSION */ |
523 |
#define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) |
524 |
diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi |
525 |
--- mpfr-3.0.0-a/mpfr.texi 2010-06-10 11:00:14.000000000 +0000 |
526 |
+++ mpfr-3.0.0-b/mpfr.texi 2010-06-23 11:03:12.000000000 +0000 |
527 |
@@ -2050,7 +2050,7 @@ |
528 |
are printed. If @var{base} is greater than 10, @samp{@@} will be used |
529 |
instead of @samp{e} as exponent delimiter. |
530 |
|
531 |
-Return the number of bytes written, or if an error occurred, return 0. |
532 |
+Return the number of characters written, or if an error occurred, return 0. |
533 |
@end deftypefun |
534 |
|
535 |
@deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd}) |
536 |
diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c |
537 |
--- mpfr-3.0.0-a/out_str.c 2010-06-10 11:00:14.000000000 +0000 |
538 |
+++ mpfr-3.0.0-b/out_str.c 2010-06-23 11:03:12.000000000 +0000 |
539 |
@@ -22,6 +22,16 @@ |
540 |
|
541 |
#include "mpfr-impl.h" |
542 |
|
543 |
+/* Warning! S should not contain "%". */ |
544 |
+#define OUT_STR_RET(S) \ |
545 |
+ do \ |
546 |
+ { \ |
547 |
+ int r; \ |
548 |
+ r = fprintf (stream, (S)); \ |
549 |
+ return r < 0 ? 0 : r; \ |
550 |
+ } \ |
551 |
+ while (0) |
552 |
+ |
553 |
size_t |
554 |
mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op, |
555 |
mpfr_rnd_t rnd_mode) |
556 |
@@ -29,6 +39,7 @@ |
557 |
char *s, *s0; |
558 |
size_t l; |
559 |
mpfr_exp_t e; |
560 |
+ int err; |
561 |
|
562 |
MPFR_ASSERTN (base >= 2 && base <= 62); |
563 |
|
564 |
@@ -36,37 +47,16 @@ |
565 |
if (stream == NULL) |
566 |
stream = stdout; |
567 |
|
568 |
- if (MPFR_IS_NAN(op)) |
569 |
- { |
570 |
- fprintf (stream, "@NaN@"); |
571 |
- return 3; |
572 |
- } |
573 |
- |
574 |
- if (MPFR_IS_INF(op)) |
575 |
- { |
576 |
- if (MPFR_SIGN(op) > 0) |
577 |
- { |
578 |
- fprintf (stream, "@Inf@"); |
579 |
- return 3; |
580 |
- } |
581 |
- else |
582 |
- { |
583 |
- fprintf (stream, "-@Inf@"); |
584 |
- return 4; |
585 |
- } |
586 |
- } |
587 |
- |
588 |
- if (MPFR_IS_ZERO(op)) |
589 |
+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op))) |
590 |
{ |
591 |
- if (MPFR_SIGN(op) > 0) |
592 |
- { |
593 |
- fprintf(stream, "0"); |
594 |
- return 1; |
595 |
- } |
596 |
+ if (MPFR_IS_NAN (op)) |
597 |
+ OUT_STR_RET ("@NaN@"); |
598 |
+ else if (MPFR_IS_INF (op)) |
599 |
+ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@"); |
600 |
else |
601 |
{ |
602 |
- fprintf(stream, "-0"); |
603 |
- return 2; |
604 |
+ MPFR_ASSERTD (MPFR_IS_ZERO (op)); |
605 |
+ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0"); |
606 |
} |
607 |
} |
608 |
|
609 |
@@ -77,21 +67,31 @@ |
610 |
|
611 |
l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str |
612 |
- may be incorrect, as only an upper bound? */ |
613 |
- if (*s == '-') |
614 |
- fputc (*s++, stream); |
615 |
|
616 |
- /* outputs mantissa */ |
617 |
- fputc (*s++, stream); e--; /* leading digit */ |
618 |
- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream); |
619 |
- fputs (s, stream); /* rest of mantissa */ |
620 |
+ /* outputs possible sign and significand */ |
621 |
+ err = (*s == '-' && fputc (*s++, stream) == EOF) |
622 |
+ || fputc (*s++, stream) == EOF /* leading digit */ |
623 |
+ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF |
624 |
+ || fputs (s, stream) == EOF; /* trailing significand */ |
625 |
(*__gmp_free_func) (s0, l); |
626 |
+ if (MPFR_UNLIKELY (err)) |
627 |
+ return 0; |
628 |
+ |
629 |
+ e--; /* due to the leading digit */ |
630 |
|
631 |
/* outputs exponent */ |
632 |
if (e) |
633 |
{ |
634 |
+ int r; |
635 |
+ |
636 |
MPFR_ASSERTN(e >= LONG_MIN); |
637 |
MPFR_ASSERTN(e <= LONG_MAX); |
638 |
- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); |
639 |
+ |
640 |
+ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); |
641 |
+ if (MPFR_UNLIKELY (r < 0)) |
642 |
+ return 0; |
643 |
+ |
644 |
+ l += r; |
645 |
} |
646 |
|
647 |
return l; |
648 |
diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c |
649 |
--- mpfr-3.0.0-a/tests/tout_str.c 2010-06-10 11:00:13.000000000 +0000 |
650 |
+++ mpfr-3.0.0-b/tests/tout_str.c 2010-06-23 11:03:12.000000000 +0000 |
651 |
@@ -46,22 +46,54 @@ |
652 |
special (void) |
653 |
{ |
654 |
mpfr_t x; |
655 |
+ unsigned int n; |
656 |
|
657 |
mpfr_init (x); |
658 |
|
659 |
mpfr_set_nan (x); |
660 |
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
661 |
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
662 |
+ if (n != 5) |
663 |
+ { |
664 |
+ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u " |
665 |
+ "characters instead of 5.\n", n); |
666 |
+ exit (1); |
667 |
+ } |
668 |
|
669 |
mpfr_set_inf (x, 1); |
670 |
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
671 |
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
672 |
+ if (n != 5) |
673 |
+ { |
674 |
+ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u " |
675 |
+ "characters instead of 5.\n", n); |
676 |
+ exit (1); |
677 |
+ } |
678 |
|
679 |
mpfr_set_inf (x, -1); |
680 |
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
681 |
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
682 |
+ if (n != 6) |
683 |
+ { |
684 |
+ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u " |
685 |
+ "characters instead of 6.\n", n); |
686 |
+ exit (1); |
687 |
+ } |
688 |
|
689 |
mpfr_set_ui (x, 0, MPFR_RNDN); |
690 |
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
691 |
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
692 |
+ if (n != 1) |
693 |
+ { |
694 |
+ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u " |
695 |
+ "characters instead of 1.\n", n); |
696 |
+ exit (1); |
697 |
+ } |
698 |
+ |
699 |
mpfr_neg (x, x, MPFR_RNDN); |
700 |
- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
701 |
+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); |
702 |
+ if (n != 2) |
703 |
+ { |
704 |
+ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u " |
705 |
+ "characters instead of 2.\n", n); |
706 |
+ exit (1); |
707 |
+ } |
708 |
|
709 |
mpfr_clear (x); |
710 |
} |
711 |
diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c |
712 |
--- mpfr-3.0.0-a/version.c 2010-06-10 11:00:14.000000000 +0000 |
713 |
+++ mpfr-3.0.0-b/version.c 2010-06-23 11:03:20.000000000 +0000 |
714 |
@@ -25,5 +25,5 @@ |
715 |
const char * |
716 |
mpfr_get_version (void) |
717 |
{ |
718 |
- return "3.0.0"; |
719 |
+ return "3.0.0-p1"; |
720 |
} |