diff options
author | 2017-05-20 04:58:46 (GMT) | |
---|---|---|
committer | 2017-07-08 17:57:56 (GMT) | |
commit | e7deac3aad394325f9e6fc6fda41d34ec94a59e0 (patch) | |
tree | 6ad88362f0bfa8385a91eb494009a4646aeb74b6 /patches | |
parent | b9af225f58e45c7fae7eb9d3689fe939243e7578 (diff) |
Switch comp.libs/tools and debug to new framework.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'patches')
197 files changed, 0 insertions, 114926 deletions
diff --git a/patches/duma/2_5_15/100-cross-compile.patch b/patches/duma/2_5_15/100-cross-compile.patch deleted file mode 100644 index cc95160..0000000 --- a/patches/duma/2_5_15/100-cross-compile.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile ---- duma_2_5_15.orig/GNUmakefile 2008-08-03 21:22:38.000000000 +0200 -+++ duma_2_5_15/GNUmakefile 2009-06-19 15:32:23.000000000 +0200 -@@ -93,10 +93,6 @@ - # also define 'WIN32' - - # some defaults: --CC=gcc --CXX=g++ --AR=ar --RANLIB=ranlib - INSTALL=install - RM=rm - RMFORCE=rm -f -@@ -471,7 +467,7 @@ - - createconf$(EXEPOSTFIX): createconf.o - - $(RMFORCE) createconf$(EXEPOSTFIX) -- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) -+ $(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) - - tstheap$(EXEPOSTFIX): libduma.a tstheap.o - - $(RMFORCE) tstheap$(EXEPOSTFIX) -@@ -532,7 +528,7 @@ - # define rules how to build objects for createconf - # - createconf.o: -- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ -+ $(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ - - - # diff --git a/patches/duma/2_5_15/110-separate_cpp.patch b/patches/duma/2_5_15/110-separate_cpp.patch deleted file mode 100644 index 4bbccc7..0000000 --- a/patches/duma/2_5_15/110-separate_cpp.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile ---- duma_2_5_15.orig/GNUmakefile 2009-06-19 16:41:53.000000000 +0200 -+++ duma_2_5_15/GNUmakefile 2009-06-19 16:43:53.000000000 +0200 -@@ -289,9 +289,13 @@ - dumatest.c tstheap.c thread-test.c testmt.c dumatestpp.cpp testoperators.cpp \ - createconf.c - --OBJECTS=dumapp.o duma.o sem_inc.o print.o -+OBJECTS = duma.o sem_inc.o print.o -+SO_OBJECTS = duma_so.o sem_inc_so.o print_so.o - --SO_OBJECTS=dumapp_so.o duma_so.o sem_inc_so.o print_so.o -+ifeq ($(DUMA_CPP),1) -+OBJECTS += dumapp.o -+SO_OBJECTS += dumapp_so.o -+endif - - # Make all the top-level targets the makefile knows about. - all: libduma.a tstheap$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) $(DUMA_DYN_DEPS) diff --git a/patches/duma/2_5_15/200-cpp11-new-operator.patch b/patches/duma/2_5_15/200-cpp11-new-operator.patch deleted file mode 100644 index 900333e..0000000 --- a/patches/duma/2_5_15/200-cpp11-new-operator.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/dumapp.cpp b/dumapp.cpp -index dbddf66..b5e9ba3 100644 ---- a/dumapp.cpp -+++ b/dumapp.cpp -@@ -189,8 +189,7 @@ void * duma_new_operator(DUMA_SIZE_T userSize, enum _DUMA_Allocator allocator, b - * Single object form, no debug information - * (11) = (a) ; ASW - */ --void * DUMA_CDECL operator new( DUMA_SIZE_T size ) --throw(std::bad_alloc) -+void * DUMA_CDECL operator new( DUMA_SIZE_T size ) NEW_THROW_SPEC - { - return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_UK); - } -@@ -253,8 +252,7 @@ throw() - * Array object form, no debug information - * (21) = (a) ; AAW - */ --void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) --throw(std::bad_alloc) -+void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) NEW_THROW_SPEC - { - return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_UK); - } -@@ -320,8 +318,7 @@ throw() - * Single object form with debug information - * (31) = (a) ; ASW - */ --void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno ) --throw( std::bad_alloc ) -+void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC - { - return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_FILELINE); - } -@@ -373,8 +370,7 @@ throw() - * Array object form with debug information - * (41) = (a) ; AAW - */ --void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno ) --throw( std::bad_alloc ) -+void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC - { - return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_FILELINE); - } -diff --git a/dumapp.h b/dumapp.h -index fc40d9a..7175359 100644 ---- a/dumapp.h -+++ b/dumapp.h -@@ -64,6 +64,11 @@ - #endif - #endif - -+#if __cplusplus <= 199711L -+#define NEW_THROW_SPEC throw(std::bad_alloc) -+#else -+#define NEW_THROW_SPEC -+#endif - - #ifndef DUMA_NO_CPP_SUPPORT - -@@ -81,7 +86,7 @@ - /* (12) = (b) ; ASN */ - /* (13) = (c) ; FSW */ - /* (14) = (d) ; FSN */ -- void * DUMA_CDECL operator new(DUMA_SIZE_T) throw(std::bad_alloc); -+ void * DUMA_CDECL operator new(DUMA_SIZE_T) NEW_THROW_SPEC; - void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &) throw(); - void DUMA_CDECL operator delete(void *) throw(); - void DUMA_CDECL operator delete(void *, const std::nothrow_t &) throw(); -@@ -91,7 +96,7 @@ - /* (22) = (b) ; AAN */ - /* (23) = (c) ; FAW */ - /* (24) = (d) ; FAN */ -- void * DUMA_CDECL operator new[](DUMA_SIZE_T) throw(std::bad_alloc); -+ void * DUMA_CDECL operator new[](DUMA_SIZE_T) NEW_THROW_SPEC; - void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &) throw(); - void DUMA_CDECL operator delete[](void *) throw(); - void DUMA_CDECL operator delete[](void *, const std::nothrow_t &) throw(); -@@ -103,7 +108,7 @@ - /* (32) = (b) ; ASN */ - /* (33) = (c) ; FSW */ - /* (34) = (d) ; FSN */ -- void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) throw(std::bad_alloc); -+ void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC; - void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw(); - void DUMA_CDECL operator delete(void *, const char *, int) throw(); - void DUMA_CDECL operator delete(void *, const std::nothrow_t &, const char *, int) throw(); -@@ -113,7 +118,7 @@ - /* (42) = (b) ; AAN */ - /* (43) = (c) ; FAW */ - /* (44) = (d) ; FAN */ -- void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) throw(std::bad_alloc); -+ void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC; - void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw(); - void DUMA_CDECL operator delete[](void *, const char *, int) throw(); - void DUMA_CDECL operator delete[](void *, const std::nothrow_t &, const char *, int) throw(); diff --git a/patches/gdb/6.8a/100-dwarf-stack-overflow.patch b/patches/gdb/6.8a/100-dwarf-stack-overflow.patch deleted file mode 100644 index 344d5a3..0000000 --- a/patches/gdb/6.8a/100-dwarf-stack-overflow.patch +++ /dev/null @@ -1,52 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/80_all_gdb-6.5-dwarf-stack-overflow.patch --= BEGIN original header =- -http://bugs.gentoo.org/144833 - -for gdb/ChangeLog: -2006-08-22 Will Drewry <wad@google.com> - Tavis Ormandy <taviso@google.com> - - * dwarf2read.c (decode_locdesc): Enforce location description stack - boundaries. - * dwarfread.c (locval): Likewise. - --= END original header =- -diff -durN gdb-6.8.orig/gdb/dwarf2read.c gdb-6.8/gdb/dwarf2read.c ---- gdb-6.8.orig/gdb/dwarf2read.c 2008-03-10 15:18:10.000000000 +0100 -+++ gdb-6.8/gdb/dwarf2read.c 2008-06-17 16:07:31.000000000 +0200 -@@ -9124,8 +9124,7 @@ - callers will only want a very basic result and this can become a - complaint. - -- Note that stack[0] is unused except as a default error return. -- Note that stack overflow is not yet handled. */ -+ Note that stack[0] is unused except as a default error return. */ - - static CORE_ADDR - decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) -@@ -9142,7 +9141,7 @@ - - i = 0; - stacki = 0; -- stack[stacki] = 0; -+ stack[++stacki] = 0; - - while (i < size) - { -@@ -9324,6 +9323,16 @@ - dwarf_stack_op_name (op)); - return (stack[stacki]); - } -+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing -+ outside of the allocated space. Also enforce minimum > 0. -+ -- wad@google.com 14 Aug 2006 */ -+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too deep: %d"), -+ stacki); -+ if (stacki <= 0) -+ internal_error (__FILE__, __LINE__, -+ _("location description stack too shallow")); - } - return (stack[stacki]); - } diff --git a/patches/gdb/6.8a/110-security-errata-20050610.patch b/patches/gdb/6.8a/110-security-errata-20050610.patch deleted file mode 100644 index 27e8174..0000000 --- a/patches/gdb/6.8a/110-security-errata-20050610.patch +++ /dev/null @@ -1,205 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/35_all_gdb-6.3-security-errata-20050610.patch --= BEGIN original header =- -2005-06-09 Jeff Johnston <jjohnstn@redhat.com> - - * gdb.base/gdbinit.exp: New testcase. - * gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp. - -2005-06-08 Daniel Jacobowitz <dan@codesourcery.com> - Jeff Johnston <jjohnstn@redhat.com> - - * Makefile.in (cli-cmds.o): Update. - * configure.in: Add check for getuid. - * configure: Regenerated. - * config.in: Ditto. - * main.c (captured_main): Pass -1 to source_command when loading - gdbinit files. - * cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>. - (source_command): Update documentation. Check permissions if - FROM_TTY is -1. - --= END original header =- -diff -durN gdb-6.8.orig/gdb/Makefile.in gdb-6.8/gdb/Makefile.in ---- gdb-6.8.orig/gdb/Makefile.in 2008-03-17 13:15:08.000000000 +0100 -+++ gdb-6.8/gdb/Makefile.in 2008-06-17 16:07:33.000000000 +0200 -@@ -3004,7 +3004,7 @@ - $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ - $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ - $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ -- $(tui_h) -+ $(tui_h) $(gdb_stat_h) - $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c - cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ - $(gdb_regex_h) $(gdb_string_h) $(completer_h) $(ui_out_h) \ -diff -durN gdb-6.8.orig/gdb/cli/cli-cmds.c gdb-6.8/gdb/cli/cli-cmds.c ---- gdb-6.8.orig/gdb/cli/cli-cmds.c 2008-01-01 23:53:14.000000000 +0100 -+++ gdb-6.8/gdb/cli/cli-cmds.c 2008-06-17 16:07:33.000000000 +0200 -@@ -36,6 +36,7 @@ - #include "objfiles.h" - #include "source.h" - #include "disasm.h" -+#include "gdb_stat.h" - - #include "ui-out.h" - -@@ -459,12 +460,31 @@ - - if (fd == -1) - { -- if (from_tty) -+ if (from_tty > 0) - perror_with_name (file); - else - return; - } - -+#ifdef HAVE_GETUID -+ if (from_tty == -1) -+ { -+ struct stat statbuf; -+ if (fstat (fd, &statbuf) < 0) -+ { -+ perror_with_name (file); -+ close (fd); -+ return; -+ } -+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH)) -+ { -+ warning (_("not using untrusted file \"%s\""), file); -+ close (fd); -+ return; -+ } -+ } -+#endif -+ - stream = fdopen (fd, FOPEN_RT); - script_from_file (stream, file); - -diff -durN gdb-6.8.orig/gdb/main.c gdb-6.8/gdb/main.c ---- gdb-6.8.orig/gdb/main.c 2008-01-05 17:49:53.000000000 +0100 -+++ gdb-6.8/gdb/main.c 2008-06-17 16:07:33.000000000 +0200 -@@ -690,7 +690,7 @@ - - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, homeinit, -1, RETURN_MASK_ALL); - } - - /* Do stats; no need to do them elsewhere since we'll only -@@ -778,7 +778,7 @@ - || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) - if (!inhibit_gdbinit) - { -- catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL); -+ catch_command_errors (source_script, gdbinit, -1, RETURN_MASK_ALL); - } - - for (i = 0; i < ncmd; i++) -diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp ---- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.exp 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.exp 2008-06-17 16:07:33.000000000 +0200 -@@ -0,0 +1,98 @@ -+# Copyright 2005 -+# Free Software Foundation, Inc. -+ -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+# Please email any bugs, comments, and/or additions to this file to: -+# bug-gdb@prep.ai.mit.edu -+ -+# This file was written by Jeff Johnston <jjohnstn@redhat.com>. -+ -+if $tracelevel then { -+ strace $tracelevel -+} -+ -+set prms_id 0 -+set bug_id 0 -+ -+# are we on a target board -+if [is_remote target] { -+ return -+} -+ -+ -+global verbose -+global GDB -+global GDBFLAGS -+global gdb_prompt -+global timeout -+global gdb_spawn_id; -+ -+gdb_stop_suppressing_tests; -+ -+verbose "Spawning $GDB -nw" -+ -+if [info exists gdb_spawn_id] { -+ return 0; -+} -+ -+if ![is_remote host] { -+ if { [which $GDB] == 0 } then { -+ perror "$GDB does not exist." -+ exit 1 -+ } -+} -+ -+set env(HOME) [pwd] -+remote_exec build "rm .gdbinit" -+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit" -+remote_exec build "chmod 646 .gdbinit" -+ -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ pass "untrusted .gdbinit caught." -+ } -+ -re "$gdb_prompt $" { -+ fail "untrusted .gdbinit caught." -+ } -+ timeout { -+ fail "(timeout) untrusted .gdbinit caught." -+ } -+} -+ -+remote_exec build "chmod 644 .gdbinit" -+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"]; -+if { $res < 0 || $res == "" } { -+ perror "Spawning $GDB failed." -+ return 1; -+} -+gdb_expect 360 { -+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" { -+ fail "trusted .gdbinit allowed." -+ } -+ -re "in gdbinit.*$gdb_prompt $" { -+ pass "trusted .gdbinit allowed." -+ } -+ timeout { -+ fail "(timeout) trusted .gdbinit allowed." -+ } -+} -+ -+remote_exec build "rm .gdbinit" -diff -durN gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample ---- gdb-6.8.orig/gdb/testsuite/gdb.base/gdbinit.sample 1970-01-01 01:00:00.000000000 +0100 -+++ gdb-6.8/gdb/testsuite/gdb.base/gdbinit.sample 2008-06-17 16:07:33.000000000 +0200 -@@ -0,0 +1 @@ -+echo "\nin gdbinit" diff --git a/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch b/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch deleted file mode 100644 index 61fdef4..0000000 --- a/patches/gdb/6.8a/120-tdep-opcode-include-workaround.patch +++ /dev/null @@ -1,33 +0,0 @@ -Original patch from gentoo: gentoo/src/patchsets/gdb/6.8/20_all_gdb-tdep-opcode-include-workaround.patch --= BEGIN original header =- -workaround build failure - -http://bugs.gentoo.org/216368 - --= END original header =- -diff -durN gdb-6.8.orig/gdb/frv-tdep.c gdb-6.8/gdb/frv-tdep.c ---- gdb-6.8.orig/gdb/frv-tdep.c 2008-01-11 14:19:59.000000000 +0100 -+++ gdb-6.8/gdb/frv-tdep.c 2008-06-17 16:07:34.000000000 +0200 -@@ -32,7 +32,7 @@ - #include "gdb_assert.h" - #include "sim-regno.h" - #include "gdb/sim-frv.h" --#include "opcodes/frv-desc.h" /* for the H_SPR_... enums */ -+#include "../opcodes/frv-desc.h" /* for the H_SPR_... enums */ - #include "symtab.h" - #include "elf-bfd.h" - #include "elf/frv.h" -diff -durN gdb-6.8.orig/gdb/mep-tdep.c gdb-6.8/gdb/mep-tdep.c ---- gdb-6.8.orig/gdb/mep-tdep.c 2008-01-11 14:20:02.000000000 +0100 -+++ gdb-6.8/gdb/mep-tdep.c 2008-06-17 16:07:34.000000000 +0200 -@@ -53,8 +53,8 @@ - - /* Get the user's customized MeP coprocessor register names from - libopcodes. */ --#include "opcodes/mep-desc.h" --#include "opcodes/mep-opc.h" -+#include "../opcodes/mep-desc.h" -+#include "../opcodes/mep-opc.h" - - - /* The gdbarch_tdep structure. */ diff --git a/patches/gdb/6.8a/130-reg-no-longer-active.patch b/patches/gdb/6.8a/130-reg-no-longer-active.patch deleted file mode 100644 index 1c7e7e0..0000000 --- a/patches/gdb/6.8a/130-reg-no-longer-active.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix bug reported by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: -See: http://sourceware.org/ml/crossgcc/2009-05/msg00055.html - https://bugzilla.redhat.com/show_bug.cgi?id=436037 - -Fix from: http://cvs.fedoraproject.org/viewvc/devel/gdb/gdb-6.8-bz436037-reg-no-longer-active.patch?revision=1.1 - -diff -d -urpN src.0/gdb/valops.c src.1/gdb/valops.c ---- src.0/gdb/valops.c 2008-07-27 04:00:03.000000000 +0200 -+++ src.1/gdb/valops.c 2008-07-31 15:17:42.000000000 +0200 -@@ -813,10 +813,18 @@ value_assign (struct value *toval, struc - struct frame_info *frame; - int value_reg; - -- /* Figure out which frame this is in currently. */ -- frame = frame_find_by_id (VALUE_FRAME_ID (toval)); - value_reg = VALUE_REGNUM (toval); - -+ /* Figure out which frame this is in currently. */ -+ frame = frame_find_by_id (VALUE_FRAME_ID (toval)); -+ /* "set $reg+=1" should work on programs with no debug info, -+ but frame_find_by_id returns NULL here (RH bug 436037). -+ Use current frame, it represents CPU state in this case. -+ If frame_find_by_id is changed to do it internally -+ (it is contemplated there), remove this. */ -+ if (!frame) -+ frame = get_current_frame (); -+ /* Probably never happens. */ - if (!frame) - error (_("Value being assigned to is no longer active.")); - diff --git a/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch b/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch deleted file mode 100644 index f3723b5..0000000 --- a/patches/gdb/6.8a/140-sim-ppc-have-config-h.patch +++ /dev/null @@ -1,183 +0,0 @@ -Fix for canadian cross build of sim/ppc - -Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 - -diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in ---- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 -+++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 -@@ -61,7 +61,7 @@ - AR = @AR@ - AR_FLAGS = rc - CC = @CC@ --CFLAGS = @CFLAGS@ -+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ - BISON = bison -@@ -115,8 +115,8 @@ - $(DEVZERO_CFLAGS) - SIM_FPU_CFLAGS = @sim_fpu_cflags@ - --STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) --NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -+STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) -+NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) - BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) - - BUILD_LDFLAGS = -diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h ---- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 -@@ -86,7 +86,9 @@ - - /* Basic configuration */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "inline.h" - -diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c ---- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _DEBUG_C_ - #define _DEBUG_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c ---- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 -@@ -27,7 +27,9 @@ - #include <ctype.h> - #include <stdarg.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" -diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c ---- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 -@@ -21,7 +21,9 @@ - - #include <stdio.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #ifdef HAVE_STRING_H - #include <string.h> -diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c ---- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 -@@ -18,7 +18,9 @@ - - */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "filter_filename.h" - -diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c ---- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 -@@ -25,7 +25,9 @@ - #include "misc.h" - #include "lf.h" - #include "table.h" -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include "filter.h" - -diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c ---- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _INLINE_C_ - #define _INLINE_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - - #include "inline.h" -diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c ---- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 -@@ -23,7 +23,9 @@ - #include <stdarg.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - -diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c ---- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 -@@ -23,7 +23,9 @@ - #include <stdarg.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h ---- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 -@@ -21,7 +21,9 @@ - - /* Frustrating header junk */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include <stdio.h> - #include <ctype.h> -diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c ---- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _SIM_ENDIAN_C_ - #define _SIM_ENDIAN_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - -diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c ---- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 -@@ -25,7 +25,9 @@ - #include <fcntl.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" diff --git a/patches/gdb/6.8a/150-handle-stpcpy-define.patch b/patches/gdb/6.8a/150-handle-stpcpy-define.patch deleted file mode 100644 index 88d703f..0000000 --- a/patches/gdb/6.8a/150-handle-stpcpy-define.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru gdb-6.8.orig/bfd/sysdep.h gdb-6.8/bfd/sysdep.h ---- gdb-6.8.orig/bfd/sysdep.h 2007-07-03 16:26:42.000000000 +0200 -+++ gdb-6.8/bfd/sysdep.h 2011-08-21 13:33:47.000000000 +0200 -@@ -131,7 +131,7 @@ - extern PTR realloc (); - #endif - --#if !HAVE_DECL_STPCPY -+#if !HAVE_DECL_STPCPY && !defined(stpcpy) - extern char *stpcpy (char *__dest, const char *__src); - #endif - diff --git a/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch b/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch deleted file mode 100644 index f3723b5..0000000 --- a/patches/gdb/7.0.1a/100-sim-ppc-have-config-h.patch +++ /dev/null @@ -1,183 +0,0 @@ -Fix for canadian cross build of sim/ppc - -Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 - -diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in ---- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 -+++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 -@@ -61,7 +61,7 @@ - AR = @AR@ - AR_FLAGS = rc - CC = @CC@ --CFLAGS = @CFLAGS@ -+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ - BISON = bison -@@ -115,8 +115,8 @@ - $(DEVZERO_CFLAGS) - SIM_FPU_CFLAGS = @sim_fpu_cflags@ - --STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) --NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -+STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) -+NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) - BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) - - BUILD_LDFLAGS = -diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h ---- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 -@@ -86,7 +86,9 @@ - - /* Basic configuration */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "inline.h" - -diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c ---- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _DEBUG_C_ - #define _DEBUG_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c ---- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 -@@ -27,7 +27,9 @@ - #include <ctype.h> - #include <stdarg.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" -diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c ---- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 -@@ -21,7 +21,9 @@ - - #include <stdio.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #ifdef HAVE_STRING_H - #include <string.h> -diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c ---- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 -@@ -18,7 +18,9 @@ - - */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "filter_filename.h" - -diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c ---- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 -@@ -25,7 +25,9 @@ - #include "misc.h" - #include "lf.h" - #include "table.h" -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include "filter.h" - -diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c ---- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _INLINE_C_ - #define _INLINE_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - - #include "inline.h" -diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c ---- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 -@@ -23,7 +23,9 @@ - #include <stdarg.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - -diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c ---- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 -@@ -23,7 +23,9 @@ - #include <stdarg.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h ---- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 -@@ -21,7 +21,9 @@ - - /* Frustrating header junk */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include <stdio.h> - #include <ctype.h> -diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c ---- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _SIM_ENDIAN_C_ - #define _SIM_ENDIAN_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - -diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c ---- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 -@@ -25,7 +25,9 @@ - #include <fcntl.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" diff --git a/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch b/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch deleted file mode 100644 index f3723b5..0000000 --- a/patches/gdb/7.0a/100-sim-ppc-have-config-h.patch +++ /dev/null @@ -1,183 +0,0 @@ -Fix for canadian cross build of sim/ppc - -Orignal patch info see: http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638 - -diff -urN gdb-6.8-pl1/sim/ppc/Makefile.in gdb-6.8-pl2/sim/ppc/Makefile.in ---- gdb-6.8-pl1/sim/ppc/Makefile.in 2006-05-31 17:14:45.000000000 +0200 -+++ gdb-6.8-pl2/sim/ppc/Makefile.in 2008-09-30 15:56:33.000000000 +0200 -@@ -61,7 +61,7 @@ - AR = @AR@ - AR_FLAGS = rc - CC = @CC@ --CFLAGS = @CFLAGS@ -+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H - CC_FOR_BUILD = @CC_FOR_BUILD@ - CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ - BISON = bison -@@ -115,8 +115,8 @@ - $(DEVZERO_CFLAGS) - SIM_FPU_CFLAGS = @sim_fpu_cflags@ - --STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) --NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -+STD_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) -+NOWARN_CFLAGS = $(CFLAGS) -DHAVE_CONFIG_H $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) - BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) - - BUILD_LDFLAGS = -diff -urN gdb-6.8-orig/sim/ppc/basics.h gdb-6.8-pl1/sim/ppc/basics.h ---- gdb-6.8-orig/sim/ppc/basics.h 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/basics.h 2008-09-30 15:12:32.000000000 +0200 -@@ -86,7 +86,9 @@ - - /* Basic configuration */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "inline.h" - -diff -urN gdb-6.8-orig/sim/ppc/debug.c gdb-6.8-pl1/sim/ppc/debug.c ---- gdb-6.8-orig/sim/ppc/debug.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/debug.c 2008-09-30 15:12:27.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _DEBUG_C_ - #define _DEBUG_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/dgen.c gdb-6.8-pl1/sim/ppc/dgen.c ---- gdb-6.8-orig/sim/ppc/dgen.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/dgen.c 2008-09-30 15:12:22.000000000 +0200 -@@ -27,7 +27,9 @@ - #include <ctype.h> - #include <stdarg.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" -diff -urN gdb-6.8-orig/sim/ppc/filter.c gdb-6.8-pl1/sim/ppc/filter.c ---- gdb-6.8-orig/sim/ppc/filter.c 1999-04-16 03:35:09.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter.c 2008-09-30 15:12:15.000000000 +0200 -@@ -21,7 +21,9 @@ - - #include <stdio.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #ifdef HAVE_STRING_H - #include <string.h> -diff -urN gdb-6.8-orig/sim/ppc/filter_filename.c gdb-6.8-pl1/sim/ppc/filter_filename.c ---- gdb-6.8-orig/sim/ppc/filter_filename.c 1999-04-16 03:35:08.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/filter_filename.c 2008-09-30 15:12:11.000000000 +0200 -@@ -18,7 +18,9 @@ - - */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - #include "filter_filename.h" - -diff -urN gdb-6.8-orig/sim/ppc/igen.c gdb-6.8-pl1/sim/ppc/igen.c ---- gdb-6.8-orig/sim/ppc/igen.c 2003-06-20 05:59:33.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/igen.c 2008-09-30 15:12:06.000000000 +0200 -@@ -25,7 +25,9 @@ - #include "misc.h" - #include "lf.h" - #include "table.h" -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include "filter.h" - -diff -urN gdb-6.8-orig/sim/ppc/inline.c gdb-6.8-pl1/sim/ppc/inline.c ---- gdb-6.8-orig/sim/ppc/inline.c 1999-04-16 03:35:10.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/inline.c 2008-09-30 15:11:58.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _INLINE_C_ - #define _INLINE_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "ppc-config.h" - - #include "inline.h" -diff -urN gdb-6.8-orig/sim/ppc/lf.c gdb-6.8-pl1/sim/ppc/lf.c ---- gdb-6.8-orig/sim/ppc/lf.c 2002-05-30 17:07:06.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/lf.c 2008-09-30 15:33:35.000000000 +0200 -@@ -23,7 +23,9 @@ - #include <stdarg.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - -diff -urN gdb-6.8-orig/sim/ppc/misc.c gdb-6.8-pl1/sim/ppc/misc.c ---- gdb-6.8-orig/sim/ppc/misc.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/misc.c 2008-09-30 15:11:54.000000000 +0200 -@@ -23,7 +23,9 @@ - #include <stdarg.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - - #ifdef HAVE_STDLIB_H -diff -urN gdb-6.8-orig/sim/ppc/misc.h gdb-6.8-pl1/sim/ppc/misc.h ---- gdb-6.8-orig/sim/ppc/misc.h 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/misc.h 2008-09-30 15:11:49.000000000 +0200 -@@ -21,7 +21,9 @@ - - /* Frustrating header junk */ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - - #include <stdio.h> - #include <ctype.h> -diff -urN gdb-6.8-orig/sim/ppc/sim-endian.c gdb-6.8-pl1/sim/ppc/sim-endian.c ---- gdb-6.8-orig/sim/ppc/sim-endian.c 1999-04-16 03:35:11.000000000 +0200 -+++ gdb-6.8-pl1/sim/ppc/sim-endian.c 2008-09-30 15:11:44.000000000 +0200 -@@ -22,7 +22,9 @@ - #ifndef _SIM_ENDIAN_C_ - #define _SIM_ENDIAN_C_ - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "basics.h" - - -diff -urN gdb-6.8-orig/sim/ppc/table.c gdb-6.8-pl1/sim/ppc/table.c ---- gdb-6.8-orig/sim/ppc/table.c 2002-01-12 11:21:12.000000000 +0100 -+++ gdb-6.8-pl1/sim/ppc/table.c 2008-09-30 15:11:38.000000000 +0200 -@@ -25,7 +25,9 @@ - #include <fcntl.h> - #include <ctype.h> - -+#ifdef HAVE_CONFIG_H - #include "config.h" -+#endif - #include "misc.h" - #include "lf.h" - #include "table.h" diff --git a/patches/gdb/7.10.1/100-musl_fix.patch b/patches/gdb/7.10.1/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/patches/gdb/7.10.1/100-musl_fix.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -73,6 +74,10 @@ - #define SPUFS_MAGIC 0x23c9b64e - #endif - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ diff --git a/patches/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/patches/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch deleted file mode 100644 index 1182a45..0000000 --- a/patches/gdb/7.10.1/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7f8c0d8984bf5754807d3bb543cbc3ffc634e9e4 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sat, 30 May 2015 13:00:32 +0300 -Subject: [PATCH] xtensa: initialize call_abi in xtensa_tdep - -Use XSHAL_ABI value provided by xtensa-config.h to correctly initialize -xtensa_tdep.call_abi -This fixes calls to functions from GDB that otherwise fail with the -following assertion in call0 configuration: - - gdb/regcache.c:602: internal-error: regcache_raw_read: Assertion - `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed. - -gdb/ - * xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize - call_abi using XSHAL_ABI macro. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h -index adacaf8..3b6ea66 100644 ---- a/gdb/xtensa-tdep.h -+++ b/gdb/xtensa-tdep.h -@@ -246,7 +246,8 @@ struct gdbarch_tdep - .spill_location = -1, \ - .spill_size = (spillsz), \ - .unused = 0, \ -- .call_abi = 0, \ -+ .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0) ? \ -+ CallAbiCall0Only : CallAbiDefault, \ - .debug_interrupt_level = XCHAL_DEBUGLEVEL, \ - .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \ - .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \ --- -1.8.1.4 - diff --git a/patches/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/patches/gdb/7.10.1/111-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 22:43:49 +0300 -Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized - -ar_base is uninitialized for cores w/o windowed registers as their -regmap doesn't have register 0x0100. -Check that ar_base is initialized and if not initialize it with a0_base. - -gdb/ - * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is - initialized. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 55e7d98..41f5ec1 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) - tdep->num_regs = n; - } - -+ if (tdep->ar_base == -1) -+ tdep->ar_base = tdep->a0_base; -+ - /* Number of pseudo registers. */ - tdep->num_pseudo_regs = n - tdep->num_regs; - --- -1.8.1.4 - diff --git a/patches/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/patches/gdb/7.10.1/112-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 23:15:39 +0300 -Subject: [PATCH] WIP: *end of prologue* detection hack - -see - http://www.esp8266.com/viewtopic.php?p=18461#p18461 - http://www.esp8266.com/viewtopic.php?p=19026#p19026 - http://www.esp8266.com/viewtopic.php?p=19683#p19683 - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 41f5ec1..6a7dba7 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, - /* Find out, if we have an information about the prologue from DWARF. */ - prologue_sal = find_pc_line (start, 0); - if (prologue_sal.line != 0) /* Found debug info. */ -- body_pc = prologue_sal.end; -+ body_pc = prologue_sal.end + 40; - - /* If we are going to analyze the prologue in general without knowing about - the current PC, make the best assumtion for the end of the prologue. */ --- -1.8.1.4 - diff --git a/patches/gdb/7.10/10-setns-handling.patch b/patches/gdb/7.10/10-setns-handling.patch deleted file mode 100644 index e2647ad..0000000 --- a/patches/gdb/7.10/10-setns-handling.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 99fe86f7999afd2743b08c550b10f083ae4bd9bd Mon Sep 17 00:00:00 2001 -From: Peter Bergner <bergner@vnet.ibm.com> -Date: Tue, 14 Jul 2015 10:46:16 -0500 -Subject: [PATCH] Fix build issue with nat/linux-namespaces.c. - - * nat/linux-namespaces.c (setns): Rename from this ... - (do_setns): ... to this. Support calling setns if it exists. - (mnsh_handle_setns): Call do_setns. ---- - gdb/ChangeLog | 6 ++++++ - gdb/nat/linux-namespaces.c | 12 ++++++------ - 2 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c -index a7a3e4d..fd0d4b0 100644 ---- a/gdb/nat/linux-namespaces.c -+++ b/gdb/nat/linux-namespaces.c -@@ -34,18 +34,18 @@ int debug_linux_namespaces; - - /* Handle systems without setns. */ - --#ifndef HAVE_SETNS --static int --setns (int fd, int nstype) -+static inline int -+do_setns (int fd, int nstype) - { --#ifdef __NR_setns -+#ifdef HAVE_SETNS -+ return setns (fd, nstype); -+#elif defined __NR_setns - return syscall (__NR_setns, fd, nstype); - #else - errno = ENOSYS; - return -1; - #endif - } --#endif - - /* Handle systems without MSG_CMSG_CLOEXEC. */ - -@@ -495,7 +495,7 @@ mnsh_recv_message (int sock, enum mnsh_msg_type *type, - static ssize_t - mnsh_handle_setns (int sock, int fd, int nstype) - { -- int result = setns (fd, nstype); -+ int result = do_setns (fd, nstype); - - return mnsh_return_int (sock, result, errno); - } --- -1.9.4 diff --git a/patches/gdb/7.10/100-musl_fix.patch b/patches/gdb/7.10/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/patches/gdb/7.10/100-musl_fix.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -73,6 +74,10 @@ - #define SPUFS_MAGIC 0x23c9b64e - #endif - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ diff --git a/patches/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/patches/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch deleted file mode 100644 index 1182a45..0000000 --- a/patches/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 7f8c0d8984bf5754807d3bb543cbc3ffc634e9e4 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sat, 30 May 2015 13:00:32 +0300 -Subject: [PATCH] xtensa: initialize call_abi in xtensa_tdep - -Use XSHAL_ABI value provided by xtensa-config.h to correctly initialize -xtensa_tdep.call_abi -This fixes calls to functions from GDB that otherwise fail with the -following assertion in call0 configuration: - - gdb/regcache.c:602: internal-error: regcache_raw_read: Assertion - `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed. - -gdb/ - * xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize - call_abi using XSHAL_ABI macro. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h -index adacaf8..3b6ea66 100644 ---- a/gdb/xtensa-tdep.h -+++ b/gdb/xtensa-tdep.h -@@ -246,7 +246,8 @@ struct gdbarch_tdep - .spill_location = -1, \ - .spill_size = (spillsz), \ - .unused = 0, \ -- .call_abi = 0, \ -+ .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0) ? \ -+ CallAbiCall0Only : CallAbiDefault, \ - .debug_interrupt_level = XCHAL_DEBUGLEVEL, \ - .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \ - .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \ --- -1.8.1.4 - diff --git a/patches/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/patches/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 22:43:49 +0300 -Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized - -ar_base is uninitialized for cores w/o windowed registers as their -regmap doesn't have register 0x0100. -Check that ar_base is initialized and if not initialize it with a0_base. - -gdb/ - * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is - initialized. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 55e7d98..41f5ec1 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) - tdep->num_regs = n; - } - -+ if (tdep->ar_base == -1) -+ tdep->ar_base = tdep->a0_base; -+ - /* Number of pseudo registers. */ - tdep->num_pseudo_regs = n - tdep->num_regs; - --- -1.8.1.4 - diff --git a/patches/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/patches/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 23:15:39 +0300 -Subject: [PATCH] WIP: *end of prologue* detection hack - -see - http://www.esp8266.com/viewtopic.php?p=18461#p18461 - http://www.esp8266.com/viewtopic.php?p=19026#p19026 - http://www.esp8266.com/viewtopic.php?p=19683#p19683 - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 41f5ec1..6a7dba7 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, - /* Find out, if we have an information about the prologue from DWARF. */ - prologue_sal = find_pc_line (start, 0); - if (prologue_sal.line != 0) /* Found debug info. */ -- body_pc = prologue_sal.end; -+ body_pc = prologue_sal.end + 40; - - /* If we are going to analyze the prologue in general without knowing about - the current PC, make the best assumtion for the end of the prologue. */ --- -1.8.1.4 - diff --git a/patches/gdb/7.11.1/100-musl_fix.patch b/patches/gdb/7.11.1/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/patches/gdb/7.11.1/100-musl_fix.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -73,6 +74,10 @@ - #define SPUFS_MAGIC 0x23c9b64e - #endif - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ diff --git a/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch b/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch deleted file mode 100644 index ff59907..0000000 --- a/patches/gdb/7.11.1/101-uclibc-no-gettimeofday-clobber.patch +++ /dev/null @@ -1,20 +0,0 @@ -Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise. - -This patch helps building x86_64-unknown-linux-uclibc toolchains, the final -gdb-native step otherwise fails when linking the libinproctrace.so - -Signed-off-by: Joachim Nilsson <troglobit@gmail.com> - ---- a/gdb/gnulib/configure 2016-02-25 18:17:04.145903807 +0100 -+++ b/gdb/gnulib/configure 2016-02-25 18:17:28.545903821 +0100 -@@ -13520,8 +13520,9 @@ - if test "$cross_compiling" = yes; then : - # When cross-compiling: - case "$host_os" in -- # Guess all is fine on glibc systems. -+ # Guess all is fine on glibc/uclibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac diff --git a/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/patches/gdb/7.11.1/111-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 22:43:49 +0300 -Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized - -ar_base is uninitialized for cores w/o windowed registers as their -regmap doesn't have register 0x0100. -Check that ar_base is initialized and if not initialize it with a0_base. - -gdb/ - * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is - initialized. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 55e7d98..41f5ec1 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) - tdep->num_regs = n; - } - -+ if (tdep->ar_base == -1) -+ tdep->ar_base = tdep->a0_base; -+ - /* Number of pseudo registers. */ - tdep->num_pseudo_regs = n - tdep->num_regs; - --- -1.8.1.4 - diff --git a/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/patches/gdb/7.11.1/112-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 23:15:39 +0300 -Subject: [PATCH] WIP: *end of prologue* detection hack - -see - http://www.esp8266.com/viewtopic.php?p=18461#p18461 - http://www.esp8266.com/viewtopic.php?p=19026#p19026 - http://www.esp8266.com/viewtopic.php?p=19683#p19683 - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 41f5ec1..6a7dba7 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, - /* Find out, if we have an information about the prologue from DWARF. */ - prologue_sal = find_pc_line (start, 0); - if (prologue_sal.line != 0) /* Found debug info. */ -- body_pc = prologue_sal.end; -+ body_pc = prologue_sal.end + 40; - - /* If we are going to analyze the prologue in general without knowing about - the current PC, make the best assumtion for the end of the prologue. */ --- -1.8.1.4 - diff --git a/patches/gdb/7.12.1/100-musl_fix.patch b/patches/gdb/7.12.1/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/patches/gdb/7.12.1/100-musl_fix.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -73,6 +74,10 @@ - #define SPUFS_MAGIC 0x23c9b64e - #endif - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ diff --git a/patches/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch b/patches/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch deleted file mode 100644 index cd7a4c6..0000000 --- a/patches/gdb/7.12.1/101-uclibc-no-gettimeofday-clobber.patch +++ /dev/null @@ -1,30 +0,0 @@ -Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise. - -This patch helps building x86_64-unknown-linux-uclibc toolchains, the final -gdb-native step otherwise fails when linking the libinproctrace.so - -Signed-off-by: Joachim Nilsson <troglobit@gmail.com> -Signed-off-by: Alexey Neyman <stilor@att.net> - -diff -urpN gdb-7.12.orig/gdb/gnulib/configure gdb-7.12/gdb/gnulib/configure ---- gdb-7.12.orig/gdb/gnulib/configure 2017-01-13 13:42:11.773027566 -0800 -+++ gdb-7.12/gdb/gnulib/configure 2017-01-13 13:44:32.518082618 -0800 -@@ -13522,6 +13522,7 @@ else - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac -diff -urpN gdb-7.12.orig/gdb/gnulib/import/m4/gettimeofday.m4 gdb-7.12/gdb/gnulib/import/m4/gettimeofday.m4 ---- gdb-7.12.orig/gdb/gnulib/import/m4/gettimeofday.m4 2017-01-13 13:42:11.777027595 -0800 -+++ gdb-7.12/gdb/gnulib/import/m4/gettimeofday.m4 2017-01-13 13:43:55.781797640 -0800 -@@ -111,6 +111,7 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac diff --git a/patches/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/patches/gdb/7.12.1/111-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 22:43:49 +0300 -Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized - -ar_base is uninitialized for cores w/o windowed registers as their -regmap doesn't have register 0x0100. -Check that ar_base is initialized and if not initialize it with a0_base. - -gdb/ - * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is - initialized. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 55e7d98..41f5ec1 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) - tdep->num_regs = n; - } - -+ if (tdep->ar_base == -1) -+ tdep->ar_base = tdep->a0_base; -+ - /* Number of pseudo registers. */ - tdep->num_pseudo_regs = n - tdep->num_regs; - --- -1.8.1.4 - diff --git a/patches/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/patches/gdb/7.12.1/112-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 23:15:39 +0300 -Subject: [PATCH] WIP: *end of prologue* detection hack - -see - http://www.esp8266.com/viewtopic.php?p=18461#p18461 - http://www.esp8266.com/viewtopic.php?p=19026#p19026 - http://www.esp8266.com/viewtopic.php?p=19683#p19683 - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 41f5ec1..6a7dba7 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, - /* Find out, if we have an information about the prologue from DWARF. */ - prologue_sal = find_pc_line (start, 0); - if (prologue_sal.line != 0) /* Found debug info. */ -- body_pc = prologue_sal.end; -+ body_pc = prologue_sal.end + 40; - - /* If we are going to analyze the prologue in general without knowing about - the current PC, make the best assumtion for the end of the prologue. */ --- -1.8.1.4 - diff --git a/patches/gdb/7.12.1/200-allow-android.patch b/patches/gdb/7.12.1/200-allow-android.patch deleted file mode 100644 index 7954477..0000000 --- a/patches/gdb/7.12.1/200-allow-android.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -urpN gdb-7.12.1.orig/gdb/gdbserver/configure gdb-7.12.1/gdb/gdbserver/configure ---- gdb-7.12.1.orig/gdb/gdbserver/configure 2017-05-14 17:02:46.742711695 -0700 -+++ gdb-7.12.1/gdb/gdbserver/configure 2017-05-14 17:03:22.147058607 -0700 -@@ -6671,17 +6671,6 @@ fi - - - case "${target}" in -- *-android*) -- # Starting with NDK version 9, <elf.h> actually includes definitions -- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes -- # <sys/exec_elf.h> which defines some of the ELF types incorrectly, -- # leading to conflicts with the defintions from <linux/elf.h>. -- # This makes it impossible for us to include both <elf.h> and -- # <linux/elf.h>, which means that, in practice, we do not have -- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. -- # Therefore, do not try to auto-detect availability, as it would -- # get it wrong on this platform. -- ;; - *) - ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h> - -diff -urpN gdb-7.12.1.orig/gdb/gdbserver/configure.ac gdb-7.12.1/gdb/gdbserver/configure.ac ---- gdb-7.12.1.orig/gdb/gdbserver/configure.ac 2017-05-14 17:02:46.742711695 -0700 -+++ gdb-7.12.1/gdb/gdbserver/configure.ac 2017-05-14 17:03:53.219361720 -0700 -@@ -179,17 +179,6 @@ AC_CHECK_TYPES(socklen_t, [], [], - ]) - - case "${target}" in -- *-android*) -- # Starting with NDK version 9, <elf.h> actually includes definitions -- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes -- # <sys/exec_elf.h> which defines some of the ELF types incorrectly, -- # leading to conflicts with the defintions from <linux/elf.h>. -- # This makes it impossible for us to include both <elf.h> and -- # <linux/elf.h>, which means that, in practice, we do not have -- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. -- # Therefore, do not try to auto-detect availability, as it would -- # get it wrong on this platform. -- ;; - *) - AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [], - #include <elf.h> diff --git a/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch b/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch deleted file mode 100644 index 6f08ef8..0000000 --- a/patches/gdb/7.2a/100-sim-ppc-lz-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix for psim build failure due to -lz - -See http://sourceware.org/bugzilla/show_bug.cgi?id=12202 - ---- gdb-7.2.orig/sim/ppc/Makefile.in -+++ gdb-7.2/sim/ppc/Makefile.in -@@ -551,7 +551,7 @@ - PACKAGE_OBJ = @sim_pk_obj@ - - --psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP) -+psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP) - $(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) - - run: psim diff --git a/patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch b/patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch deleted file mode 100644 index 81a92db..0000000 --- a/patches/gdb/7.4.1/00_all_ptrace_setsiginfo.patch +++ /dev/null @@ -1,314 +0,0 @@ -fix from upstream for building with newer kernel headers - -From a7f9ca9cb797d653dc7919538e1dfa0c26010331 Mon Sep 17 00:00:00 2001 -From: tschwinge <tschwinge> -Date: Wed, 21 Mar 2012 13:43:50 +0000 -Subject: [PATCH] struct siginfo vs. siginfo_t - -gdb/ - * amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead - of struct siginfo. - * arm-linux-nat.c (arm_linux_stopped_data_address): Likewise. - * ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise. - * linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup) - (linux_xfer_siginfo, linux_nat_set_siginfo_fixup) - (linux_nat_get_siginfo): Likewise. - * linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup) - (linux_nat_get_siginfo): Likewise. - * linux-tdep.c (linux_get_siginfo_type): Likewise. - * ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise. - * procfs.c (gdb_siginfo_t): Likewise. - -gdbserver/ - * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of - struct siginfo. - * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise. - * linux-x86-low.c (x86_siginfo_fixup): Likewise. - * linux-low.h: Include <signal.h>. - (struct siginfo): Remove forward declaration. - (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of - struct siginfo. ---- - gdb/ChangeLog | 15 +++++++++++++++ - gdb/amd64-linux-nat.c | 4 ++-- - gdb/arm-linux-nat.c | 2 +- - gdb/gdbserver/ChangeLog | 11 +++++++++++ - gdb/gdbserver/linux-arm-low.c | 2 +- - gdb/gdbserver/linux-low.c | 10 +++++----- - gdb/gdbserver/linux-low.h | 5 ++--- - gdb/gdbserver/linux-x86-low.c | 4 ++-- - gdb/ia64-linux-nat.c | 2 +- - gdb/linux-nat.c | 16 ++++++++-------- - gdb/linux-nat.h | 6 +++--- - gdb/ppc-linux-nat.c | 2 +- - gdb/procfs.c | 2 +- - 13 files changed, 53 insertions(+), 28 deletions(-) - -diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c -index f954483..5ebba3a 100644 ---- a/gdb/amd64-linux-nat.c -+++ b/gdb/amd64-linux-nat.c -@@ -731,13 +731,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) - INF. */ - - static int --amd64_linux_siginfo_fixup (struct siginfo *native, gdb_byte *inf, int direction) -+amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction) - { - /* Is the inferior 32-bit? If so, then do fixup the siginfo - object. */ - if (gdbarch_addr_bit (get_frame_arch (get_current_frame ())) == 32) - { -- gdb_assert (sizeof (struct siginfo) == sizeof (compat_siginfo_t)); -+ gdb_assert (sizeof (siginfo_t) == sizeof (compat_siginfo_t)); - - if (direction == 0) - compat_siginfo_from_siginfo ((struct compat_siginfo *) inf, native); -diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c -index c5ce21c..f9f6ba5 100644 ---- a/gdb/arm-linux-nat.c -+++ b/gdb/arm-linux-nat.c -@@ -1137,7 +1137,7 @@ arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw, - static int - arm_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p) - { -- struct siginfo *siginfo_p = linux_nat_get_siginfo (inferior_ptid); -+ siginfo_t *siginfo_p = linux_nat_get_siginfo (inferior_ptid); - int slot = siginfo_p->si_errno; - - /* This must be a hardware breakpoint. */ -diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c -index ff2437d..01208ef 100644 ---- a/gdb/gdbserver/linux-arm-low.c -+++ b/gdb/gdbserver/linux-arm-low.c -@@ -631,7 +631,7 @@ static int - arm_stopped_by_watchpoint (void) - { - struct lwp_info *lwp = get_thread_lwp (current_inferior); -- struct siginfo siginfo; -+ siginfo_t siginfo; - - /* We must be able to set hardware watchpoints. */ - if (arm_linux_get_hw_watchpoint_count () == 0) -diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c -index d2d4c1d..4734f15 100644 ---- a/gdb/gdbserver/linux-low.c -+++ b/gdb/gdbserver/linux-low.c -@@ -4779,7 +4779,7 @@ linux_qxfer_osdata (const char *annex, - layout of the inferiors' architecture. */ - - static void --siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction) -+siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction) - { - int done = 0; - -@@ -4791,9 +4791,9 @@ siginfo_fixup (struct siginfo *siginfo, void *inf_siginfo, int direction) - if (!done) - { - if (direction == 1) -- memcpy (siginfo, inf_siginfo, sizeof (struct siginfo)); -+ memcpy (siginfo, inf_siginfo, sizeof (siginfo_t)); - else -- memcpy (inf_siginfo, siginfo, sizeof (struct siginfo)); -+ memcpy (inf_siginfo, siginfo, sizeof (siginfo_t)); - } - } - -@@ -4802,8 +4802,8 @@ linux_xfer_siginfo (const char *annex, unsigned char *readbuf, - unsigned const char *writebuf, CORE_ADDR offset, int len) - { - int pid; -- struct siginfo siginfo; -- char inf_siginfo[sizeof (struct siginfo)]; -+ siginfo_t siginfo; -+ char inf_siginfo[sizeof (siginfo_t)]; - - if (current_inferior == NULL) - return -1; -diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h -index 677d261..3aeae70 100644 ---- a/gdb/gdbserver/linux-low.h -+++ b/gdb/gdbserver/linux-low.h -@@ -20,6 +20,7 @@ - #ifdef HAVE_THREAD_DB_H - #include <thread_db.h> - #endif -+#include <signal.h> - - #include "gdb_proc_service.h" - -@@ -46,8 +47,6 @@ struct regset_info - extern struct regset_info target_regsets[]; - #endif - --struct siginfo; -- - struct process_info_private - { - /* Arch-specific additions. */ -@@ -109,7 +108,7 @@ struct linux_target_ops - Returns true if any conversion was done; false otherwise. - If DIRECTION is 1, then copy from INF to NATIVE. - If DIRECTION is 0, copy from NATIVE to INF. */ -- int (*siginfo_fixup) (struct siginfo *native, void *inf, int direction); -+ int (*siginfo_fixup) (siginfo_t *native, void *inf, int direction); - - /* Hook to call when a new process is created or attached to. - If extra per-process architecture-specific data is needed, -diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c -index ed1f8a8..b466b5d 100644 ---- a/gdb/gdbserver/linux-x86-low.c -+++ b/gdb/gdbserver/linux-x86-low.c -@@ -918,13 +918,13 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) - INF. */ - - static int --x86_siginfo_fixup (struct siginfo *native, void *inf, int direction) -+x86_siginfo_fixup (siginfo_t *native, void *inf, int direction) - { - #ifdef __x86_64__ - /* Is the inferior 32-bit? If so, then fixup the siginfo object. */ - if (register_size (0) == 4) - { -- if (sizeof (struct siginfo) != sizeof (compat_siginfo_t)) -+ if (sizeof (siginfo_t) != sizeof (compat_siginfo_t)) - fatal ("unexpected difference in siginfo"); - - if (direction == 0) -diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c -index 8773195..19b827f 100644 ---- a/gdb/ia64-linux-nat.c -+++ b/gdb/ia64-linux-nat.c -@@ -637,7 +637,7 @@ static int - ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p) - { - CORE_ADDR psr; -- struct siginfo *siginfo_p; -+ siginfo_t *siginfo_p; - struct regcache *regcache = get_current_regcache (); - - siginfo_p = linux_nat_get_siginfo (inferior_ptid); -diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c -index f80c0c1..d81d55e 100644 ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -188,7 +188,7 @@ static void (*linux_nat_prepare_to_resume) (struct lwp_info *); - /* The method to call, if any, when the siginfo object needs to be - converted between the layout returned by ptrace, and the layout in - the architecture of the inferior. */ --static int (*linux_nat_siginfo_fixup) (struct siginfo *, -+static int (*linux_nat_siginfo_fixup) (siginfo_t *, - gdb_byte *, - int); - -@@ -4232,7 +4232,7 @@ linux_nat_mourn_inferior (struct target_ops *ops) - layout of the inferiors' architecture. */ - - static void --siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction) -+siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction) - { - int done = 0; - -@@ -4244,9 +4244,9 @@ siginfo_fixup (struct siginfo *siginfo, gdb_byte *inf_siginfo, int direction) - if (!done) - { - if (direction == 1) -- memcpy (siginfo, inf_siginfo, sizeof (struct siginfo)); -+ memcpy (siginfo, inf_siginfo, sizeof (siginfo_t)); - else -- memcpy (inf_siginfo, siginfo, sizeof (struct siginfo)); -+ memcpy (inf_siginfo, siginfo, sizeof (siginfo_t)); - } - } - -@@ -4256,8 +4256,8 @@ linux_xfer_siginfo (struct target_ops *ops, enum target_object object, - const gdb_byte *writebuf, ULONGEST offset, LONGEST len) - { - int pid; -- struct siginfo siginfo; -- gdb_byte inf_siginfo[sizeof (struct siginfo)]; -+ siginfo_t siginfo; -+ gdb_byte inf_siginfo[sizeof (siginfo_t)]; - - gdb_assert (object == TARGET_OBJECT_SIGNAL_INFO); - gdb_assert (readbuf || writebuf); -@@ -5266,7 +5266,7 @@ linux_nat_set_new_thread (struct target_ops *t, - inferior. */ - void - linux_nat_set_siginfo_fixup (struct target_ops *t, -- int (*siginfo_fixup) (struct siginfo *, -+ int (*siginfo_fixup) (siginfo_t *, - gdb_byte *, - int)) - { -@@ -5285,7 +5285,7 @@ linux_nat_set_prepare_to_resume (struct target_ops *t, - } - - /* Return the saved siginfo associated with PTID. */ --struct siginfo * -+siginfo_t * - linux_nat_get_siginfo (ptid_t ptid) - { - struct lwp_info *lp = find_lwp_pid (ptid); -diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h -index c9878d9..d87f0cf 100644 ---- a/gdb/linux-nat.h -+++ b/gdb/linux-nat.h -@@ -78,7 +78,7 @@ struct lwp_info - - /* Non-zero si_signo if this LWP stopped with a trap. si_addr may - be the address of a hardware watchpoint. */ -- struct siginfo siginfo; -+ siginfo_t siginfo; - - /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data - watchpoint trap. */ -@@ -184,7 +184,7 @@ void linux_nat_set_new_thread (struct target_ops *, void (*) (struct lwp_info *) - that ptrace returns, and the layout in the architecture of the - inferior. */ - void linux_nat_set_siginfo_fixup (struct target_ops *, -- int (*) (struct siginfo *, -+ int (*) (siginfo_t *, - gdb_byte *, - int)); - -@@ -198,7 +198,7 @@ void linux_nat_set_prepare_to_resume (struct target_ops *, - void linux_nat_switch_fork (ptid_t new_ptid); - - /* Return the saved siginfo associated with PTID. */ --struct siginfo *linux_nat_get_siginfo (ptid_t ptid); -+siginfo_t *linux_nat_get_siginfo (ptid_t ptid); - - /* Compute and return the processor core of a given thread. */ - int linux_nat_core_of_thread_1 (ptid_t ptid); -diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c -index 1bd157b..9bd11fd 100644 ---- a/gdb/ppc-linux-nat.c -+++ b/gdb/ppc-linux-nat.c -@@ -2218,7 +2218,7 @@ ppc_linux_thread_exit (struct thread_info *tp, int silent) - static int - ppc_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p) - { -- struct siginfo *siginfo_p; -+ siginfo_t *siginfo_p; - - siginfo_p = linux_nat_get_siginfo (inferior_ptid); - -diff --git a/gdb/procfs.c b/gdb/procfs.c -index 903621d..cb4bc7c 100644 ---- a/gdb/procfs.c -+++ b/gdb/procfs.c -@@ -266,7 +266,7 @@ typedef struct sigaction gdb_sigaction_t; - #ifdef HAVE_PR_SIGINFO64_T - typedef pr_siginfo64_t gdb_siginfo_t; - #else --typedef struct siginfo gdb_siginfo_t; -+typedef siginfo_t gdb_siginfo_t; - #endif - - /* On mips-irix, praddset and prdelset are defined in such a way that --- -1.7.9.7 - diff --git a/patches/gdb/7.4.1/05_all_readline-headers.patch b/patches/gdb/7.4.1/05_all_readline-headers.patch deleted file mode 100644 index e65adf6..0000000 --- a/patches/gdb/7.4.1/05_all_readline-headers.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/readline/complete.c -+++ b/readline/complete.c -@@ -25,6 +25,11 @@ - # include <config.h> - #endif - -+#ifdef HAVE_WCHAR_H /* wcwidth() */ -+# define _GNU_SOURCE -+# include <wchar.h> -+#endif -+ - #include <sys/types.h> - #include <fcntl.h> - #if defined (HAVE_SYS_FILE_H) ---- a/readline/display.c -+++ b/readline/display.c -@@ -25,6 +25,11 @@ - # include <config.h> - #endif - -+#ifdef HAVE_WCHAR_H /* wcwidth() */ -+# define _GNU_SOURCE -+# include <wchar.h> -+#endif -+ - #include <sys/types.h> - - #if defined (HAVE_UNISTD_H) ---- a/readline/mbutil.c -+++ b/readline/mbutil.c -@@ -25,6 +25,11 @@ - # include <config.h> - #endif - -+#ifdef HAVE_WCHAR_H /* wcwidth() */ -+# define _GNU_SOURCE -+# include <wchar.h> -+#endif -+ - #include <sys/types.h> - #include <fcntl.h> - #include "posixjmp.h" diff --git a/patches/gdb/8.0/100-musl_fix.patch b/patches/gdb/8.0/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/patches/gdb/8.0/100-musl_fix.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -73,6 +74,10 @@ - #define SPUFS_MAGIC 0x23c9b64e - #endif - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ diff --git a/patches/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch b/patches/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch deleted file mode 100644 index cd7a4c6..0000000 --- a/patches/gdb/8.0/101-uclibc-no-gettimeofday-clobber.patch +++ /dev/null @@ -1,30 +0,0 @@ -Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise. - -This patch helps building x86_64-unknown-linux-uclibc toolchains, the final -gdb-native step otherwise fails when linking the libinproctrace.so - -Signed-off-by: Joachim Nilsson <troglobit@gmail.com> -Signed-off-by: Alexey Neyman <stilor@att.net> - -diff -urpN gdb-7.12.orig/gdb/gnulib/configure gdb-7.12/gdb/gnulib/configure ---- gdb-7.12.orig/gdb/gnulib/configure 2017-01-13 13:42:11.773027566 -0800 -+++ gdb-7.12/gdb/gnulib/configure 2017-01-13 13:44:32.518082618 -0800 -@@ -13522,6 +13522,7 @@ else - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac -diff -urpN gdb-7.12.orig/gdb/gnulib/import/m4/gettimeofday.m4 gdb-7.12/gdb/gnulib/import/m4/gettimeofday.m4 ---- gdb-7.12.orig/gdb/gnulib/import/m4/gettimeofday.m4 2017-01-13 13:42:11.777027595 -0800 -+++ gdb-7.12/gdb/gnulib/import/m4/gettimeofday.m4 2017-01-13 13:43:55.781797640 -0800 -@@ -111,6 +111,7 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], - case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; -+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; - esac diff --git a/patches/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/patches/gdb/8.0/111-xtensa-make-sure-ar_base-is-initialized.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 22:43:49 +0300 -Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized - -ar_base is uninitialized for cores w/o windowed registers as their -regmap doesn't have register 0x0100. -Check that ar_base is initialized and if not initialize it with a0_base. - -gdb/ - * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is - initialized. - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 55e7d98..41f5ec1 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep) - tdep->num_regs = n; - } - -+ if (tdep->ar_base == -1) -+ tdep->ar_base = tdep->a0_base; -+ - /* Number of pseudo registers. */ - tdep->num_pseudo_regs = n - tdep->num_regs; - --- -1.8.1.4 - diff --git a/patches/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch b/patches/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/patches/gdb/8.0/112-WIP-end-of-prologue-detection-hack.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001 -From: Max Filippov <jcmvbkbc@gmail.com> -Date: Sun, 7 Jun 2015 23:15:39 +0300 -Subject: [PATCH] WIP: *end of prologue* detection hack - -see - http://www.esp8266.com/viewtopic.php?p=18461#p18461 - http://www.esp8266.com/viewtopic.php?p=19026#p19026 - http://www.esp8266.com/viewtopic.php?p=19683#p19683 - -Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> ---- - gdb/xtensa-tdep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c -index 41f5ec1..6a7dba7 100644 ---- a/gdb/xtensa-tdep.c -+++ b/gdb/xtensa-tdep.c -@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch, - /* Find out, if we have an information about the prologue from DWARF. */ - prologue_sal = find_pc_line (start, 0); - if (prologue_sal.line != 0) /* Found debug info. */ -- body_pc = prologue_sal.end; -+ body_pc = prologue_sal.end + 40; - - /* If we are going to analyze the prologue in general without knowing about - the current PC, make the best assumtion for the end of the prologue. */ --- -1.8.1.4 - diff --git a/patches/gdb/8.0/200-allow-android.patch b/patches/gdb/8.0/200-allow-android.patch deleted file mode 100644 index 7954477..0000000 --- a/patches/gdb/8.0/200-allow-android.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -urpN gdb-7.12.1.orig/gdb/gdbserver/configure gdb-7.12.1/gdb/gdbserver/configure ---- gdb-7.12.1.orig/gdb/gdbserver/configure 2017-05-14 17:02:46.742711695 -0700 -+++ gdb-7.12.1/gdb/gdbserver/configure 2017-05-14 17:03:22.147058607 -0700 -@@ -6671,17 +6671,6 @@ fi - - - case "${target}" in -- *-android*) -- # Starting with NDK version 9, <elf.h> actually includes definitions -- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes -- # <sys/exec_elf.h> which defines some of the ELF types incorrectly, -- # leading to conflicts with the defintions from <linux/elf.h>. -- # This makes it impossible for us to include both <elf.h> and -- # <linux/elf.h>, which means that, in practice, we do not have -- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. -- # Therefore, do not try to auto-detect availability, as it would -- # get it wrong on this platform. -- ;; - *) - ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h> - -diff -urpN gdb-7.12.1.orig/gdb/gdbserver/configure.ac gdb-7.12.1/gdb/gdbserver/configure.ac ---- gdb-7.12.1.orig/gdb/gdbserver/configure.ac 2017-05-14 17:02:46.742711695 -0700 -+++ gdb-7.12.1/gdb/gdbserver/configure.ac 2017-05-14 17:03:53.219361720 -0700 -@@ -179,17 +179,6 @@ AC_CHECK_TYPES(socklen_t, [], [], - ]) - - case "${target}" in -- *-android*) -- # Starting with NDK version 9, <elf.h> actually includes definitions -- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, <elf.h> includes -- # <sys/exec_elf.h> which defines some of the ELF types incorrectly, -- # leading to conflicts with the defintions from <linux/elf.h>. -- # This makes it impossible for us to include both <elf.h> and -- # <linux/elf.h>, which means that, in practice, we do not have -- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. -- # Therefore, do not try to auto-detect availability, as it would -- # get it wrong on this platform. -- ;; - *) - AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [], - #include <elf.h> diff --git a/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch b/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch deleted file mode 100644 index dacdfb1..0000000 --- a/patches/gettext/0.19.7/110-Fix-linker-error-redefinition-of-vasprintf.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a76649dae62768d0af7017b3fc0ca5f891588c78 Mon Sep 17 00:00:00 2001 -From: Andoni Morales Alastruey <ylatuya@gmail.com> -Date: Wed, 29 Feb 2012 10:44:43 +0100 -Subject: [PATCH] Fix linker error: redefinition of vasprintf - -This might not be the best patch, but it works for us -The link error was: -.libs/autosprintf.o:autosprintf.cc:(.text$vasprintf[_vasprintf]+0x0): multiple definition of `_vasprintf' -.libs/lib-asprintf.o:lib-asprintf.c:(.text+0x4621): first defined here ---- - gettext-runtime/libasprintf/autosprintf.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gettext-runtime/libasprintf/autosprintf.cc b/gettext-runtime/libasprintf/autosprintf.cc -index ca318f7..2526210 100644 ---- a/gettext-runtime/libasprintf/autosprintf.cc -+++ b/gettext-runtime/libasprintf/autosprintf.cc -@@ -19,8 +19,10 @@ - This must come before <config.h> because <config.h> may include - <features.h>, and once <features.h> has been included, it's too late. */ - #ifndef _GNU_SOURCE -+#ifndef _WIN32 - # define _GNU_SOURCE 1 - #endif -+#endif - - /* Specification. */ - #include "autosprintf.h" --- -1.8.4 - diff --git a/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch b/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch deleted file mode 100644 index 4624cb5..0000000 --- a/patches/gettext/0.19.7/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch +++ /dev/null @@ -1,369 +0,0 @@ -From d4ecf6f15ad7a428786df2efdc88b03be0a4fdbb Mon Sep 17 00:00:00 2001 -From: Daiki Ueno <ueno@gnu.org> -Date: Thu, 17 Jan 2013 18:33:40 +0900 -Subject: [PATCH] Fix Woe32 link errors when compiling with -O0. - ---- - gettext-tools/src/Makefile.am | 24 ++++++++++++++++++++++-- - gettext-tools/src/color.c | 1 + - gettext-tools/woe32dll/c++color.cc | 1 + - gettext-tools/woe32dll/c++file-ostream.cc | 2 ++ - gettext-tools/woe32dll/c++html-ostream.cc | 1 + - gettext-tools/woe32dll/c++styled-ostream.cc | 1 + - gettext-tools/woe32dll/c++term-ostream.cc | 1 + - gettext-tools/woe32dll/c++write-catalog.cc | 1 + - gettext-tools/woe32dll/c++write-po.cc | 1 + - gettext-tools/woe32dll/c++write-properties.cc | 1 + - gettext-tools/woe32dll/c++write-stringtable.cc | 1 + - gnulib-local/modules/file-ostream | 4 ++++ - gnulib-local/modules/html-ostream | 4 ++++ - gnulib-local/modules/ostream | 4 ++++ - gnulib-local/modules/styled-ostream | 4 ++++ - gnulib-local/modules/term-ostream | 4 ++++ - 16 files changed, 53 insertions(+), 2 deletions(-) - create mode 100644 gettext-tools/woe32dll/c++color.cc - create mode 100644 gettext-tools/woe32dll/c++file-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++html-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++styled-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++term-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++write-catalog.cc - create mode 100644 gettext-tools/woe32dll/c++write-po.cc - create mode 100644 gettext-tools/woe32dll/c++write-properties.cc - create mode 100644 gettext-tools/woe32dll/c++write-stringtable.cc - -Additional fix (COLOR_SOURCE) by Ray Donnelly <mingw.android@gmail.com> - -diff -urN a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am ---- a/gettext-tools/src/Makefile.am 2015-09-11 01:54:21.000000000 +0100 -+++ b/gettext-tools/src/Makefile.am 2015-10-22 00:41:49.601786700 +0100 -@@ -145,10 +145,26 @@ - format-lua.c \ - format-javascript.c - -+if !WOE32DLL -+COLOR_SOURCE = color.c -+OUTPUT_SOURCE = \ -+ write-catalog.c \ -+ write-properties.c \ -+ write-stringtable.c \ -+ write-po.c -+else -+COLOR_SOURCE = ../woe32dll/c++color.cc -+OUTPUT_SOURCE = \ -+ ../woe32dll/c++write-catalog.cc \ -+ ../woe32dll/c++write-properties.cc \ -+ ../woe32dll/c++write-stringtable.cc \ -+ ../woe32dll/c++write-po.cc -+endif -+ - # libgettextsrc contains all code that is needed by at least two programs. - libgettextsrc_la_SOURCES = \ - $(COMMON_SOURCE) read-catalog.c \ --color.c write-catalog.c write-properties.c write-stringtable.c write-po.c \ -+$(COLOR_SOURCE) $(OUTPUT_SOURCE) \ - msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \ - msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \ - plural-table.c quote.h sentence.h sentence.c \ -diff -urN a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in ---- a/gettext-tools/src/Makefile.in 2015-09-11 04:05:11.000000000 +0100 -+++ b/gettext-tools/src/Makefile.in 2015-10-22 00:42:26.253852000 +0100 -@@ -387,19 +387,22 @@ - am__libgettextsrc_la_SOURCES_DIST = message.c po-error.c po-xerror.c \ - read-catalog-abstract.c po-lex.c po-gram-gen.y po-charset.c \ - read-po.c read-properties.c read-stringtable.c open-catalog.c \ -- dir-list.c str-list.c read-catalog.c color.c write-catalog.c \ -- write-properties.c write-stringtable.c write-po.c msgl-ascii.c \ -- msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c \ -- msgl-english.c msgl-check.c file-list.c msgl-charset.c \ -- po-time.c plural-exp.c plural-eval.c plural-table.c quote.h \ -- sentence.h sentence.c format.c format-invalid.h format-c.c \ -- format-c-parse.h format-sh.c format-python.c \ -- format-python-brace.c format-lisp.c format-elisp.c \ -- format-librep.c format-scheme.c format-java.c format-csharp.c \ -- format-awk.c format-pascal.c format-ycp.c format-tcl.c \ -- format-perl.c format-perl-brace.c format-php.c \ -- format-gcc-internal.c format-gfc-internal.c format-qt.c \ -- format-qt-plural.c format-kde.c format-kde-kuit.c \ -+ dir-list.c str-list.c read-catalog.c color.c \ -+ ../woe32dll/c++color.cc write-catalog.c write-properties.c \ -+ write-stringtable.c write-po.c ../woe32dll/c++write-catalog.cc \ -+ ../woe32dll/c++write-properties.cc \ -+ ../woe32dll/c++write-stringtable.cc ../woe32dll/c++write-po.cc \ -+ msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c \ -+ msgl-header.c msgl-english.c msgl-check.c file-list.c \ -+ msgl-charset.c po-time.c plural-exp.c plural-eval.c \ -+ plural-table.c quote.h sentence.h sentence.c \ -+ format.c format-invalid.h format-c.c format-c-parse.h \ -+ format-sh.c format-python.c format-python-brace.c \ -+ format-lisp.c format-elisp.c format-librep.c format-scheme.c \ -+ format-java.c format-csharp.c format-awk.c format-pascal.c \ -+ format-ycp.c format-tcl.c format-perl.c format-perl-brace.c \ -+ format-php.c format-gcc-internal.c format-gfc-internal.c \ -+ format-qt.c format-qt-plural.c format-kde.c format-kde-kuit.c \ - format-boost.c format-lua.c format-javascript.c \ - ../woe32dll/c++format.cc read-desktop.c locating-rule.c its.c \ - ../woe32dll/gettextsrc-exports.c -@@ -413,7 +416,18 @@ - libgettextsrc_la-open-catalog.lo libgettextsrc_la-dir-list.lo \ - libgettextsrc_la-str-list.lo - am__dirstamp = $(am__leading_dot)dirstamp --@WOE32DLL_FALSE@am__objects_2 = libgettextsrc_la-format.lo \ -+@WOE32DLL_FALSE@am__objects_2 = libgettextsrc_la-color.lo -+@WOE32DLL_TRUE@am__objects_2 = \ -+@WOE32DLL_TRUE@ ../woe32dll/libgettextsrc_la-c++color.lo -+@WOE32DLL_FALSE@am__objects_3 = libgettextsrc_la-write-catalog.lo \ -+@WOE32DLL_FALSE@ libgettextsrc_la-write-properties.lo \ -+@WOE32DLL_FALSE@ libgettextsrc_la-write-stringtable.lo \ -+@WOE32DLL_FALSE@ libgettextsrc_la-write-po.lo -+@WOE32DLL_TRUE@am__objects_3 = ../woe32dll/libgettextsrc_la-c++write-catalog.lo \ -+@WOE32DLL_TRUE@ ../woe32dll/libgettextsrc_la-c++write-properties.lo \ -+@WOE32DLL_TRUE@ ../woe32dll/libgettextsrc_la-c++write-stringtable.lo \ -+@WOE32DLL_TRUE@ ../woe32dll/libgettextsrc_la-c++write-po.lo -+@WOE32DLL_FALSE@am__objects_4 = libgettextsrc_la-format.lo \ - @WOE32DLL_FALSE@ libgettextsrc_la-format-c.lo \ - @WOE32DLL_FALSE@ libgettextsrc_la-format-sh.lo \ - @WOE32DLL_FALSE@ libgettextsrc_la-format-python.lo \ -@@ -440,7 +454,7 @@ - @WOE32DLL_FALSE@ libgettextsrc_la-format-boost.lo \ - @WOE32DLL_FALSE@ libgettextsrc_la-format-lua.lo \ - @WOE32DLL_FALSE@ libgettextsrc_la-format-javascript.lo --@WOE32DLL_TRUE@am__objects_2 = \ -+@WOE32DLL_TRUE@am__objects_4 = \ - @WOE32DLL_TRUE@ ../woe32dll/libgettextsrc_la-c++format.lo \ - @WOE32DLL_TRUE@ libgettextsrc_la-format-c.lo \ - @WOE32DLL_TRUE@ libgettextsrc_la-format-sh.lo \ -@@ -468,13 +482,10 @@ - @WOE32DLL_TRUE@ libgettextsrc_la-format-boost.lo \ - @WOE32DLL_TRUE@ libgettextsrc_la-format-lua.lo \ - @WOE32DLL_TRUE@ libgettextsrc_la-format-javascript.lo --@WOE32DLL_TRUE@am__objects_3 = ../woe32dll/libgettextsrc_la-gettextsrc-exports.lo -+@WOE32DLL_TRUE@am__objects_5 = ../woe32dll/libgettextsrc_la-gettextsrc-exports.lo - am_libgettextsrc_la_OBJECTS = $(am__objects_1) \ -- libgettextsrc_la-read-catalog.lo libgettextsrc_la-color.lo \ -- libgettextsrc_la-write-catalog.lo \ -- libgettextsrc_la-write-properties.lo \ -- libgettextsrc_la-write-stringtable.lo \ -- libgettextsrc_la-write-po.lo libgettextsrc_la-msgl-ascii.lo \ -+ libgettextsrc_la-read-catalog.lo $(am__objects_2) \ -+ $(am__objects_3) libgettextsrc_la-msgl-ascii.lo \ - libgettextsrc_la-msgl-iconv.lo libgettextsrc_la-msgl-equal.lo \ - libgettextsrc_la-msgl-cat.lo libgettextsrc_la-msgl-header.lo \ - libgettextsrc_la-msgl-english.lo \ -@@ -482,9 +493,9 @@ - libgettextsrc_la-msgl-charset.lo libgettextsrc_la-po-time.lo \ - libgettextsrc_la-plural-exp.lo libgettextsrc_la-plural-eval.lo \ - libgettextsrc_la-plural-table.lo libgettextsrc_la-sentence.lo \ -- $(am__objects_2) libgettextsrc_la-read-desktop.lo \ -+ $(am__objects_4) libgettextsrc_la-read-desktop.lo \ - libgettextsrc_la-locating-rule.lo libgettextsrc_la-its.lo \ -- $(am__objects_3) -+ $(am__objects_5) - libgettextsrc_la_OBJECTS = $(am_libgettextsrc_la_OBJECTS) - PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) - am_cldr_plurals_OBJECTS = cldr_plurals-cldr-plural.$(OBJEXT) \ -@@ -1975,15 +1986,28 @@ - @WOE32DLL_TRUE@ format-qt.c format-qt-plural.c format-kde.c \ - @WOE32DLL_TRUE@ format-kde-kuit.c format-boost.c format-lua.c \ - @WOE32DLL_TRUE@ format-javascript.c -+@WOE32DLL_FALSE@COLOR_SOURCE = color.c -+@WOE32DLL_TRUE@COLOR_SOURCE = ../woe32dll/c++color.cc -+@WOE32DLL_FALSE@OUTPUT_SOURCE = \ -+@WOE32DLL_FALSE@ write-catalog.c \ -+@WOE32DLL_FALSE@ write-properties.c \ -+@WOE32DLL_FALSE@ write-stringtable.c \ -+@WOE32DLL_FALSE@ write-po.c -+ -+@WOE32DLL_TRUE@OUTPUT_SOURCE = \ -+@WOE32DLL_TRUE@ ../woe32dll/c++write-catalog.cc \ -+@WOE32DLL_TRUE@ ../woe32dll/c++write-properties.cc \ -+@WOE32DLL_TRUE@ ../woe32dll/c++write-stringtable.cc \ -+@WOE32DLL_TRUE@ ../woe32dll/c++write-po.cc -+ - - # libgettextsrc contains all code that is needed by at least two programs. --libgettextsrc_la_SOURCES = $(COMMON_SOURCE) read-catalog.c color.c \ -- write-catalog.c write-properties.c write-stringtable.c \ -- write-po.c msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c \ -- msgl-header.c msgl-english.c msgl-check.c file-list.c \ -- msgl-charset.c po-time.c plural-exp.c plural-eval.c \ -- plural-table.c quote.h sentence.h sentence.c $(FORMAT_SOURCE) \ -- read-desktop.c locating-rule.c its.c $(am__append_1) -+libgettextsrc_la_SOURCES = $(COMMON_SOURCE) read-catalog.c \ -+ $(COLOR_SOURCE) $(OUTPUT_SOURCE) msgl-ascii.c msgl-iconv.c \ -+ msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \ -+ msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c \ -+ plural-eval.c plural-table.c quote.h sentence.h sentence.c \ -+ $(FORMAT_SOURCE) read-desktop.c locating-rule.c its.c $(am__append_1) - - # msggrep needs pattern matching. - LIBGREP = ../libgrep/libgrep.a -@@ -2345,6 +2370,15 @@ - ../woe32dll/$(am__dirstamp): - @$(MKDIR_P) ../woe32dll - @: > ../woe32dll/$(am__dirstamp) -+../woe32dll/libgettextsrc_la-c++color.lo: ../woe32dll/$(am__dirstamp) -+../woe32dll/libgettextsrc_la-c++write-catalog.lo: \ -+ ../woe32dll/$(am__dirstamp) -+../woe32dll/libgettextsrc_la-c++write-properties.lo: \ -+ ../woe32dll/$(am__dirstamp) -+../woe32dll/libgettextsrc_la-c++write-stringtable.lo: \ -+ ../woe32dll/$(am__dirstamp) -+../woe32dll/libgettextsrc_la-c++write-po.lo: \ -+ ../woe32dll/$(am__dirstamp) - ../woe32dll/libgettextsrc_la-c++format.lo: \ - ../woe32dll/$(am__dirstamp) - ../woe32dll/libgettextsrc_la-gettextsrc-exports.lo: \ -@@ -3156,6 +3190,21 @@ - .cc.lo: - $(AM_V_CXX)$(LTCXXCOMPILE) -c -o $@ $< - -+../woe32dll/libgettextsrc_la-c++color.lo: ../woe32dll/c++color.cc -+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../woe32dll/libgettextsrc_la-c++color.lo `test -f '../woe32dll/c++color.cc' || echo '$(srcdir)/'`../woe32dll/c++color.cc -+ -+../woe32dll/libgettextsrc_la-c++write-catalog.lo: ../woe32dll/c++write-catalog.cc -+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../woe32dll/libgettextsrc_la-c++write-catalog.lo `test -f '../woe32dll/c++write-catalog.cc' || echo '$(srcdir)/'`../woe32dll/c++write-catalog.cc -+ -+../woe32dll/libgettextsrc_la-c++write-properties.lo: ../woe32dll/c++write-properties.cc -+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../woe32dll/libgettextsrc_la-c++write-properties.lo `test -f '../woe32dll/c++write-properties.cc' || echo '$(srcdir)/'`../woe32dll/c++write-properties.cc -+ -+../woe32dll/libgettextsrc_la-c++write-stringtable.lo: ../woe32dll/c++write-stringtable.cc -+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../woe32dll/libgettextsrc_la-c++write-stringtable.lo `test -f '../woe32dll/c++write-stringtable.cc' || echo '$(srcdir)/'`../woe32dll/c++write-stringtable.cc -+ -+../woe32dll/libgettextsrc_la-c++write-po.lo: ../woe32dll/c++write-po.cc -+ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../woe32dll/libgettextsrc_la-c++write-po.lo `test -f '../woe32dll/c++write-po.cc' || echo '$(srcdir)/'`../woe32dll/c++write-po.cc -+ - ../woe32dll/libgettextsrc_la-c++format.lo: ../woe32dll/c++format.cc - $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgettextsrc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ../woe32dll/libgettextsrc_la-c++format.lo `test -f '../woe32dll/c++format.cc' || echo '$(srcdir)/'`../woe32dll/c++format.cc - -diff -urN a/gettext-tools/src/color.c b/gettext-tools/src/color.c ---- a/gettext-tools/src/color.c 2015-08-21 08:18:27.000000000 +0100 -+++ b/gettext-tools/src/color.c 2015-10-22 00:31:33.326659600 +0100 -@@ -28,6 +28,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - -+#include "ostream.h" - #include "term-ostream.h" - #include "xalloc.h" - #include "relocatable.h" -diff -urN a/gettext-tools/woe32dll/c++color.cc b/gettext-tools/woe32dll/c++color.cc ---- a/gettext-tools/woe32dll/c++color.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++color.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../src/color.c" -diff -urN a/gettext-tools/woe32dll/c++file-ostream.cc b/gettext-tools/woe32dll/c++file-ostream.cc ---- a/gettext-tools/woe32dll/c++file-ostream.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++file-ostream.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1,2 @@ -+#include "../gnulib-lib/file-ostream.c" -+ -diff -urN a/gettext-tools/woe32dll/c++html-ostream.cc b/gettext-tools/woe32dll/c++html-ostream.cc ---- a/gettext-tools/woe32dll/c++html-ostream.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++html-ostream.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../gnulib-lib/html-ostream.c" -diff -urN a/gettext-tools/woe32dll/c++styled-ostream.cc b/gettext-tools/woe32dll/c++styled-ostream.cc ---- a/gettext-tools/woe32dll/c++styled-ostream.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++styled-ostream.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../gnulib-lib/styled-ostream.c" -diff -urN a/gettext-tools/woe32dll/c++term-ostream.cc b/gettext-tools/woe32dll/c++term-ostream.cc ---- a/gettext-tools/woe32dll/c++term-ostream.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++term-ostream.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../gnulib-lib/term-ostream.c" -diff -urN a/gettext-tools/woe32dll/c++write-catalog.cc b/gettext-tools/woe32dll/c++write-catalog.cc ---- a/gettext-tools/woe32dll/c++write-catalog.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++write-catalog.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../src/write-catalog.c" -diff -urN a/gettext-tools/woe32dll/c++write-po.cc b/gettext-tools/woe32dll/c++write-po.cc ---- a/gettext-tools/woe32dll/c++write-po.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++write-po.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../src/write-po.c" -diff -urN a/gettext-tools/woe32dll/c++write-properties.cc b/gettext-tools/woe32dll/c++write-properties.cc ---- a/gettext-tools/woe32dll/c++write-properties.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++write-properties.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../src/write-properties.c" -diff -urN a/gettext-tools/woe32dll/c++write-stringtable.cc b/gettext-tools/woe32dll/c++write-stringtable.cc ---- a/gettext-tools/woe32dll/c++write-stringtable.cc 1970-01-01 01:00:00.000000000 +0100 -+++ b/gettext-tools/woe32dll/c++write-stringtable.cc 2015-10-22 00:31:33.326659600 +0100 -@@ -0,0 +1 @@ -+#include "../src/write-stringtable.c" -diff -urN a/gnulib-local/modules/file-ostream b/gnulib-local/modules/file-ostream ---- a/gnulib-local/modules/file-ostream 2015-08-21 06:48:27.000000000 +0100 -+++ b/gnulib-local/modules/file-ostream 2015-10-22 00:31:33.326659600 +0100 -@@ -12,7 +12,11 @@ - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += file-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++file-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - file-ostream.h : $(top_srcdir)/build-aux/moopp file-ostream.oo.h file-ostream.oo.c ostream.oo.h -diff -urN a/gnulib-local/modules/html-ostream b/gnulib-local/modules/html-ostream ---- a/gnulib-local/modules/html-ostream 2015-08-21 06:48:27.000000000 +0100 -+++ b/gnulib-local/modules/html-ostream 2015-10-22 00:31:33.326659600 +0100 -@@ -15,7 +15,11 @@ - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += html-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++html-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - html-ostream.h : $(top_srcdir)/build-aux/moopp html-ostream.oo.h html-ostream.oo.c ostream.oo.h -diff -urN a/gnulib-local/modules/ostream b/gnulib-local/modules/ostream ---- a/gnulib-local/modules/ostream 2015-08-21 06:48:27.000000000 +0100 -+++ b/gnulib-local/modules/ostream 2015-10-22 00:31:33.342259600 +0100 -@@ -11,7 +11,11 @@ - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += ostream.c -+else -+lib_SOURCES += ../woe32dll/c++ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - ostream.h : $(top_srcdir)/build-aux/moopp ostream.oo.h ostream.oo.c -diff -urN a/gnulib-local/modules/styled-ostream b/gnulib-local/modules/styled-ostream ---- a/gnulib-local/modules/styled-ostream 2015-08-21 06:48:27.000000000 +0100 -+++ b/gnulib-local/modules/styled-ostream 2015-10-22 00:31:33.342259600 +0100 -@@ -11,7 +11,11 @@ - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += styled-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++styled-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - styled-ostream.h : $(top_srcdir)/build-aux/moopp styled-ostream.oo.h styled-ostream.oo.c ostream.oo.h -diff -urN a/gnulib-local/modules/term-ostream b/gnulib-local/modules/term-ostream ---- a/gnulib-local/modules/term-ostream 2015-08-21 06:48:27.000000000 +0100 -+++ b/gnulib-local/modules/term-ostream 2015-10-22 00:31:33.342259600 +0100 -@@ -22,7 +22,11 @@ - gl_TERM_OSTREAM - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += term-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++term-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - term-ostream.h : $(top_srcdir)/build-aux/moopp term-ostream.oo.h term-ostream.oo.c ostream.oo.h diff --git a/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch b/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch deleted file mode 100644 index 3487302..0000000 --- a/patches/gettext/0.19.7/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-lib/execute.c gettext-0.19.6/gettext-tools/gnulib-lib/execute.c ---- gettext-0.19.6.orig/gettext-tools/gnulib-lib/execute.c 2015-10-24 16:54:39.310372500 +0100 -+++ gettext-0.19.6/gettext-tools/gnulib-lib/execute.c 2015-10-24 16:55:35.261954100 +0100 -@@ -52,7 +52,7 @@ - __cygwin_environ variable on cygwin64: - <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - #if defined __CYGWIN__ && defined __x86_64__ --extern DLL_VARIABLE char **environ; -+extern __attribute__((dllimport)) char **environ; - #endif - - -diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-lib/spawn-pipe.c gettext-0.19.6/gettext-tools/gnulib-lib/spawn-pipe.c ---- gettext-0.19.6.orig/gettext-tools/gnulib-lib/spawn-pipe.c 2015-09-11 04:03:56.000000000 +0100 -+++ gettext-0.19.6/gettext-tools/gnulib-lib/spawn-pipe.c 2015-10-24 16:56:00.885918100 +0100 -@@ -52,7 +52,7 @@ - __cygwin_environ variable on cygwin64: - <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - #if defined __CYGWIN__ && defined __x86_64__ --extern DLL_VARIABLE char **environ; -+extern __attribute__((dllimport)) char **environ; - #endif - - -diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-tests/test-environ.c gettext-0.19.6/gettext-tools/gnulib-tests/test-environ.c ---- gettext-0.19.6.orig/gettext-tools/gnulib-tests/test-environ.c 2015-09-11 04:03:58.000000000 +0100 -+++ gettext-0.19.6/gettext-tools/gnulib-tests/test-environ.c 2015-10-24 16:56:51.519198900 +0100 -@@ -26,7 +26,7 @@ - __cygwin_environ variable on cygwin64: - <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - #if defined __CYGWIN__ && defined __x86_64__ --extern DLL_VARIABLE char **environ; -+extern __attribute__((dllimport)) char **environ; - #endif - - int -diff -urN gettext-0.19.6.orig/gnulib-local/lib/execute.c.diff gettext-0.19.6/gnulib-local/lib/execute.c.diff ---- gettext-0.19.6.orig/gnulib-local/lib/execute.c.diff 2015-08-21 08:18:28.000000000 +0100 -+++ gettext-0.19.6/gnulib-local/lib/execute.c.diff 2015-10-24 16:58:17.182285000 +0100 -@@ -10,7 +10,7 @@ - + __cygwin_environ variable on cygwin64: - + <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - +#if defined __CYGWIN__ && defined __x86_64__ --+extern DLL_VARIABLE char **environ; -++extern __attribute__((dllimport)) char **environ; - +#endif - + - -diff -urN gettext-0.19.6.orig/gnulib-local/lib/spawn-pipe.c.diff gettext-0.19.6/gnulib-local/lib/spawn-pipe.c.diff ---- gettext-0.19.6.orig/gnulib-local/lib/spawn-pipe.c.diff 2015-08-21 08:18:28.000000000 +0100 -+++ gettext-0.19.6/gnulib-local/lib/spawn-pipe.c.diff 2015-10-24 16:58:11.741447300 +0100 -@@ -10,7 +10,7 @@ - + __cygwin_environ variable on cygwin64: - + <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - +#if defined __CYGWIN__ && defined __x86_64__ --+extern DLL_VARIABLE char **environ; -++extern __attribute__((dllimport)) char **environ; - +#endif - + - -diff -urN gettext-0.19.6.orig/gnulib-local/tests/test-environ.c.diff gettext-0.19.6/gnulib-local/tests/test-environ.c.diff ---- gettext-0.19.6.orig/gnulib-local/tests/test-environ.c.diff 2015-08-21 08:18:28.000000000 +0100 -+++ gettext-0.19.6/gnulib-local/tests/test-environ.c.diff 2015-10-24 16:58:35.915765100 +0100 -@@ -10,7 +10,7 @@ - + __cygwin_environ variable on cygwin64: - + <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - +#if defined __CYGWIN__ && defined __x86_64__ --+extern DLL_VARIABLE char **environ; -++extern __attribute__((dllimport)) char **environ; - +#endif - + - int diff --git a/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch b/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch deleted file mode 100644 index 7f980ac..0000000 --- a/patches/gettext/0.19.7/140-Fix-Cygwin-sys-select.patch +++ /dev/null @@ -1,44 +0,0 @@ ->From cfbc1c62a1ea5c5809d11b957ad29cd820db15b8 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <address@hidden> -Date: Mon, 21 Mar 2016 00:49:17 -0700 -Subject: [PATCH] sys_select: port to new Cygwin - -Problem reported by Ken Brown in: -https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00054.html -* lib/sys_select.in.h [__CYGWIN__]: Avoid "unknown type name" -diagnostics. ---- - ChangeLog | 8 ++++++++ - lib/sys_select.in.h | 10 ++++++---- - 2 files changed, 14 insertions(+), 4 deletions(-) - -diff --git a/gettext-tools/gnulib-lib/sys_select.in.h b/gettext-tools/gnulib-lib/sys_select.in.h -index d6d3f9f..7281144 100644 ---- a/gettext-tools/gnulib-lib/sys_select.in.h -+++ b/gettext-tools/gnulib-lib/sys_select.in.h -@@ -81,8 +81,9 @@ - of 'struct timeval', and no definition of this type. - Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() - in <sys/time.h>. -- But avoid namespace pollution on glibc systems. */ --# ifndef __GLIBC__ -+ But avoid namespace pollution on glibc systems and "unknown type -+ name" problems on Cygwin. */ -+# if !(defined __GLIBC__ || defined __CYGWIN__) - # include <sys/time.h> - # endif - -@@ -100,10 +101,11 @@ - #endif - - /* Get definition of 'sigset_t'. -- But avoid namespace pollution on glibc systems. -+ But avoid namespace pollution on glibc systems and "unknown type -+ name" problems on Cygwin. - Do this after the include_next (for the sake of OpenBSD 5.0) but before - the split double-inclusion guard (for the sake of Solaris). */ --#if !(defined __GLIBC__ && !defined __UCLIBC__) -+#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) - # include <signal.h> - #endif - diff --git a/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch b/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch deleted file mode 100644 index caaf0a0..0000000 --- a/patches/gettext/0.19.7/150-Fix-Cygwin-sys-select-2.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/gettext-tools/gnulib-lib/sys_select.in.h -+++ b/gettext-tools/gnulib-lib/sys_select.in.h -@@ -82,8 +82,8 @@ - Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() - in <sys/time.h>. - But avoid namespace pollution on glibc systems and "unknown type -- name" problems on Cygwin. */ --# if !(defined __GLIBC__ || defined __CYGWIN__) -+ name" problems on newlib systems. */ -+# if !(defined __GLIBC__ || defined __NEWLIB__) - # include <sys/time.h> - # endif - -@@ -102,10 +102,10 @@ - - /* Get definition of 'sigset_t'. - But avoid namespace pollution on glibc systems and "unknown type -- name" problems on Cygwin. -+ name" problems on newlib systems.. - Do this after the include_next (for the sake of OpenBSD 5.0) but before - the split double-inclusion guard (for the sake of Solaris). */ --#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) -+#if !((defined __GLIBC__ || defined __NEWLIB__) && !defined __UCLIBC__) - # include <signal.h> - #endif - diff --git a/patches/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch b/patches/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch deleted file mode 100644 index dacdfb1..0000000 --- a/patches/gettext/0.19.8.1/110-Fix-linker-error-redefinition-of-vasprintf.patch +++ /dev/null @@ -1,31 +0,0 @@ -From a76649dae62768d0af7017b3fc0ca5f891588c78 Mon Sep 17 00:00:00 2001 -From: Andoni Morales Alastruey <ylatuya@gmail.com> -Date: Wed, 29 Feb 2012 10:44:43 +0100 -Subject: [PATCH] Fix linker error: redefinition of vasprintf - -This might not be the best patch, but it works for us -The link error was: -.libs/autosprintf.o:autosprintf.cc:(.text$vasprintf[_vasprintf]+0x0): multiple definition of `_vasprintf' -.libs/lib-asprintf.o:lib-asprintf.c:(.text+0x4621): first defined here ---- - gettext-runtime/libasprintf/autosprintf.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gettext-runtime/libasprintf/autosprintf.cc b/gettext-runtime/libasprintf/autosprintf.cc -index ca318f7..2526210 100644 ---- a/gettext-runtime/libasprintf/autosprintf.cc -+++ b/gettext-runtime/libasprintf/autosprintf.cc -@@ -19,8 +19,10 @@ - This must come before <config.h> because <config.h> may include - <features.h>, and once <features.h> has been included, it's too late. */ - #ifndef _GNU_SOURCE -+#ifndef _WIN32 - # define _GNU_SOURCE 1 - #endif -+#endif - - /* Specification. */ - #include "autosprintf.h" --- -1.8.4 - diff --git a/patches/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch b/patches/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch deleted file mode 100644 index 8c6b94f..0000000 --- a/patches/gettext/0.19.8.1/120-Fix-Woe32-link-errors-when-compiling-with-O0.patch +++ /dev/null @@ -1,199 +0,0 @@ -From d4ecf6f15ad7a428786df2efdc88b03be0a4fdbb Mon Sep 17 00:00:00 2001 -From: Daiki Ueno <ueno@gnu.org> -Date: Thu, 17 Jan 2013 18:33:40 +0900 -Subject: [PATCH] Fix Woe32 link errors when compiling with -O0. - ---- - gettext-tools/src/Makefile.am | 24 ++++++++++++++++++++++-- - gettext-tools/src/color.c | 1 + - gettext-tools/woe32dll/c++color.cc | 1 + - gettext-tools/woe32dll/c++file-ostream.cc | 2 ++ - gettext-tools/woe32dll/c++html-ostream.cc | 1 + - gettext-tools/woe32dll/c++styled-ostream.cc | 1 + - gettext-tools/woe32dll/c++term-ostream.cc | 1 + - gettext-tools/woe32dll/c++write-catalog.cc | 1 + - gettext-tools/woe32dll/c++write-po.cc | 1 + - gettext-tools/woe32dll/c++write-properties.cc | 1 + - gettext-tools/woe32dll/c++write-stringtable.cc | 1 + - gnulib-local/modules/file-ostream | 4 ++++ - gnulib-local/modules/html-ostream | 4 ++++ - gnulib-local/modules/ostream | 4 ++++ - gnulib-local/modules/styled-ostream | 4 ++++ - gnulib-local/modules/term-ostream | 4 ++++ - 16 files changed, 53 insertions(+), 2 deletions(-) - create mode 100644 gettext-tools/woe32dll/c++color.cc - create mode 100644 gettext-tools/woe32dll/c++file-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++html-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++styled-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++term-ostream.cc - create mode 100644 gettext-tools/woe32dll/c++write-catalog.cc - create mode 100644 gettext-tools/woe32dll/c++write-po.cc - create mode 100644 gettext-tools/woe32dll/c++write-properties.cc - create mode 100644 gettext-tools/woe32dll/c++write-stringtable.cc - -Additional fix (COLOR_SOURCE) by Ray Donnelly <mingw.android@gmail.com> -Regenerated for 0.19.8.1 by Alexey Neyman <stilor@att.net> - -diff -urpN gettext-0.19.8.1.orig/gettext-tools/src/color.c gettext-0.19.8.1/gettext-tools/src/color.c ---- gettext-0.19.8.1.orig/gettext-tools/src/color.c 2017-01-23 15:13:25.448209511 -0800 -+++ gettext-0.19.8.1/gettext-tools/src/color.c 2017-01-23 15:13:53.168490941 -0800 -@@ -28,6 +28,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - -+#include "ostream.h" - #include "term-ostream.h" - #include "xalloc.h" - #include "relocatable.h" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/src/Makefile.am gettext-0.19.8.1/gettext-tools/src/Makefile.am ---- gettext-0.19.8.1.orig/gettext-tools/src/Makefile.am 2017-01-23 15:13:25.452209551 -0800 -+++ gettext-0.19.8.1/gettext-tools/src/Makefile.am 2017-01-23 15:13:53.168490941 -0800 -@@ -145,10 +145,26 @@ FORMAT_SOURCE += \ - format-lua.c \ - format-javascript.c - -+if !WOE32DLL -+COLOR_SOURCE = color.c -+OUTPUT_SOURCE = \ -+ write-catalog.c \ -+ write-properties.c \ -+ write-stringtable.c \ -+ write-po.c -+else -+COLOR_SOURCE = ../woe32dll/c++color.cc -+OUTPUT_SOURCE = \ -+ ../woe32dll/c++write-catalog.cc \ -+ ../woe32dll/c++write-properties.cc \ -+ ../woe32dll/c++write-stringtable.cc \ -+ ../woe32dll/c++write-po.cc -+endif -+ - # libgettextsrc contains all code that is needed by at least two programs. - libgettextsrc_la_SOURCES = \ - $(COMMON_SOURCE) read-catalog.c \ --color.c write-catalog.c write-properties.c write-stringtable.c write-po.c \ -+$(COLOR_SOURCE) $(OUTPUT_SOURCE) \ - msgl-ascii.c msgl-iconv.c msgl-equal.c msgl-cat.c msgl-header.c msgl-english.c \ - msgl-check.c file-list.c msgl-charset.c po-time.c plural-exp.c plural-eval.c \ - plural-table.c quote.h sentence.h sentence.c \ -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++color.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++color.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++color.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++color.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../src/color.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++file-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++file-ostream.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++file-ostream.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++file-ostream.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1,2 @@ -+#include "../gnulib-lib/file-ostream.c" -+ -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++html-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++html-ostream.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++html-ostream.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++html-ostream.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../gnulib-lib/html-ostream.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++styled-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++styled-ostream.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++styled-ostream.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++styled-ostream.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../gnulib-lib/styled-ostream.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++term-ostream.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++term-ostream.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++term-ostream.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++term-ostream.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../gnulib-lib/term-ostream.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-catalog.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-catalog.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-catalog.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-catalog.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../src/write-catalog.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-po.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-po.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-po.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-po.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../src/write-po.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-properties.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-properties.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-properties.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-properties.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../src/write-properties.c" -diff -urpN gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-stringtable.cc gettext-0.19.8.1/gettext-tools/woe32dll/c++write-stringtable.cc ---- gettext-0.19.8.1.orig/gettext-tools/woe32dll/c++write-stringtable.cc 1969-12-31 16:00:00.000000000 -0800 -+++ gettext-0.19.8.1/gettext-tools/woe32dll/c++write-stringtable.cc 2017-01-23 15:13:53.168490941 -0800 -@@ -0,0 +1 @@ -+#include "../src/write-stringtable.c" -diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/file-ostream gettext-0.19.8.1/gnulib-local/modules/file-ostream ---- gettext-0.19.8.1.orig/gnulib-local/modules/file-ostream 2017-01-23 15:13:25.060205571 -0800 -+++ gettext-0.19.8.1/gnulib-local/modules/file-ostream 2017-01-23 15:13:53.168490941 -0800 -@@ -12,7 +12,11 @@ xalloc - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += file-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++file-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - file-ostream.h : $(top_srcdir)/build-aux/moopp file-ostream.oo.h file-ostream.oo.c ostream.oo.h -diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/html-ostream gettext-0.19.8.1/gnulib-local/modules/html-ostream ---- gettext-0.19.8.1.orig/gnulib-local/modules/html-ostream 2017-01-23 15:13:25.060205571 -0800 -+++ gettext-0.19.8.1/gnulib-local/modules/html-ostream 2017-01-23 15:13:53.168490941 -0800 -@@ -15,7 +15,11 @@ xalloc - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += html-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++html-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - html-ostream.h : $(top_srcdir)/build-aux/moopp html-ostream.oo.h html-ostream.oo.c ostream.oo.h -diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/ostream gettext-0.19.8.1/gnulib-local/modules/ostream ---- gettext-0.19.8.1.orig/gnulib-local/modules/ostream 2017-01-23 15:13:25.060205571 -0800 -+++ gettext-0.19.8.1/gnulib-local/modules/ostream 2017-01-23 15:13:53.168490941 -0800 -@@ -11,7 +11,11 @@ moo - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += ostream.c -+else -+lib_SOURCES += ../woe32dll/c++ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - ostream.h : $(top_srcdir)/build-aux/moopp ostream.oo.h ostream.oo.c -diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/styled-ostream gettext-0.19.8.1/gnulib-local/modules/styled-ostream ---- gettext-0.19.8.1.orig/gnulib-local/modules/styled-ostream 2017-01-23 15:13:25.060205571 -0800 -+++ gettext-0.19.8.1/gnulib-local/modules/styled-ostream 2017-01-23 15:13:53.168490941 -0800 -@@ -11,7 +11,11 @@ ostream - configure.ac: - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += styled-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++styled-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - styled-ostream.h : $(top_srcdir)/build-aux/moopp styled-ostream.oo.h styled-ostream.oo.c ostream.oo.h -diff -urpN gettext-0.19.8.1.orig/gnulib-local/modules/term-ostream gettext-0.19.8.1/gnulib-local/modules/term-ostream ---- gettext-0.19.8.1.orig/gnulib-local/modules/term-ostream 2017-01-23 15:13:25.060205571 -0800 -+++ gettext-0.19.8.1/gnulib-local/modules/term-ostream 2017-01-23 15:13:53.172490983 -0800 -@@ -22,7 +22,11 @@ configure.ac: - gl_TERM_OSTREAM - - Makefile.am: -+if !WOE32DLL - lib_SOURCES += term-ostream.c -+else -+lib_SOURCES += ../woe32dll/c++term-ostream.cc -+endif - # This is a Makefile rule that generates multiple files at once; see the - # automake documentation, node "Multiple Outputs", for details. - term-ostream.h : $(top_srcdir)/build-aux/moopp term-ostream.oo.h term-ostream.oo.c ostream.oo.h diff --git a/patches/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch b/patches/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch deleted file mode 100644 index 3487302..0000000 --- a/patches/gettext/0.19.8.1/130-Fix-static-Cygwin-x86_64-build-environ-is-always-dllimport.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-lib/execute.c gettext-0.19.6/gettext-tools/gnulib-lib/execute.c ---- gettext-0.19.6.orig/gettext-tools/gnulib-lib/execute.c 2015-10-24 16:54:39.310372500 +0100 -+++ gettext-0.19.6/gettext-tools/gnulib-lib/execute.c 2015-10-24 16:55:35.261954100 +0100 -@@ -52,7 +52,7 @@ - __cygwin_environ variable on cygwin64: - <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - #if defined __CYGWIN__ && defined __x86_64__ --extern DLL_VARIABLE char **environ; -+extern __attribute__((dllimport)) char **environ; - #endif - - -diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-lib/spawn-pipe.c gettext-0.19.6/gettext-tools/gnulib-lib/spawn-pipe.c ---- gettext-0.19.6.orig/gettext-tools/gnulib-lib/spawn-pipe.c 2015-09-11 04:03:56.000000000 +0100 -+++ gettext-0.19.6/gettext-tools/gnulib-lib/spawn-pipe.c 2015-10-24 16:56:00.885918100 +0100 -@@ -52,7 +52,7 @@ - __cygwin_environ variable on cygwin64: - <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - #if defined __CYGWIN__ && defined __x86_64__ --extern DLL_VARIABLE char **environ; -+extern __attribute__((dllimport)) char **environ; - #endif - - -diff -urN gettext-0.19.6.orig/gettext-tools/gnulib-tests/test-environ.c gettext-0.19.6/gettext-tools/gnulib-tests/test-environ.c ---- gettext-0.19.6.orig/gettext-tools/gnulib-tests/test-environ.c 2015-09-11 04:03:58.000000000 +0100 -+++ gettext-0.19.6/gettext-tools/gnulib-tests/test-environ.c 2015-10-24 16:56:51.519198900 +0100 -@@ -26,7 +26,7 @@ - __cygwin_environ variable on cygwin64: - <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - #if defined __CYGWIN__ && defined __x86_64__ --extern DLL_VARIABLE char **environ; -+extern __attribute__((dllimport)) char **environ; - #endif - - int -diff -urN gettext-0.19.6.orig/gnulib-local/lib/execute.c.diff gettext-0.19.6/gnulib-local/lib/execute.c.diff ---- gettext-0.19.6.orig/gnulib-local/lib/execute.c.diff 2015-08-21 08:18:28.000000000 +0100 -+++ gettext-0.19.6/gnulib-local/lib/execute.c.diff 2015-10-24 16:58:17.182285000 +0100 -@@ -10,7 +10,7 @@ - + __cygwin_environ variable on cygwin64: - + <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - +#if defined __CYGWIN__ && defined __x86_64__ --+extern DLL_VARIABLE char **environ; -++extern __attribute__((dllimport)) char **environ; - +#endif - + - -diff -urN gettext-0.19.6.orig/gnulib-local/lib/spawn-pipe.c.diff gettext-0.19.6/gnulib-local/lib/spawn-pipe.c.diff ---- gettext-0.19.6.orig/gnulib-local/lib/spawn-pipe.c.diff 2015-08-21 08:18:28.000000000 +0100 -+++ gettext-0.19.6/gnulib-local/lib/spawn-pipe.c.diff 2015-10-24 16:58:11.741447300 +0100 -@@ -10,7 +10,7 @@ - + __cygwin_environ variable on cygwin64: - + <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - +#if defined __CYGWIN__ && defined __x86_64__ --+extern DLL_VARIABLE char **environ; -++extern __attribute__((dllimport)) char **environ; - +#endif - + - -diff -urN gettext-0.19.6.orig/gnulib-local/tests/test-environ.c.diff gettext-0.19.6/gnulib-local/tests/test-environ.c.diff ---- gettext-0.19.6.orig/gnulib-local/tests/test-environ.c.diff 2015-08-21 08:18:28.000000000 +0100 -+++ gettext-0.19.6/gnulib-local/tests/test-environ.c.diff 2015-10-24 16:58:35.915765100 +0100 -@@ -10,7 +10,7 @@ - + __cygwin_environ variable on cygwin64: - + <https://cygwin.com/ml/cygwin/2013-06/msg00228.html>. */ - +#if defined __CYGWIN__ && defined __x86_64__ --+extern DLL_VARIABLE char **environ; -++extern __attribute__((dllimport)) char **environ; - +#endif - + - int 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 deleted file mode 100644 index f60e88f..0000000 --- a/patches/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch +++ /dev/null @@ -1,33 +0,0 @@ -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 --git a/patches/gmp/4.3.0/110-unbounded-alloc.patch b/patches/gmp/4.3.0/110-unbounded-alloc.patch deleted file mode 100644 index 78e0588..0000000 --- a/patches/gmp/4.3.0/110-unbounded-alloc.patch +++ /dev/null @@ -1,31 +0,0 @@ -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; diff --git a/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch b/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch deleted file mode 100644 index f60e88f..0000000 --- a/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch +++ /dev/null @@ -1,33 +0,0 @@ -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 --git a/patches/gmp/4.3.1/110-unbounded-alloc.patch b/patches/gmp/4.3.1/110-unbounded-alloc.patch deleted file mode 100644 index 78e0588..0000000 --- a/patches/gmp/4.3.1/110-unbounded-alloc.patch +++ /dev/null @@ -1,31 +0,0 @@ -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; diff --git a/patches/gmp/5.0.1/100-fix-tests-ABI-long-long.patch b/patches/gmp/5.0.1/100-fix-tests-ABI-long-long.patch deleted file mode 100644 index b6e303e..0000000 --- a/patches/gmp/5.0.1/100-fix-tests-ABI-long-long.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: http://gmplib.org:8000/gmp-5.0/raw-rev/794410151f5f - -Tweaked to remove the hunk in the Changelog, as it did not apply cleanly -( and who needs Changelogs? ;-) ) - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1267122532 -3600 -# Node ID 794410151f5f966bcb5c3489b6441614990efe7c -# Parent 948660e2e56d9cfaae035082b8fd473985505fb6 -Fix a test case to work for long long limbs. - -diff -r 948660e2e56d -r 794410151f5f tests/mpz/t-perfpow.c ---- a/tests/mpz/t-perfpow.c Thu Feb 25 16:08:21 2010 +0100 -+++ b/tests/mpz/t-perfpow.c Thu Feb 25 19:28:52 2010 +0100 -@@ -2,7 +2,7 @@ - - Contributed to the GNU project by Torbjorn Granlund and Martin Boij. - --Copyright 2008, 2009 Free Software Foundation, Inc. -+Copyright 2008, 2009, 2010 Free Software Foundation, Inc. - - This file is part of the GNU MP Library. - -@@ -109,7 +109,8 @@ - { - mpz_t n, np, temp, primes[NRP]; - int i, j, k, unique, destroy, res; -- unsigned long int nrprimes, primebits, g, exp[NRP], e; -+ unsigned long int nrprimes, primebits; -+ mp_limb_t g, exp[NRP], e; - gmp_randstate_ptr rands; - - rands = RANDS; - diff --git a/patches/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch b/patches/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch deleted file mode 100644 index 2e0a1af..0000000 --- a/patches/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch +++ /dev/null @@ -1,38 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1310730221 -7200 -# Node ID 538dfce27f410b910d5e2f011119269e224d16a3 -# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366 -(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right. - -diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c ---- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200 -+++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200 -@@ -7,7 +7,7 @@ - SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST - GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. - --Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. -+Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. - - This file is part of the GNU MP Library. - -@@ -28,7 +28,6 @@ - #include "gmp-impl.h" - - -- - mp_size_t - mpn_dcpi1_bdiv_q_n_itch (mp_size_t n) - { -@@ -130,7 +129,7 @@ - qn = nn - qn; - while (qn > dn) - { -- mpn_sub_1 (np + dn, np + dn, qn, cy); -+ mpn_sub_1 (np + dn, np + dn, qn - dn, cy); - cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp); - qp += dn; - np += dn; - diff --git a/patches/gmp/5.0.1/120-fix-r0-clobbering-issue.patch b/patches/gmp/5.0.1/120-fix-r0-clobbering-issue.patch deleted file mode 100644 index d12d6b2..0000000 --- a/patches/gmp/5.0.1/120-fix-r0-clobbering-issue.patch +++ /dev/null @@ -1,77 +0,0 @@ -Removed ChangeLog part - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1342891151 -7200 -# Node ID 829215e83ff1db3cd00e510a737092df691442d5 -# Parent 816c18dbd492050ef8892e91602d9e758abc2988 -Fix r0 clobbering issue with "large" code affecting elf+darwin PIC. - -diff -r 816c18dbd492 -r 829215e83ff1 mpn/powerpc32/vmx/mod_34lsub1.asm ---- a/mpn/powerpc32/vmx/mod_34lsub1.asm Tue Jun 19 15:02:48 2012 +0200 -+++ b/mpn/powerpc32/vmx/mod_34lsub1.asm Sat Jul 21 19:19:11 2012 +0200 -@@ -1,6 +1,7 @@ - dnl PowerPC-32 mpn_mod_34lsub1 -- mpn remainder mod 2^24-1. - --dnl Copyright 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. -+dnl Copyright 2002, 2003, 2005, 2006, 2007, 2012 Free Software Foundation, -+dnl Inc. - - dnl This file is part of the GNU MP Library. - -@@ -135,15 +136,15 @@ - - andi. r7, up, 15 - vxor a0, v0, v0 -- lis r0, 0xaaaa -+ lis r9, 0xaaaa - vxor a1, v0, v0 -- ori r0, r0, 0xaaab -+ ori r9, r9, 0xaaab - vxor a2, v0, v0 - li r5, 16 - vxor c0, v0, v0 - li r6, 32 - vxor c1, v0, v0 -- LEAL( r11, cnsts) -+ LEAL( r11, cnsts) C CAUTION clobbers r0 for elf, darwin - vxor c2, v0, v0 - vxor z, v0, v0 - -@@ -158,7 +159,7 @@ - vsldoi a2, z, a2, 12 - - addi n, n, 9 -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - -@@ -174,7 +175,7 @@ - vsldoi a1, z, a1, 8 - - addi n, n, 6 -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - -@@ -188,7 +189,7 @@ - vsldoi a0, z, a0, 4 - - addi n, n, 3 -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - -@@ -197,7 +198,7 @@ - b L(0) - - L(aligned16): -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - - diff --git a/patches/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch b/patches/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch deleted file mode 100644 index 2e0a1af..0000000 --- a/patches/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch +++ /dev/null @@ -1,38 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1310730221 -7200 -# Node ID 538dfce27f410b910d5e2f011119269e224d16a3 -# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366 -(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right. - -diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c ---- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200 -+++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200 -@@ -7,7 +7,7 @@ - SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST - GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. - --Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. -+Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. - - This file is part of the GNU MP Library. - -@@ -28,7 +28,6 @@ - #include "gmp-impl.h" - - -- - mp_size_t - mpn_dcpi1_bdiv_q_n_itch (mp_size_t n) - { -@@ -130,7 +129,7 @@ - qn = nn - qn; - while (qn > dn) - { -- mpn_sub_1 (np + dn, np + dn, qn, cy); -+ mpn_sub_1 (np + dn, np + dn, qn - dn, cy); - cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp); - qp += dn; - np += dn; - diff --git a/patches/gmp/5.0.2/120-fix-r0-clobbering-issue.patch b/patches/gmp/5.0.2/120-fix-r0-clobbering-issue.patch deleted file mode 100644 index d12d6b2..0000000 --- a/patches/gmp/5.0.2/120-fix-r0-clobbering-issue.patch +++ /dev/null @@ -1,77 +0,0 @@ -Removed ChangeLog part - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1342891151 -7200 -# Node ID 829215e83ff1db3cd00e510a737092df691442d5 -# Parent 816c18dbd492050ef8892e91602d9e758abc2988 -Fix r0 clobbering issue with "large" code affecting elf+darwin PIC. - -diff -r 816c18dbd492 -r 829215e83ff1 mpn/powerpc32/vmx/mod_34lsub1.asm ---- a/mpn/powerpc32/vmx/mod_34lsub1.asm Tue Jun 19 15:02:48 2012 +0200 -+++ b/mpn/powerpc32/vmx/mod_34lsub1.asm Sat Jul 21 19:19:11 2012 +0200 -@@ -1,6 +1,7 @@ - dnl PowerPC-32 mpn_mod_34lsub1 -- mpn remainder mod 2^24-1. - --dnl Copyright 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. -+dnl Copyright 2002, 2003, 2005, 2006, 2007, 2012 Free Software Foundation, -+dnl Inc. - - dnl This file is part of the GNU MP Library. - -@@ -135,15 +136,15 @@ - - andi. r7, up, 15 - vxor a0, v0, v0 -- lis r0, 0xaaaa -+ lis r9, 0xaaaa - vxor a1, v0, v0 -- ori r0, r0, 0xaaab -+ ori r9, r9, 0xaaab - vxor a2, v0, v0 - li r5, 16 - vxor c0, v0, v0 - li r6, 32 - vxor c1, v0, v0 -- LEAL( r11, cnsts) -+ LEAL( r11, cnsts) C CAUTION clobbers r0 for elf, darwin - vxor c2, v0, v0 - vxor z, v0, v0 - -@@ -158,7 +159,7 @@ - vsldoi a2, z, a2, 12 - - addi n, n, 9 -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - -@@ -174,7 +175,7 @@ - vsldoi a1, z, a1, 8 - - addi n, n, 6 -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - -@@ -188,7 +189,7 @@ - vsldoi a0, z, a0, 4 - - addi n, n, 3 -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - -@@ -197,7 +198,7 @@ - b L(0) - - L(aligned16): -- mulhwu r0, n, r0 -+ mulhwu r0, n, r9 - srwi r0, r0, 3 C r0 = floor(n/12) - mtctr r0 - - diff --git a/patches/gmp/5.1.1/100-fix-bulldozer-piledriver.patch b/patches/gmp/5.1.1/100-fix-bulldozer-piledriver.patch deleted file mode 100644 index f6faca1..0000000 --- a/patches/gmp/5.1.1/100-fix-bulldozer-piledriver.patch +++ /dev/null @@ -1,21 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1368052461 -7200 -# Node ID 11fbd825bc45385d00b69c30bd7566acee11f0d2 -# Parent bd4c950486ab4c161ea69b91c25150719c3cb700 -Fix typo. - -diff -r bd4c950486ab -r 11fbd825bc45 mpn/x86_64/bd1/mul_1.asm ---- a/mpn/x86_64/bd1/mul_1.asm Thu May 02 18:20:37 2013 +0200 -+++ b/mpn/x86_64/bd1/mul_1.asm Thu May 09 00:34:21 2013 +0200 -@@ -53,7 +53,7 @@ - IFDOS(` define(`v0', ``%r9'') ') dnl - IFDOS(` define(`r9', ``rdi'') ') dnl - IFDOS(` define(`n', ``%r8'') ') dnl --IFDOS(` define(`r8', ``r11'') ') dnl -+IFDOS(` define(`r8', ``rbx'') ') dnl - - ASM_START() - TEXT - diff --git a/patches/gmp/5.1.1/110-mpz_powm_ui.patch b/patches/gmp/5.1.1/110-mpz_powm_ui.patch deleted file mode 100644 index f0d240c..0000000 --- a/patches/gmp/5.1.1/110-mpz_powm_ui.patch +++ /dev/null @@ -1,39 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1363174284 -3600 -# Node ID ec4d88674036804b26f22c6a2bfca6ae1e92d370 -# Parent e616ff715c34e112d0a5f7535d31ffe1194a5c7d -(mod): Adhere to mpn_mu_div_qr's overlap requirements. - -diff -r e616ff715c34 -r ec4d88674036 mpz/powm_ui.c ---- a/mpz/powm_ui.c Sun Feb 17 19:40:16 2013 +0100 -+++ b/mpz/powm_ui.c Wed Mar 13 12:31:24 2013 +0100 -@@ -2,8 +2,8 @@ - - Contributed to the GNU project by Torbjorn Granlund. - --Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, --2009, 2011, 2012 Free Software Foundation, Inc. -+Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, 2009, -+2011, 2012, 2013 Free Software Foundation, Inc. - - This file is part of the GNU MP Library. - -@@ -70,9 +70,14 @@ - } - else - { -+ /* We need to allocate separate remainder area, since mpn_mu_div_qr does -+ not handle overlap between the numerator and remainder areas. -+ FIXME: Make it handle such overlap. */ -+ mp_ptr rp = TMP_ALLOC_LIMBS (dn); - mp_size_t itch = mpn_mu_div_qr_itch (nn, dn, 0); - mp_ptr scratch = TMP_ALLOC_LIMBS (itch); -- mpn_mu_div_qr (qp, np, np, nn, dp, dn, scratch); -+ mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch); -+ MPN_COPY (np, rp, dn); - } - - TMP_FREE; - diff --git a/patches/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch b/patches/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch deleted file mode 100644 index 13a50ad..0000000 --- a/patches/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch +++ /dev/null @@ -1,164 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1373624469 -7200 -# Node ID a447c0c537891ed23edf180594a89616364ee633 -# Parent 6540e0b2925ead29f7158bb182e4fabfb9441433 -Partial rewrite. - -diff -r 6540e0b2925e -r a447c0c53789 mpn/generic/sbpi1_div_sec.c ---- a/mpn/generic/sbpi1_div_sec.c Mon Jul 01 19:16:32 2013 +0200 -+++ b/mpn/generic/sbpi1_div_sec.c Fri Jul 12 12:21:09 2013 +0200 -@@ -8,7 +8,7 @@ - SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST - GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. - --Copyright 2011, 2012 Free Software Foundation, Inc. -+Copyright 2011, 2012, 2013 Free Software Foundation, Inc. - - This file is part of the GNU MP Library. - -@@ -29,6 +29,28 @@ - #include "gmp-impl.h" - #include "longlong.h" - -+/* This side-channel silent division algorithm reduces the partial remainder by -+ GMP_NUMB_BITS/2 bits at a time, compared to GMP_NUMB_BITS for the main -+ division algorithm. We do not insists on reducing by exactly -+ GMP_NUMB_BITS/2, but may leave a partial remainder that is D*B^i to 3D*B^i -+ too large (B is the limb base, D is the divisor, and i is the induction -+ variable); the subsequent step will handle the extra partial remainder bits. -+ -+ WIth that partial remainder reduction, each step generates a quotient "half -+ limb". The outer loop generates two quotient half limbs, an upper (q1h) and -+ a lower (q0h) which are stored sparsely in separate limb arrays. These -+ arrays are added at the end; using separate arrays avoids data-dependent -+ carry propagation which could else pose a side-channel leakage problem. -+ -+ The quotient half limbs may be between -3 to 0 from the accurate value -+ ("accurate" being the one which corresponds to a reduction to a principal -+ partial remainder). Too small quotient half limbs correspond to too large -+ remainders, which we reduce later, as described above. -+ -+ In order to keep quotients from getting too big, corresponding to a negative -+ partial remainder, we use an inverse which is sligtly smaller than usually. -+*/ -+ - #if OPERATION_sbpi1_div_qr_sec - /* Needs (dn + 1) + (nn - dn) + (nn - dn) = 2nn - dn + 1 limbs at tp. */ - #define FNAME mpn_sbpi1_div_qr_sec -@@ -49,7 +71,7 @@ - mp_limb_t dinv, - mp_ptr tp) - { -- mp_limb_t nh, cy, q1h, q0h, dummy, h; -+ mp_limb_t nh, cy, q1h, q0h, dummy, cnd; - mp_size_t i; - mp_ptr hp; - #if OPERATION_sbpi1_div_qr_sec -@@ -72,77 +94,69 @@ - #endif - } - -+ /* Decremenet inverse to keep quotient half limbs from being too large. */ -+ dinv -= dinv != 0; /* FIXME: cmp-to-int */ -+ - /* Create a divisor copy shifted half a limb. */ - hp = tp; /* (dn + 1) limbs */ -- cy = mpn_lshift (hp, dp, dn, GMP_NUMB_BITS / 2); -- hp[dn] = dp[dn - 1] >> GMP_NUMB_BITS / 2; -+ hp[dn] = mpn_lshift (hp, dp, dn, GMP_NUMB_BITS / 2); - - #if OPERATION_sbpi1_div_qr_sec - qlp = tp + (dn + 1); /* (nn - dn) limbs */ - qhp = tp + (nn + 1); /* (nn - dn) limbs */ - #endif - -- np += nn; -+ np += nn - dn; -+ nh = 0; - -- /* Main loop. Develop one full limb per iteration, but do it in two steps in -- order to avoid conditionals. Quotient bits will be either correct or -- underestimates. When a quotient is underestimated, the next quotient will -- compensate, since quotients are to be added at consecutive weight distance -- GMP_NUMB_BITS/2. We make two quotient arrays, each with GMP_NUMB_BITS/2+2 -- bits per entry. The arrays are added late after the loop. Separate -- arrays avoid data-dependent carry propagation. */ -- nh = 0; - for (i = nn - dn - 1; i >= 0; i--) - { - np--; - -- nh = (nh << GMP_NUMB_BITS/2) + (np[0] >> GMP_NUMB_BITS/2); -+ nh = (nh << GMP_NUMB_BITS/2) + (np[dn] >> GMP_NUMB_BITS/2); - umul_ppmm (q1h, dummy, nh, dinv); - q1h += nh; - #if OPERATION_sbpi1_div_qr_sec - qhp[i] = q1h; - #endif -- cy = mpn_submul_1 (np - dn, hp, dn + 1, q1h); -+ mpn_submul_1 (np, hp, dn + 1, q1h); - -- nh = np[0]; -+ nh = np[dn]; - umul_ppmm (q0h, dummy, nh, dinv); - q0h += nh; - #if OPERATION_sbpi1_div_qr_sec - qlp[i] = q0h; - #endif -- cy = mpn_submul_1 (np - dn, dp, dn, q0h); -- -- nh -= cy; -+ nh -= mpn_submul_1 (np, dp, dn, q0h); - } - -- np[0] = nh; -- -- np -= dn; -- - /* 1st adjustment depends on extra high remainder limb. */ -- h = np[dn]; -+ cnd = nh != 0; /* FIXME: cmp-to-int */ - #if OPERATION_sbpi1_div_qr_sec -- qlp[0] += h; -+ qlp[0] += cnd; - #endif -- h -= mpn_subcnd_n (np, np, dp, dn, h); -+ nh -= mpn_subcnd_n (np, np, dp, dn, cnd); - -- /* 2nd adjustment depends on remainder/divisor comparision as well as whether -+ /* 2nd adjustment depends on remainder/divisor comparison as well as whether - extra remainder limb was nullified by previous subtract. */ - cy = mpn_sub_n (np, np, dp, dn); -- cy = cy == h; /* FIXME: might leak on some archs */ -+ cy = cy - nh; - #if OPERATION_sbpi1_div_qr_sec -- qlp[0] += cy; -+ qlp[0] += 1 - cy; - #endif -- mpn_addcnd_n (np, np, dp, dn, 1 - cy); -+ mpn_addcnd_n (np, np, dp, dn, cy); - -+ /* 3rd adjustment depends on remainder/divisor comparison. */ -+ cy = mpn_sub_n (np, np, dp, dn); -+#if OPERATION_sbpi1_div_qr_sec -+ qlp[0] += 1 - cy; -+#endif -+ mpn_addcnd_n (np, np, dp, dn, cy); -+ -+#if OPERATION_sbpi1_div_qr_sec - /* Combine quotient halves into final quotient. */ --#if OPERATION_sbpi1_div_qr_sec -- qh = 0; -- if (nn - dn != 0) -- { -- qh = mpn_lshift (qhp, qhp, nn - dn, GMP_NUMB_BITS/2); -- qh += mpn_add_n (qp, qhp, qlp, nn - dn); -- } -+ qh = mpn_lshift (qhp, qhp, nn - dn, GMP_NUMB_BITS/2); -+ qh += mpn_add_n (qp, qhp, qlp, nn - dn); - - return qh; - #else - diff --git a/patches/gmp/5.1.1/130-do-not-clobber-f16-f18.patch b/patches/gmp/5.1.1/130-do-not-clobber-f16-f18.patch deleted file mode 100644 index 9f9f470..0000000 --- a/patches/gmp/5.1.1/130-do-not-clobber-f16-f18.patch +++ /dev/null @@ -1,73 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1369216954 -7200 -# Node ID 394bdf8fdaee749660cc5680cc0636ea0242fae7 -# Parent 0771124b9f13b218a3f07f7dd7c127961974489d -Don't clobber f16-f18. - -diff -r 0771124b9f13 -r 394bdf8fdaee mpn/ia64/divrem_2.asm ---- a/mpn/ia64/divrem_2.asm Mon May 20 16:56:05 2013 +0200 -+++ b/mpn/ia64/divrem_2.asm Wed May 22 12:02:34 2013 +0200 -@@ -1,6 +1,6 @@ - dnl IA-64 mpn_divrem_2 -- Divide an mpn number by a normalized 2-limb number. - --dnl Copyright 2010 Free Software Foundation, Inc. -+dnl Copyright 2010, 2013 Free Software Foundation, Inc. - - dnl This file is part of the GNU MP Library. - -@@ -98,17 +98,17 @@ - br.call.sptk.many b0 = mpn_invert_limb - ;; - setf.sig f11 = r8 // di (non-final) -- setf.sig f18 = r39 // d1 -- setf.sig f17 = r36 // d0 -+ setf.sig f34 = r39 // d1 -+ setf.sig f33 = r36 // d0 - mov r1 = r43 - ;; - mov r17 = 1 - setf.sig f9 = r38 // n2 -- xma.l f6 = f11, f18, f0 // t0 = LO(di * d1) -+ xma.l f6 = f11, f34, f0 // t0 = LO(di * d1) - ;; - setf.sig f10 = r37 // n1 - setf.sig f15 = r17 // 1 -- xma.hu f8 = f11, f17, f0 // s0 = HI(di * d0) -+ xma.hu f8 = f11, f33, f0 // s0 = HI(di * d0) - ;; - getf.sig r17 = f6 - getf.sig r16 = f8 -@@ -178,7 +178,7 @@ - (p9) br.cond.dptk .L52 - .L46: - ') -- setf.sig f16 = r8 // di -+ setf.sig f32 = r8 // di - shladd r32 = r35, 3, r32 - ;; - -@@ -189,8 +189,8 @@ - ;; - (p8) mov r37 = r0 - (p9) ld8 r37 = [r34], -8 -- xma.hu f8 = f9, f16, f10 // 0,29 -- xma.l f12 = f9, f16, f10 // 0 -+ xma.hu f8 = f9, f32, f10 // 0,29 -+ xma.l f12 = f9, f32, f10 // 0 - ;; - getf.sig r20 = f12 // q0 4 - xma.l f13 = f15, f8, f9 // q += n2 4 -@@ -198,8 +198,8 @@ - ;; - getf.sig r18 = f13 // 8 - xma.l f7 = f14, f13, f10 // 8 -- xma.l f6 = f17, f13, f17 // t0 = LO(d0*q+d0) 8 -- xma.hu f9 = f17, f13, f17 // t1 = HI(d0*q+d0) 9 -+ xma.l f6 = f33, f13, f33 // t0 = LO(d0*q+d0) 8 -+ xma.hu f9 = f33, f13, f33 // t1 = HI(d0*q+d0) 9 - ;; - getf.sig r38 = f7 // n1 12 - getf.sig r16 = f6 // 13 - diff --git a/patches/gmp/6.1.0/100-fix-broadwell-skylake.patch b/patches/gmp/6.1.0/100-fix-broadwell-skylake.patch deleted file mode 100644 index 9afd339..0000000 --- a/patches/gmp/6.1.0/100-fix-broadwell-skylake.patch +++ /dev/null @@ -1,59 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <torbjorng@google.com> -# Date 1450109109 -3600 -# Node ID 67d4ee9dead1ed8b1c9f4eb320ac72208fe1a015 -# Parent 20bf21d5f600710d62b040ea9b20da22871db1f1 -Add FUNC_EXITs. - -diff -r 20bf21d5f600 -r 67d4ee9dead1 NEWS ---- a/NEWS Mon Dec 14 08:37:18 2015 +0100 -+++ b/NEWS Mon Dec 14 17:05:09 2015 +0100 -@@ -4,6 +4,11 @@ - medium, provided this notice is preserved. - - -+Changes between GMP version 6.1.1 and 6.1.0 -+ -+ BUGS FIXED -+ * . -+ - Changes between GMP version 6.0.* and 6.1.0 - - BUGS FIXED -diff -r 20bf21d5f600 -r 67d4ee9dead1 mpn/x86_64/coreibwl/mul_basecase.asm ---- a/mpn/x86_64/coreibwl/mul_basecase.asm Mon Dec 14 08:37:18 2015 +0100 -+++ b/mpn/x86_64/coreibwl/mul_basecase.asm Mon Dec 14 17:05:09 2015 +0100 -@@ -94,6 +94,7 @@ - - L(s11): mov %rax, (rp) - mov %r9, 8(rp) -+ FUNC_EXIT() - ret - - L(s2x): cmp $2, vn -@@ -105,6 +106,7 @@ - mov %rax, (rp) - mov %r9, 8(rp) - mov %r10, 16(rp) -+ FUNC_EXIT() - ret - - L(s22): add %r8, %r9 C 1 -@@ -121,6 +123,7 @@ - mov %r9, 8(rp) - mov %r10, 16(rp) - mov %rdx, 24(rp) -+ FUNC_EXIT() - ret - - ALIGN(16) -@@ -294,6 +297,7 @@ - pop %r12 - pop %rbp - pop %rbx -+ FUNC_EXIT() - ret - - L(f2): - diff --git a/patches/libelf/0.8.12/100-fix-64-bit-detection.patch b/patches/libelf/0.8.12/100-fix-64-bit-detection.patch deleted file mode 100644 index 7995443..0000000 --- a/patches/libelf/0.8.12/100-fix-64-bit-detection.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur libelf-0.8.10.orig/configure libelf-0.8.10/configure ---- libelf-0.8.10.orig/configure 2007-09-07 14:08:06.000000000 +0200 -+++ libelf-0.8.10/configure 2008-10-23 22:43:19.000000000 +0200 -@@ -1595,7 +1595,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then -- ac_cv_sizeof_long_long=0 -+ ac_cv_sizeof_long_long=8 - else - cat > conftest.$ac_ext <<EOF - #line 1602 "configure" -diff -dur libelf-0.8.10.orig/configure.in libelf-0.8.10/configure.in ---- libelf-0.8.10.orig/configure.in 2007-09-07 14:07:59.000000000 +0200 -+++ libelf-0.8.10/configure.in 2008-10-23 22:43:10.000000000 +0200 -@@ -90,7 +90,7 @@ - AC_CHECK_SIZEOF(short,2) - AC_CHECK_SIZEOF(int,4) - AC_CHECK_SIZEOF(long,4) --AC_CHECK_SIZEOF(long long,0) -+AC_CHECK_SIZEOF(long long,8) - # Windows port - AC_CHECK_SIZEOF(__int64, 0) - diff --git a/patches/libelf/0.8.13/100-fix-64-bit-detection.patch b/patches/libelf/0.8.13/100-fix-64-bit-detection.patch deleted file mode 100644 index 7995443..0000000 --- a/patches/libelf/0.8.13/100-fix-64-bit-detection.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur libelf-0.8.10.orig/configure libelf-0.8.10/configure ---- libelf-0.8.10.orig/configure 2007-09-07 14:08:06.000000000 +0200 -+++ libelf-0.8.10/configure 2008-10-23 22:43:19.000000000 +0200 -@@ -1595,7 +1595,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - if test "$cross_compiling" = yes; then -- ac_cv_sizeof_long_long=0 -+ ac_cv_sizeof_long_long=8 - else - cat > conftest.$ac_ext <<EOF - #line 1602 "configure" -diff -dur libelf-0.8.10.orig/configure.in libelf-0.8.10/configure.in ---- libelf-0.8.10.orig/configure.in 2007-09-07 14:07:59.000000000 +0200 -+++ libelf-0.8.10/configure.in 2008-10-23 22:43:10.000000000 +0200 -@@ -90,7 +90,7 @@ - AC_CHECK_SIZEOF(short,2) - AC_CHECK_SIZEOF(int,4) - AC_CHECK_SIZEOF(long,4) --AC_CHECK_SIZEOF(long long,0) -+AC_CHECK_SIZEOF(long long,8) - # Windows port - AC_CHECK_SIZEOF(__int64, 0) - diff --git a/patches/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch b/patches/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch deleted file mode 100644 index 382c841..0000000 --- a/patches/libiconv/1.14/100-srclib_stdio.in.h-remove-gets-declarations.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -r -u libiconv-1.14/srclib/stdio.in.h.orig libiconv-1.14/srclib/stdio.in.h ---- libiconv-1.14/srclib/stdio.in.h.orig 2013-02-22 13:52:46.336327969 -0600 -+++ libiconv-1.14/srclib/stdio.in.h 2013-02-22 13:54:27.948207059 -0600 -@@ -679,22 +679,11 @@ - # endif - #endif - --#if @GNULIB_GETS@ --# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ --# if !(defined __cplusplus && defined GNULIB_NAMESPACE) --# undef gets --# define gets rpl_gets --# endif --_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); --_GL_CXXALIAS_RPL (gets, char *, (char *s)); --# else --_GL_CXXALIAS_SYS (gets, char *, (char *s)); --# undef gets --# endif --_GL_CXXALIASWARN (gets); - /* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ -+ so any use of gets warrants an unconditional warning; besides, C11 -+ removed it. */ -+#undef gets -+#if HAVE_RAW_DECL_GETS - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); - #endif - diff --git a/patches/libtool/2.4.6/2.4.5-pass-ldflags.patch b/patches/libtool/2.4.6/2.4.5-pass-ldflags.patch deleted file mode 100644 index d35e343..0000000 --- a/patches/libtool/2.4.6/2.4.5-pass-ldflags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- libtool-2.4.5.orig/build-aux/ltmain.in 2015-01-16 12:52:04.000000000 -0600 -+++ libtool-2.4.5/build-aux/ltmain.in 2015-02-07 22:45:14.421079200 -0600 -@@ -5356,7 +5356,8 @@ func_mode_link () - # -stdlib=* select c++ std lib with clang - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) -+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -+ -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result - func_append compile_command " $arg" diff --git a/patches/ltrace/0.5.2/100-allow-cross-compile.patch b/patches/ltrace/0.5.2/100-allow-cross-compile.patch deleted file mode 100644 index 10440ad..0000000 --- a/patches/ltrace/0.5.2/100-allow-cross-compile.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in ---- ltrace-0.5.2.orig/Makefile.in 2009-05-21 19:14:54.000000000 +0200 -+++ ltrace-0.5.2/Makefile.in 2009-06-27 15:30:34.000000000 +0200 -@@ -2,8 +2,14 @@ - # ltrace's Makefile.in - # - --#OS := $(shell uname -s) - OS := @HOST_OS@ -+ARCH := $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/ \ -+ -e s/sun4u/sparc64/ \ -+ -e s/arm.*/arm/ \ -+ -e s/sa110/arm/ \ -+ -e s/ppc64/ppc/ \ -+ -e s/s390x/s390/) -+export ARCH - - TOPDIR = $(shell pwd) - -diff -durN ltrace-0.5.2.orig/configure ltrace-0.5.2/configure ---- ltrace-0.5.2.orig/configure 2009-05-21 19:14:57.000000000 +0200 -+++ ltrace-0.5.2/configure 2009-06-27 15:30:34.000000000 +0200 -@@ -660,6 +660,7 @@ - host_cpu - host_vendor - host_os -+HOST_ARCH - HOST_OS - CC - CFLAGS -@@ -1823,6 +1824,7 @@ - case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -+HOST_ARCH="$host_cpu" - case "$host_os" in - linux-gnu*) host_os=linux-gnu - esac -@@ -5406,6 +5408,7 @@ - host_cpu!$host_cpu$ac_delim - host_vendor!$host_vendor$ac_delim - host_os!$host_os$ac_delim -+HOST_ARCH!$HOST_ARCH$ac_delim - HOST_OS!$HOST_OS$ac_delim - CC!$CC$ac_delim - CFLAGS!$CFLAGS$ac_delim -@@ -5426,7 +5429,7 @@ - LTLIBOBJS!$LTLIBOBJS$ac_delim - _ACEOF - -- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then -+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac ---- ltrace-0.5.2.orig/configure.ac 2009-05-21 19:14:54.000000000 +0200 -+++ ltrace-0.5.2/configure.ac 2009-06-27 15:30:34.000000000 +0200 -@@ -11,6 +11,8 @@ - esac - HOST_OS="$host_os" - AC_SUBST(HOST_OS) -+HOST_ARCH="$host_cpu" -+AC_SUBST(HOST_ARCH) - - dnl Checks for programs. - AC_PROG_CC -diff -durN ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.2/sysdeps/linux-gnu/Makefile ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile 2009-05-21 19:14:54.000000000 +0200 -+++ ltrace-0.5.2/sysdeps/linux-gnu/Makefile 2009-06-27 15:30:34.000000000 +0200 -@@ -1,6 +1,3 @@ --ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/ppc64/ppc/ -e s/s390x/s390/) -- - CPPFLAGS += -I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH) - - OBJ = events.o trace.o proc.o breakpoint.o diff --git a/patches/ltrace/0.5.2/110-alpha-support.patch b/patches/ltrace/0.5.2/110-alpha-support.patch deleted file mode 100644 index f121ca1..0000000 --- a/patches/ltrace/0.5.2/110-alpha-support.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in ---- ltrace-0.5.2.orig/Makefile.in 2009-06-27 15:34:04.000000000 +0200 -+++ ltrace-0.5.2/Makefile.in 2009-06-27 15:34:27.000000000 +0200 -@@ -5,6 +5,7 @@ - OS := @HOST_OS@ - ARCH := $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/ \ - -e s/sun4u/sparc64/ \ -+ -e s/alpha.*/alpha/ \ - -e s/arm.*/arm/ \ - -e s/sa110/arm/ \ - -e s/ppc64/ppc/ \ diff --git a/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch b/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch deleted file mode 100644 index 6d62315..0000000 --- a/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch +++ /dev/null @@ -1,240 +0,0 @@ ---- ltrace-0.5.2.orig/TODO -+++ ltrace-0.5.2/TODO -@@ -37,3 +37,4 @@ - * debug: change "-d" option to be something like "-d elf,events", or "-d breakpoints" - * Find out if a process is sharing memory with its parent? - * When using -p, find out if that process is sharing memory with other procs -+* After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p()) ---- ltrace-0.5.2.orig/process_event.c -+++ ltrace-0.5.2/process_event.c -@@ -170,7 +170,7 @@ - enable_breakpoint(proc->pid, proc->breakpoint_being_enabled); - proc->breakpoint_being_enabled = NULL; - } -- if (proc->parent->state == STATE_ATTACHED && options.follow) { -+ if (options.follow) { - proc->state = STATE_ATTACHED; - } else { - proc->state = STATE_IGNORED; ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/ppc/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/ppc/trace.c -@@ -50,9 +50,9 @@ - *sysnum = - (int)ptrace(PTRACE_PEEKUSER, proc->pid, - sizeof(long) * PT_R0, 0); -- if (proc->callstack_depth > 0 -- && proc->callstack[proc->callstack_depth - -- 1].is_syscall) { -+ if (proc->callstack_depth > 0 && -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { - return 2; - } - return 1; ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/i386/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/i386/trace.c -@@ -32,7 +32,8 @@ - *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 4 * ORIG_EAX, 0); - - if (proc->callstack_depth > 0 && -- proc->callstack[proc->callstack_depth - 1].is_syscall) { -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { - return 2; - } - ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/ia64/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/ia64/trace.c -@@ -106,8 +106,8 @@ - if (insn == 0x1000000000 || insn == 0x1ffffffffff) { - *sysnum = r15; - if (proc->callstack_depth > 0 && -- proc->callstack[proc->callstack_depth - -- 1].is_syscall) { -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { - return 2; - } - return 1; ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/m68k/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/m68k/trace.c -@@ -36,9 +36,8 @@ - if (*sysnum >= 0) { - depth = proc->callstack_depth; - if (depth > 0 && -- proc->callstack[depth - 1].is_syscall && -- proc->callstack[depth - 1].c_un.syscall == -- *sysnum) { -+ proc->callstack[depth - 1].is_syscall && -+ proc->callstack[depth - 1].c_un.syscall == *sysnum) { - return 2; - } else { - return 1; ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/alpha/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/alpha/trace.c -@@ -36,8 +36,9 @@ - return 0; - *sysnum = - ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0); -- if (proc->callstack_depth > 0 -- && proc->callstack[proc->callstack_depth - 1].is_syscall) { -+ if (proc->callstack_depth > 0 && -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { - return 2; - } - if (*sysnum >= 0 && *sysnum < 500) { ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/sparc/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/sparc/trace.c -@@ -33,9 +33,9 @@ - insn = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0); - if ((insn & 0xc1f8007f) == 0x81d00010) { - *sysnum = ((proc_archdep *) proc->arch_ptr)->regs.r_g1; -- if ((proc->callstack_depth > 0) -- && proc->callstack[proc->callstack_depth - -- 1].is_syscall) { -+ if (proc->callstack_depth > 0 && -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { - return 2; - } else if (*sysnum >= 0) { - return 1; ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/mipsel/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/mipsel/trace.c -@@ -60,33 +60,34 @@ - int - syscall_p(Process *proc, int status, int *sysnum) { - if (WIFSTOPPED(status) -- && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { -- /* get the user's pc (plus 8) */ -- long pc = (long)get_instruction_pointer(proc); -- /* fetch the SWI instruction */ -- int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0); -- int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0); -- --/* -- On a mipsel, syscall looks like: -- 24040fa1 li v0, 0x0fa1 # 4001 --> _exit syscall -- 0000000c syscall -- */ -- if(insn!=0x0000000c){ -- return 0; -- } -- -- *sysnum = (num & 0xFFFF) - 4000; -- /* if it is a syscall, return 1 or 2 */ -- if (proc->callstack_depth > 0 && -- proc->callstack[proc->callstack_depth - 1].is_syscall) { -- return 2; -- } -- -- if (*sysnum >= 0) { -- return 1; -- } -- } -+ && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { -+ /* get the user's pc (plus 8) */ -+ long pc = (long)get_instruction_pointer(proc); -+ /* fetch the SWI instruction */ -+ int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0); -+ int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0); -+ -+ /* -+ On a mipsel, syscall looks like: -+ 24040fa1 li v0, 0x0fa1 # 4001 --> _exit syscall -+ 0000000c syscall -+ */ -+ if(insn!=0x0000000c){ -+ return 0; -+ } -+ -+ *sysnum = (num & 0xFFFF) - 4000; -+ /* if it is a syscall, return 1 or 2 */ -+ if (proc->callstack_depth > 0 && -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { -+ return 2; -+ } -+ -+ if (*sysnum >= 0) { -+ return 1; -+ } -+ } - return 0; - } - /** -@@ -119,34 +120,34 @@ - */ - long - gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) { -- long ret; -- debug(2,"type %d arg %d",type,arg_num); -- if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){ -- if(arg_num <4){ -- ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0); -- debug(2,"ret = %#lx",ret); -- return ret; -- } else { -- // If we need this, I think we can look at [sp+16] for arg_num==4. -- CP; -- return 0; -- } -- } -- if(arg_num>=0){ -- fprintf(stderr,"args on return?"); -- } -- if(type == LT_TOF_FUNCTIONR) { -- return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0); -- } -- if (type == LT_TOF_SYSCALLR) { -- unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0); -- unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0); -- if(!a3){ -- return v0; -- } -- return -1; -- } -- fprintf(stderr, "gimme_arg called with wrong arguments\n"); -+ long ret; -+ debug(2,"type %d arg %d",type,arg_num); -+ if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){ -+ if(arg_num <4){ -+ ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0); -+ debug(2,"ret = %#lx",ret); -+ return ret; -+ } else { -+ // If we need this, I think we can look at [sp+16] for arg_num==4. -+ CP; -+ return 0; -+ } -+ } -+ if(arg_num>=0){ -+ fprintf(stderr,"args on return?"); -+ } -+ if(type == LT_TOF_FUNCTIONR) { -+ return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0); -+ } -+ if (type == LT_TOF_SYSCALLR) { -+ unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0); -+ unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0); -+ if(!a3){ -+ return v0; -+ } -+ return -1; -+ } -+ fprintf(stderr, "gimme_arg called with wrong arguments\n"); - return 0; - } - ---- ltrace-0.5.2.orig/sysdeps/linux-gnu/x86_64/trace.c -+++ ltrace-0.5.2/sysdeps/linux-gnu/x86_64/trace.c -@@ -41,7 +41,8 @@ - *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 8 * ORIG_RAX, 0); - - if (proc->callstack_depth > 0 && -- proc->callstack[proc->callstack_depth - 1].is_syscall) { -+ proc->callstack[proc->callstack_depth - 1].is_syscall && -+ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { - return 2; - } - diff --git a/patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch b/patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch deleted file mode 100644 index 20396d6..0000000 --- a/patches/ltrace/0.5.2/130-fix-build-with-exotic-linux-host-OS.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -durN ltrace-0.5.2.orig/configure ltrace-0.5.2/configure ---- ltrace-0.5.2.orig/configure 2009-09-14 18:47:45.000000000 +0200 -+++ ltrace-0.5.2/configure 2009-09-14 18:49:18.000000000 +0200 -@@ -1829,6 +1829,9 @@ - linux-gnu*) host_os=linux-gnu - esac - HOST_OS="$host_os" -+case "${HOST_OS}" in -+ linux-*) HOST_OS=linux-gnu;; -+esac - - - ac_ext=c -diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac ---- ltrace-0.5.2.orig/configure.ac 2009-09-14 18:47:45.000000000 +0200 -+++ ltrace-0.5.2/configure.ac 2009-09-14 18:49:18.000000000 +0200 -@@ -10,6 +10,9 @@ - linux-gnu*) host_os=linux-gnu - esac - HOST_OS="$host_os" -+case "${HOST_OS}" in -+ linux-*) HOST_OS=linux-gnu;; -+esac - AC_SUBST(HOST_OS) - HOST_ARCH="$host_cpu" - AC_SUBST(HOST_ARCH) diff --git a/patches/ltrace/0.5.3/100-allow-cross-compile.patch b/patches/ltrace/0.5.3/100-allow-cross-compile.patch deleted file mode 100644 index 58572cd..0000000 --- a/patches/ltrace/0.5.3/100-allow-cross-compile.patch +++ /dev/null @@ -1,84 +0,0 @@ -This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com> - -http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1 - -Index: ltrace-0.5.3/common.h -=================================================================== ---- ltrace-0.5.3.orig/common.h 2009-10-23 23:13:45.700282578 -0700 -+++ ltrace-0.5.3/common.h 2009-10-23 23:14:13.550371553 -0700 -@@ -1,3 +1,5 @@ -+#ifndef COMMON_H -+#define COMMON_H - #include <sys/types.h> - #include <sys/time.h> - #include <stdio.h> -@@ -251,3 +253,5 @@ extern void * sym2addr(Process *, struct - #if 0 /* not yet */ - extern int umoven(Process * proc, void * addr, int len, void * laddr); - #endif -+#endif -+ -Index: ltrace-0.5.3/configure -=================================================================== ---- ltrace-0.5.3.orig/configure 2009-10-23 23:13:45.630316494 -0700 -+++ ltrace-0.5.3/configure 2009-10-23 23:13:59.672869527 -0700 -@@ -30,7 +30,7 @@ int main () { - return cplus_demangle(); - } - EOF --if gcc conftest.c -liberty 2>/dev/null -+if $CC conftest.c -liberty 2>/dev/null - then - HAVE_LIBIBERTY=1 - echo "yes" -@@ -48,7 +48,7 @@ int main () { - return __cxa_demangle(); - } - EOF --if gcc conftest.c -lsupc++ 2>/dev/null -+if $CC conftest.c -lsupc++ 2>/dev/null - then - HAVE_LIBSUPC__=1 - echo "yes" -@@ -67,7 +67,7 @@ int main () { - return 0; - } - EOF --if gcc conftest.c 2>/dev/null -+if $CC conftest.c 2>/dev/null - then - HAVE_ELF_C_READ_MMAP=1 - echo "yes" -@@ -77,15 +77,12 @@ else - fi - rm -f conftest.c a.out - --CC=gcc --CPPFLAGS=' -I /usr/include/libelf' - CFLAGS='-g -O2' - LIBS='-lelf -lsupc++ -liberty ' --INSTALL='/usr/bin/install -c' -+INSTALL='install -c' - iquote='-iquote ' - iquoteend='' - --prefix=/usr/local - sysconfdir='${prefix}/etc' - bindir='${prefix}/bin' - mandir='${prefix}/share/man' -Index: ltrace-0.5.3/debug.h -=================================================================== ---- ltrace-0.5.3.orig/debug.h 2009-10-23 23:13:45.670276809 -0700 -+++ ltrace-0.5.3/debug.h 2009-10-23 23:14:26.440319785 -0700 -@@ -1,3 +1,5 @@ -+#ifndef DEBUG_H -+#define DEBUG_H - #include <features.h> - - /* debug levels: -@@ -14,4 +16,4 @@ void debug_(int level, const char *file, - int xinfdump(long, void *, int); - - # define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr) -- -+#endif diff --git a/patches/ltrace/0.5.3/110-alpha-support.patch b/patches/ltrace/0.5.3/110-alpha-support.patch deleted file mode 100644 index 838b84b..0000000 --- a/patches/ltrace/0.5.3/110-alpha-support.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.3/sysdeps/linux-gnu/Makefile ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile 2009-07-25 17:13:02.000000000 +0200 -+++ ltrace-0.5.3/sysdeps/linux-gnu/Makefile 2010-01-01 22:20:45.000000000 +0100 -@@ -2,6 +2,7 @@ - -e s/i.86/i386/ \ - -e s/sun4u/sparc64/ \ - -e s/sparc64/sparc/ \ -+ -e s/alpha.*/alpha/ \ - -e s/arm.*/arm/ \ - -e s/sa110/arm/ \ - -e s/ppc64/ppc/ \ diff --git a/patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch b/patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch deleted file mode 100644 index 483c743..0000000 --- a/patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch +++ /dev/null @@ -1,78 +0,0 @@ -Debian patch courtesy of the Debian ltrace maintainer Juan Cespedes <cespedes@debian.org> - ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/breakpoint.c -+++ ltrace-0.5.3/sysdeps/linux-gnu/breakpoint.c -@@ -6,8 +6,6 @@ - #include "common.h" - #include "arch.h" - --static unsigned char break_insn[] = BREAKPOINT_VALUE; -- - #ifdef ARCH_HAVE_ENABLE_BREAKPOINT - extern void arch_enable_breakpoint(pid_t, Breakpoint *); - void -@@ -20,6 +18,9 @@ - arch_enable_breakpoint(pid, sbp); - } - #else -+ -+static unsigned char break_insn[] = BREAKPOINT_VALUE; -+ - void - enable_breakpoint(pid_t pid, Breakpoint *sbp) { - unsigned int i, j; ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/arm/breakpoint.c -+++ ltrace-0.5.3/sysdeps/linux-gnu/arm/breakpoint.c -@@ -24,10 +24,7 @@ - - #include <sys/ptrace.h> - #include "config.h" --#include "arch.h" --#include "options.h" --#include "output.h" --#include "debug.h" -+#include "common.h" - - void - arch_enable_breakpoint(pid_t pid, Breakpoint *sbp) { -@@ -59,8 +56,6 @@ - void - arch_disable_breakpoint(pid_t pid, const Breakpoint *sbp) { - unsigned int i, j; -- const unsigned char break_insn[] = BREAKPOINT_VALUE; -- const unsigned char thumb_break_insn[] = THUMB_BREAKPOINT_VALUE; - - debug(1, "arch_disable_breakpoint(%d,%p)", pid, sbp->addr); - ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/plt.c -+++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/plt.c -@@ -1,4 +1,5 @@ - #include <gelf.h> -+#include <sys/ptrace.h> - #include "common.h" - - /* A bundle is 128 bits */ ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/breakpoint.c -+++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/breakpoint.c -@@ -6,10 +6,7 @@ - - #include <sys/ptrace.h> - #include <string.h> --#include "arch.h" --#include "options.h" --#include "output.h" --#include "debug.h" -+#include "common.h" - - static long long - extract_bit_field(char *bundle, int from, int len) { ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/regs.c -+++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/regs.c -@@ -7,7 +7,6 @@ - #include <asm/rse.h> - - #include <stddef.h> --#include "debug.h" - #include "common.h" - - void * diff --git a/patches/ltrace/0.5.3/130-add-sysdep.patch b/patches/ltrace/0.5.3/130-add-sysdep.patch deleted file mode 100644 index 6fd8d26..0000000 --- a/patches/ltrace/0.5.3/130-add-sysdep.patch +++ /dev/null @@ -1,17 +0,0 @@ -This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com> - -http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1 - -Index: ltrace-0.5.3/Makefile.in -=================================================================== ---- ltrace-0.5.3.orig/Makefile.in 2009-10-23 22:06:08.130304691 -0700 -+++ ltrace-0.5.3/Makefile.in 2009-10-23 22:06:53.160369614 -0700 -@@ -39,6 +39,8 @@ ltrace: main.o libltrace.a - libltrace.a: sysdeps/sysdep.o $(OBJ) - $(AR) rcv $@ $^ - -+$(OBJ): sysdeps/sysdep.o -+ - sysdeps/sysdep.o: dummy - $(MAKE) -C sysdeps/$(OS) - diff --git a/patches/ltrace/0.5.3/140-mips-remove-CP.patch b/patches/ltrace/0.5.3/140-mips-remove-CP.patch deleted file mode 100644 index 4532a8f..0000000 --- a/patches/ltrace/0.5.3/140-mips-remove-CP.patch +++ /dev/null @@ -1,16 +0,0 @@ -This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com> - -http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1 - -Index: ltrace-0.5.3/sysdeps/linux-gnu/mipsel/trace.c -=================================================================== ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/mipsel/trace.c 2009-10-23 23:15:59.822783128 -0700 -+++ ltrace-0.5.3/sysdeps/linux-gnu/mipsel/trace.c 2009-10-23 23:16:10.441268788 -0700 -@@ -127,7 +127,6 @@ gimme_arg(enum tof type, Process *proc, - return ret; - } else { - // If we need this, I think we can look at [sp+16] for arg_num==4. -- CP; - return 0; - } - } diff --git a/patches/ltrace/0.5.3/140-mips.patch b/patches/ltrace/0.5.3/140-mips.patch deleted file mode 100644 index b01b7a9..0000000 --- a/patches/ltrace/0.5.3/140-mips.patch +++ /dev/null @@ -1,40 +0,0 @@ -This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com> - -http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1 - -Index: ltrace-0.5.3/sysdeps/linux-gnu/mipsel/plt.c -=================================================================== ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/mipsel/plt.c 2009-10-23 23:25:59.292780574 -0700 -+++ ltrace-0.5.3/sysdeps/linux-gnu/mipsel/plt.c 2009-10-23 23:26:22.671522220 -0700 -@@ -1,4 +1,4 @@ --#include <debug.h> -+#include "debug.h" - #include <gelf.h> - #include <sys/ptrace.h> - #include "common.h" -Index: ltrace-0.5.3/sysdeps/linux-gnu/mipsel/regs.c -=================================================================== ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/mipsel/regs.c 2009-10-23 23:25:59.312777529 -0700 -+++ ltrace-0.5.3/sysdeps/linux-gnu/mipsel/regs.c 2009-10-23 23:26:08.190311896 -0700 -@@ -4,7 +4,6 @@ - #include <sys/types.h> - #include <sys/ptrace.h> - #include <asm/ptrace.h> --#include <linux/user.h> - - #include "common.h" - #include "mipsel.h" -Index: ltrace-0.5.3/handle_event.c -=================================================================== ---- ltrace-0.5.3.orig/handle_event.c 2009-10-23 23:29:48.780274445 -0700 -+++ ltrace-0.5.3/handle_event.c 2009-10-23 23:37:32.260284055 -0700 -@@ -573,7 +573,8 @@ handle_breakpoint(Event *event) { - void *old_addr; - struct library_symbol *sym= event->proc->callstack[i].c_un.libfunc; - assert(sym); -- old_addr = dict_find_entry(event->proc->breakpoints, sym2addr(event->proc, sym))->addr; -+ struct Breakpoint *tbp = dict_find_entry(event->proc->breakpoints, sym2addr(event->proc, sym)); -+ old_addr = tbp->addr; - addr=sym2addr(event->proc,sym); - assert(old_addr !=0 && addr !=0); - if(addr != old_addr){ diff --git a/patches/ltrace/0.5.3/150-allow-configurable-arch.patch b/patches/ltrace/0.5.3/150-allow-configurable-arch.patch deleted file mode 100644 index 7208ca8..0000000 --- a/patches/ltrace/0.5.3/150-allow-configurable-arch.patch +++ /dev/null @@ -1,48 +0,0 @@ -This patch is to ensure the proper ARCH is selected when cross compiling. Make -sure to call the configure script with, e.g., HOST=arm ./configure to select -the arm sysdeps. - - Joachim Nilsson <jocke@vmlinux.org> - -diff -ru ltrace-0.5.3.orig/configure ltrace-0.5.3/configure ---- ltrace-0.5.3.orig/configure 2010-01-02 11:05:55.000000000 +0100 -+++ ltrace-0.5.3/configure 2010-01-02 20:49:11.000000000 +0100 -@@ -110,7 +110,7 @@ - # - # Makefile.in -> Makefile - # --x_subst_vars='PACKAGE_VERSION HOST_OS INSTALL CC CPPFLAGS CFLAGS LDFLAGS LIBS iquote iquoteend prefix sysconfdir mandir docdir' -+x_subst_vars='PACKAGE_VERSION HOST HOST_OS INSTALL CC CPPFLAGS CFLAGS LDFLAGS LIBS iquote iquoteend prefix sysconfdir mandir docdir' - - for i in $x_subst_vars - do -Only in ltrace-0.5.3: configure~ -diff -ru ltrace-0.5.3.orig/Makefile.in ltrace-0.5.3/Makefile.in ---- ltrace-0.5.3.orig/Makefile.in 2010-01-02 11:05:55.000000000 +0100 -+++ ltrace-0.5.3/Makefile.in 2010-01-03 01:28:41.000000000 +0100 -@@ -1,10 +1,12 @@ - # - # ltrace's Makefile.in - # -- -+MY_TARGET = @HOST@ -+ifdef MY_TARGET -+ARCH = $(MY_TARGET) -+endif - #OS := $(shell uname -s) - OS := @HOST_OS@ -- - TOPDIR = $(shell pwd) - - prefix = @prefix@ -Only in ltrace-0.5.3: Makefile.in~ -diff -ru ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.3/sysdeps/linux-gnu/Makefile ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/Makefile 2010-01-02 11:05:55.000000000 +0100 -+++ ltrace-0.5.3/sysdeps/linux-gnu/Makefile 2010-01-02 20:49:51.000000000 +0100 -@@ -1,4 +1,4 @@ --ARCH := $(shell uname -m | sed \ -+ARCH ?= $(shell uname -m | sed \ - -e s/i.86/i386/ \ - -e s/sun4u/sparc64/ \ - -e s/sparc64/sparc/ \ -Only in ltrace-0.5.3/sysdeps/linux-gnu: Makefile~ diff --git a/patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch b/patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch deleted file mode 100644 index b57a166..0000000 --- a/patches/ltrace/0.5.3/160-fix-missing-ptrace-defines.patch +++ /dev/null @@ -1,81 +0,0 @@ -This patch tries to fix the issue when PTRACE_EVENT_FORK is not found in the standard -system headers. The begininngs of this was already in place in trace.c, this patch -only takes that idea and puts it in a shared include file for trace.c *and* events.c. -The latter of which otherwise fails to build on Arm. - - Joachim Nilsson <jocke@vmlinux.org> - -diff -ruN ltrace-0.5.3.orig/sysdeps/linux-gnu/events.c ltrace-0.5.3/sysdeps/linux-gnu/events.c ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/events.c 2009-07-25 17:13:02.000000000 +0200 -+++ ltrace-0.5.3/sysdeps/linux-gnu/events.c 2010-01-03 14:33:46.000000000 +0100 -@@ -7,9 +7,8 @@ - #include <errno.h> - #include <signal.h> - #include <string.h> --#include <sys/ptrace.h> - --#include "common.h" -+#include "trace.h" - - static Event event; - -diff -ruN ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.c ltrace-0.5.3/sysdeps/linux-gnu/trace.c ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.c 2009-07-25 17:13:02.000000000 +0200 -+++ ltrace-0.5.3/sysdeps/linux-gnu/trace.c 2010-01-03 14:33:38.000000000 +0100 -@@ -5,10 +5,9 @@ - #include <unistd.h> - #include <sys/types.h> - #include <sys/wait.h> --#include "ptrace.h" - #include <asm/unistd.h> - --#include "common.h" -+#include "trace.h" - - /* If the system headers did not provide the constants, hard-code the normal - values. */ -diff -ruN ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.h ltrace-0.5.3/sysdeps/linux-gnu/trace.h ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/trace.h 1970-01-01 01:00:00.000000000 +0100 -+++ ltrace-0.5.3/sysdeps/linux-gnu/trace.h 2010-01-03 14:33:26.000000000 +0100 -@@ -0,0 +1,32 @@ -+/* If the system headers did not provide the constants, hard-code the normal values. */ -+#ifndef __SYSDEPS_TRACE_H__ -+#define __SYSDEPS_TRACE_H__ -+ -+#include "ptrace.h" -+#include "common.h" -+ -+#ifndef PTRACE_EVENT_FORK -+#warning PTRACE_EVENT_FORK not found... redefining. -+#define PTRACE_OLDSETOPTIONS 21 -+#define PTRACE_SETOPTIONS 0x4200 -+#define PTRACE_GETEVENTMSG 0x4201 -+ -+/* options set using PTRACE_SETOPTIONS */ -+#define PTRACE_O_TRACESYSGOOD 0x00000001 -+#define PTRACE_O_TRACEFORK 0x00000002 -+#define PTRACE_O_TRACEVFORK 0x00000004 -+#define PTRACE_O_TRACECLONE 0x00000008 -+#define PTRACE_O_TRACEEXEC 0x00000010 -+#define PTRACE_O_TRACEVFORKDONE 0x00000020 -+#define PTRACE_O_TRACEEXIT 0x00000040 -+ -+/* Wait extended result codes for the above trace options. */ -+#define PTRACE_EVENT_FORK 1 -+#define PTRACE_EVENT_VFORK 2 -+#define PTRACE_EVENT_CLONE 3 -+#define PTRACE_EVENT_EXEC 4 -+#define PTRACE_EVENT_VFORK_DONE 5 -+#define PTRACE_EVENT_EXIT 6 -+ -+#endif /* PTRACE_EVENT_FORK */ -+#endif /* __SYSDEPS_TRACE_H__ */ ---- ltrace-0.5.3.orig/sysdeps/linux-gnu/ppc/plt.c 2009-07-25 09:13:02.000000000 -0600 -+++ ltrace-0.5.3/sysdeps/linux-gnu/ppc/plt.c 2010-09-28 18:30:07.091618190 -0600 -@@ -1,5 +1,6 @@ - #include <gelf.h> - #include "common.h" -+#include "ptrace.h" - - GElf_Addr - arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { diff --git a/patches/ltrace/0.5.3/170-lib-supcc.patch b/patches/ltrace/0.5.3/170-lib-supcc.patch deleted file mode 100644 index 8842b91..0000000 --- a/patches/ltrace/0.5.3/170-lib-supcc.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: ltrace-0.5.3/configure -=================================================================== ---- ltrace-0.5.3/configure -+++ ltrace-0.5.3/configure -@@ -78,7 +78,10 @@ fi - rm -f conftest.c a.out - - CFLAGS='-g -O2' --LIBS='-lelf -lsupc++ -liberty ' -+LIBS='-lelf' -+[ -n "$HAVE_LIBSUPC__" ] && LIBS="$LIBS -lsupc++" -+[ -n "$HAVE_LIBIBERTY" ] && LIBS="$LIBS -liberty" -+ - INSTALL='install -c' - iquote='-iquote ' - iquoteend='' diff --git a/patches/ltrace/0.5.3/180-libltrace-genindex.patch b/patches/ltrace/0.5.3/180-libltrace-genindex.patch deleted file mode 100644 index 0b1629b..0000000 --- a/patches/ltrace/0.5.3/180-libltrace-genindex.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru ltrace-0.5.3.org/Makefile.in ltrace-0.5.3/Makefile.in ---- ltrace-0.5.3.org/Makefile.in 2011-08-21 18:55:15.000000000 +0200 -+++ ltrace-0.5.3/Makefile.in 2011-08-21 18:40:53.000000000 +0200 -@@ -39,7 +40,7 @@ - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - libltrace.a: sysdeps/sysdep.o $(OBJ) -- $(AR) rcv $@ $^ -+ $(AR) rscv $@ $^ - - $(OBJ): sysdeps/sysdep.o - diff --git a/patches/ltrace/0.5.3/190-ar-configurable.patch b/patches/ltrace/0.5.3/190-ar-configurable.patch deleted file mode 100644 index 28856a3..0000000 --- a/patches/ltrace/0.5.3/190-ar-configurable.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ru ltrace-0.5.3.org/Makefile.in ltrace-0.5.3/Makefile.in ---- ltrace-0.5.3.org/Makefile.in 2011-08-21 18:55:15.000000000 +0200 -+++ ltrace-0.5.3/Makefile.in 2011-08-21 18:40:53.000000000 +0200 -@@ -15,6 +15,7 @@ - mandir = @mandir@ - docdir = $(prefix)/share/doc/ltrace - -+AR = @AR@ - CC = @CC@ - CFLAGS = -Wall @CFLAGS@ - CPPFLAGS = -iquote $(TOPDIR) -iquote $(TOPDIR)/sysdeps/$(OS) -DSYSCONFDIR=\"$(sysconfdir)\" @CPPFLAGS@ - -diff -ru ltrace-0.5.3.org/configure ltrace-0.5.3/configure ---- ltrace-0.5.3.org/configure 2011-08-21 18:55:15.000000000 +0200 -+++ ltrace-0.5.3/configure 2011-08-21 18:54:46.000000000 +0200 -@@ -113,7 +117,7 @@ - # - # Makefile.in -> Makefile - # --x_subst_vars='PACKAGE_VERSION HOST HOST_OS INSTALL CC CPPFLAGS CFLAGS LDFLAGS LIBS iquote iquoteend prefix sysconfdir mandir docdir' -+x_subst_vars='PACKAGE_VERSION HOST HOST_OS INSTALL AR CC CPPFLAGS CFLAGS LDFLAGS LIBS iquote iquoteend prefix sysconfdir mandir docdir' - - for i in $x_subst_vars - do diff --git a/patches/ltrace/0.5.3/200-configure-hostos.patch b/patches/ltrace/0.5.3/200-configure-hostos.patch deleted file mode 100644 index 36563f4..0000000 --- a/patches/ltrace/0.5.3/200-configure-hostos.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ru ltrace-0.5.3.org/configure ltrace-0.5.3/configure ---- ltrace-0.5.3.org/configure 2011-08-21 18:55:15.000000000 +0200 -+++ ltrace-0.5.3/configure 2011-08-21 18:54:46.000000000 +0200 -@@ -15,8 +15,12 @@ - echo $PACKAGE_VERSION - - echo -n "checking HOST_OS... " --HOST_OS=$( uname -s ) --if [ "$HOST_OS" = "Linux" ] -+if [ -z "$HOST_OS" ] ; then -+ HOST_OS=$( uname -s ) -+else -+ echo -n "using preset: " -+fi -+if [ "$HOST_OS" = "Linux" -o "$HOST_OS" = "linux" ] - then - HOST_OS="linux-gnu" - fi diff --git a/patches/ltrace/0.7.3/001-avoid-libstdc++.patch b/patches/ltrace/0.7.3/001-avoid-libstdc++.patch deleted file mode 100644 index 9cbf557..0000000 --- a/patches/ltrace/0.7.3/001-avoid-libstdc++.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Juan Cespedes <cespedes@debian.org> -Description: avoid warning from dpkg-shlibdeps: - package could avoid a useless dependency if ltrace was not - linked against libstdc++.so.6 (it uses none of the library's symbols) -Last-Update: 2013-12-30 - - ---- a/configure.ac 2013-09-17 01:04:28.000000000 +0200 -+++ b/configure.ac 2013-12-30 12:24:20.000000000 +0100 -@@ -113,6 +113,15 @@ - libstdcxx_LIBS=""]) - AC_SUBST(libstdcxx_LIBS) - -+if test "x$liberty_LIBS" != "x" -+then -+ libsupcxx_LIBS="" -+ libstdcxx_LIBS="" -+elif test "x$libsupcxx_LIBS" != "x" -+then -+ libstdcxx_LIBS="" -+fi -+ - - dnl Check security_get_boolean_active availability. - AC_CHECK_HEADERS(selinux/selinux.h) ---- a/configure 2013-09-17 01:07:46.000000000 +0100 -+++ b/configure 2013-12-30 12:34:23.000000000 +0100 -@@ -11826,6 +11826,15 @@ - - - -+if test "x$liberty_LIBS" != "x" -+then -+ libsupcxx_LIBS="" -+ libstdcxx_LIBS="" -+elif test "x$libsupcxx_LIBS" != "x" -+then -+ libstdcxx_LIBS="" -+fi -+ - - for ac_header in selinux/selinux.h - do : diff --git a/patches/ltrace/0.7.3/002-printf-p.patch b/patches/ltrace/0.7.3/002-printf-p.patch deleted file mode 100644 index 10631d9..0000000 --- a/patches/ltrace/0.7.3/002-printf-p.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Juan Cespedes <cespedes@debian.org> -Description: Prevent freeing static-alloc'd memory for %p and %n in printf -Bug-Debian: http://bugs.debian.org/614994 -Forwarded: http://lists.alioth.debian.org/pipermail/ltrace-devel/2013-September/000953.html -Last-Update: 2014-01-02 - - ---- ltrace-0.7.3.orig/printf.c -+++ ltrace-0.7.3/printf.c -@@ -168,7 +168,7 @@ form_next_param(struct param_enum *self, - type_init_pointer(infop, array, 1); - - } else if (format_type == ARGTYPE_POINTER) { -- type_init_pointer(infop, elt_info, 1); -+ type_init_pointer(infop, elt_info, 0); - - } else { - *infop = *type_get_simple(format_type); diff --git a/patches/ltrace/0.7.3/003-alpha-debug.h.patch b/patches/ltrace/0.7.3/003-alpha-debug.h.patch deleted file mode 100644 index 237026d..0000000 --- a/patches/ltrace/0.7.3/003-alpha-debug.h.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Juan Cespedes <cespedes@debian.org> -Description: fixed FTBFS on alpha - don't include "debug.h" twice -Last-Update: 2014-01-02 -Bug-Debian: http://bugs.debian.org/678721 - - ---- ltrace-0.7.3.orig/sysdeps/linux-gnu/alpha/trace.c -+++ ltrace-0.7.3/sysdeps/linux-gnu/alpha/trace.c -@@ -29,7 +29,6 @@ - - #include "proc.h" - #include "common.h" --#include "debug.h" - - #if (!defined(PTRACE_PEEKUSER) && defined(PTRACE_PEEKUSR)) - # define PTRACE_PEEKUSER PTRACE_PEEKUSR diff --git a/patches/ltrace/0.7.3/004-compile-warning.patch b/patches/ltrace/0.7.3/004-compile-warning.patch deleted file mode 100644 index ad65829..0000000 --- a/patches/ltrace/0.7.3/004-compile-warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Juan Cespedes <cespedes@debian.org> -Description: Fix compile warning -Last-Update: 2014-01-02 -Forwarded: not-needed - - ---- ltrace-0.7.3.orig/value.c -+++ ltrace-0.7.3/value.c -@@ -284,7 +284,7 @@ value_init_deref(struct value *ret_val, - - /* We need "long" to be long enough to hold platform - * pointers. */ -- typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))]; -+ (void)sizeof(char[1 - 2*(sizeof(l) < sizeof(void *))]); - - value_common_init(ret_val, valp->inferior, valp, - valp->type->u.ptr_info.info, 0); ---- ltrace-0.7.3.orig/lens_default.c -+++ ltrace-0.7.3/lens_default.c -@@ -344,7 +344,7 @@ format_array(FILE *stream, struct value - { - /* We need "long" to be long enough to cover the whole address - * space. */ -- typedef char assert__long_enough_long[-(sizeof(long) < sizeof(void *))]; -+ (void)sizeof(char[1 - 2*(sizeof(long) < sizeof(void *))]); - long l; - if (expr_eval_word(length, value, arguments, &l) < 0) - return -1; diff --git a/patches/ltrace/0.7.3/005-sparc-ftbfs.patch b/patches/ltrace/0.7.3/005-sparc-ftbfs.patch deleted file mode 100644 index 266a8e6..0000000 --- a/patches/ltrace/0.7.3/005-sparc-ftbfs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Juan Cespedes <cespedes@debian.org> -Description: fixes compilation on sparc -Last-Update: 2014-01-02 - - ---- ltrace-0.7.3.orig/sysdeps/linux-gnu/sparc/plt.c -+++ ltrace-0.7.3/sysdeps/linux-gnu/sparc/plt.c -@@ -19,8 +19,9 @@ - */ - - #include <gelf.h> -+ - #include "proc.h" --#include "common.h" -+#include "library.h" - - GElf_Addr - arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { ---- ltrace-0.7.3.orig/sysdeps/linux-gnu/sparc/trace.c -+++ ltrace-0.7.3/sysdeps/linux-gnu/sparc/trace.c -@@ -26,8 +26,10 @@ - #include <sys/wait.h> - #include <signal.h> - #include <string.h> -+ - #include "ptrace.h" - #include "proc.h" -+#include "backend.h" - #include "common.h" - - void diff --git a/patches/ltrace/0.7.3/006-unexpected-breakpoint.patch b/patches/ltrace/0.7.3/006-unexpected-breakpoint.patch deleted file mode 100644 index 443bee4..0000000 --- a/patches/ltrace/0.7.3/006-unexpected-breakpoint.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Juan Cespedes <cespedes@debian.org> -Description: continue after unexpected breakpoint - (instead of decrementing PC and execute int3 again and again) -Last-Update: 2014-01-03 - - ---- ltrace-0.7.3.orig/handle_event.c -+++ ltrace-0.7.3/handle_event.c -@@ -656,9 +656,12 @@ handle_breakpoint(Event *event) - - if ((sbp = address2bpstruct(leader, brk_addr)) != NULL) - breakpoint_on_hit(sbp, event->proc); -- else if (event->proc->state != STATE_IGNORED) -+ else if (event->proc->state != STATE_IGNORED) { - output_line(event->proc, - "unexpected breakpoint at %p", brk_addr); -+ continue_process(event->proc->pid); -+ return; -+ } - - /* breakpoint_on_hit may delete its own breakpoint, so we have - * to look it up again. */ diff --git a/patches/ltrace/0.7.3/007-gcc-5.patch b/patches/ltrace/0.7.3/007-gcc-5.patch deleted file mode 100644 index 4c62f85..0000000 --- a/patches/ltrace/0.7.3/007-gcc-5.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8c3674c86688a79a8689772c3d0c84d6e7aaa118 Mon Sep 17 00:00:00 2001 -From: Petr Machata <pmachata@redhat.com> -Date: Tue, 8 Jan 2013 23:22:49 +0100 -Subject: Fix conditions in elf_read_u{16,32,64} - -- The calling convention of need_data is 0 on success, <0 on failure. - The condition seems to have it all mixed, using both a ! and a - comparison. - -diff --git a/ltrace-elf.c b/ltrace-elf.c -index 29c204f..0ecdc38 100644 ---- a/ltrace-elf.c -+++ b/ltrace-elf.c -@@ -219,7 +219,7 @@ need_data(Elf_Data *data, GElf_Xword offset, GElf_Xword size) - int \ - NAME(Elf_Data *data, GElf_Xword offset, uint##SIZE##_t *retp) \ - { \ -- if (!need_data(data, offset, SIZE / 8) < 0) \ -+ if (need_data(data, offset, SIZE / 8) < 0) \ - return -1; \ - \ - if (data->d_buf == NULL) /* NODATA section */ { \ --- -cgit v0.10.2 - diff --git a/patches/ltrace/0.7.3/008-glibc-2.24.patch b/patches/ltrace/0.7.3/008-glibc-2.24.patch deleted file mode 100644 index 85b008b..0000000 --- a/patches/ltrace/0.7.3/008-glibc-2.24.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urpN ltrace-0.7.3.orig/sysdeps/linux-gnu/proc.c ltrace-0.7.3/sysdeps/linux-gnu/proc.c ---- ltrace-0.7.3.orig/sysdeps/linux-gnu/proc.c 2013-01-02 06:24:46.000000000 -0800 -+++ ltrace-0.7.3/sysdeps/linux-gnu/proc.c 2016-11-13 11:24:32.760365875 -0800 -@@ -240,14 +240,18 @@ process_tasks(pid_t pid, pid_t **ret_tas - size_t alloc = 0; - - while (1) { -- struct dirent entry; - struct dirent *result; -- if (readdir_r(d, &entry, &result) != 0) { -- free(tasks); -- return -1; -- } -- if (result == NULL) -+ -+ errno = 0; -+ result = readdir(d); -+ if (result == NULL) { -+ if (errno) { -+ free(tasks); -+ closedir(d); -+ return -1; -+ } - break; -+ } - if (result->d_type == DT_DIR && all_digits(result->d_name)) { - pid_t npid = atoi(result->d_name); - if (n >= alloc) { diff --git a/patches/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff b/patches/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff deleted file mode 100644 index 88e1517..0000000 --- a/patches/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- trunk/src/acos.c 2009/12/08 16:49:43 733 -+++ trunk/src/acos.c 2009/12/09 20:51:38 734 -@@ -188,10 +188,7 @@ - else - rnd_im = rnd_im == GMP_RNDU ? GMP_RNDD - : rnd_im == GMP_RNDD ? GMP_RNDU --#if MPFR_VERSION_MAJOR >= 3 -- : rnd_im == GMP_RNDA ? GMP_RNDZ --#endif -- : rnd_im; -+ : rnd_im; /* both RNDZ and RNDA map to themselves for -asin(z) */ - rnd1 = RNDC(GMP_RNDN, rnd_im); - mpfr_init2 (pi_over_2, p); - for (;;) diff --git a/patches/mpfr/2.4.0/100-printf-hh-ll.patch b/patches/mpfr/2.4.0/100-printf-hh-ll.patch deleted file mode 100644 index e2a9f81..0000000 --- a/patches/mpfr/2.4.0/100-printf-hh-ll.patch +++ /dev/null @@ -1,359 +0,0 @@ -diff -Naurd mpfr-2.4.0-a/PATCHES mpfr-2.4.0-b/PATCHES ---- mpfr-2.4.0-a/PATCHES 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/PATCHES 2009-02-20 17:27:44.000000000 +0000 -@@ -0,0 +1 @@ -+printf-hh-ll -diff -Naurd mpfr-2.4.0-a/VERSION mpfr-2.4.0-b/VERSION ---- mpfr-2.4.0-a/VERSION 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/VERSION 2009-02-20 17:27:44.000000000 +0000 -@@ -1 +1 @@ --2.4.0 -+2.4.0-p1 -diff -Naurd mpfr-2.4.0-a/acinclude.m4 mpfr-2.4.0-b/acinclude.m4 ---- mpfr-2.4.0-a/acinclude.m4 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/acinclude.m4 2009-01-26 12:52:01.000000000 +0000 -@@ -722,6 +722,16 @@ - [AC_DEFINE([NPRINTF_J], 1, [gmp_printf cannot read intmax_t])]) - fi - -+MPFR_FUNC_PRINTF_SPEC([%hhd], [char], [ -+#include <gmp.h> -+ ], [gmp_],, -+ [AC_DEFINE([NPRINTF_HH], 1, [gmp_printf cannot use 'hh' length modifier])]) -+ -+MPFR_FUNC_PRINTF_SPEC([%lld], [long long int], [ -+#include <gmp.h> -+ ], [gmp_],, -+ [AC_DEFINE([NPRINTF_LL], 1, [gmp_printf cannot read long long int])]) -+ - MPFR_FUNC_PRINTF_SPEC([%.0Lf], [long double], [ - #include <gmp.h> - ], [gmp_],, -diff -Naurd mpfr-2.4.0-a/configure mpfr-2.4.0-b/configure ---- mpfr-2.4.0-a/configure 2009-01-26 12:54:36.000000000 +0000 -+++ mpfr-2.4.0-b/configure 2009-02-20 17:38:36.000000000 +0000 -@@ -24874,6 +24874,170 @@ - fi - - -+{ $as_echo "$as_me:$LINENO: checking if gmp_printf supports \"%hhd\"" >&5 -+$as_echo_n "checking if gmp_printf supports \"%hhd\"... " >&6; } -+if test "$cross_compiling" = yes; then -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot run test program while cross compiling -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include <stdio.h> -+ -+#include <gmp.h> -+ -+ -+int -+main () -+{ -+ -+ char s[256]; -+ char a = 0; -+ return (gmp_sprintf (s, "%hhd", a) != 1) ? 1 : 0; -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } -+ -+cat >>confdefs.h <<\_ACEOF -+#define NPRINTF_HH 1 -+_ACEOF -+ -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+ -+ -+ -+{ $as_echo "$as_me:$LINENO: checking if gmp_printf supports \"%lld\"" >&5 -+$as_echo_n "checking if gmp_printf supports \"%lld\"... " >&6; } -+if test "$cross_compiling" = yes; then -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot run test program while cross compiling -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include <stdio.h> -+ -+#include <gmp.h> -+ -+ -+int -+main () -+{ -+ -+ char s[256]; -+ long long int a = 0; -+ return (gmp_sprintf (s, "%lld", a) != 1) ? 1 : 0; -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } -+ -+cat >>confdefs.h <<\_ACEOF -+#define NPRINTF_LL 1 -+_ACEOF -+ -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+ -+ -+ - { $as_echo "$as_me:$LINENO: checking if gmp_printf supports \"%.0Lf\"" >&5 - $as_echo_n "checking if gmp_printf supports \"%.0Lf\"... " >&6; } - if test "$cross_compiling" = yes; then -diff -Naurd mpfr-2.4.0-a/mpfr.h mpfr-2.4.0-b/mpfr.h ---- mpfr-2.4.0-a/mpfr.h 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/mpfr.h 2009-02-20 17:27:44.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "2.4.0" -+#define MPFR_VERSION_STRING "2.4.0-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.0-a/tests/tfprintf.c mpfr-2.4.0-b/tests/tfprintf.c ---- mpfr-2.4.0-a/tests/tfprintf.c 2009-01-26 12:52:00.000000000 +0000 -+++ mpfr-2.4.0-b/tests/tfprintf.c 2009-02-20 16:31:02.000000000 +0000 -@@ -146,6 +146,7 @@ - short sh = -1; - unsigned short ush = 1; - int i = -1; -+ int j = 1; - unsigned int ui = 1; - long lo = -1; - unsigned long ulo = 1; -@@ -179,12 +180,11 @@ - - limb[0] = limb[1] = limb[2] = ~ (mp_limb_t) 0; - -- check_vfprintf (fout, "a. %Ra, b. %hhu, c. %u, d. %lx%hhn", mpfr, uch, ui, -- ulo, &uch); -- check_length (1, uch, 28, hhu); -- check_vfprintf (fout, "a. %hhi, b. %Rb, c. %u, d. %li%ln", sch, mpfr, i, -+ check_vfprintf (fout, "a. %Ra, b. %u, c. %lx%n", mpfr, ui, ulo, &j); -+ check_length (1, j, 22, d); -+ check_vfprintf (fout, "a. %c, b. %Rb, c. %u, d. %li%ln", i, mpfr, i, - lo, &ulo); -- check_length (2, ulo, 37, lu); -+ check_length (2, ulo, 36, lu); - check_vfprintf (fout, "a. %hi, b. %*f, c. %Re%hn", ush, 3, f, mpfr, &ush); - check_length (3, ush, 29, hu); - check_vfprintf (fout, "a. %hi, b. %f, c. %#.2Rf%n", sh, d, mpfr, &i); -@@ -208,13 +208,18 @@ - check_length (9, sz, 30, zu); - #endif - -+#ifndef NPRINTF_HH -+ check_vfprintf (fout, "a. %hhi, b.%RA, c. %hhu%hhn", sch, mpfr, uch, &uch); -+ check_length (10, uch, 21, hhu); -+#endif -+ - #if (__GNU_MP_VERSION * 10 + __GNU_MP_VERSION_MINOR) >= 42 - /* The 'M' specifier was added in gmp 4.2.0 */ - check_vfprintf (fout, "a. %Mx b. %Re%Mn", limb[0], mpfr, &limb[0]); - if (limb[0] != 14 + BITS_PER_MP_LIMB / 4 || limb[1] != ~ (mp_limb_t) 0 - || limb[2] != ~ (mp_limb_t) 0) - { -- printf ("Error in test #10: mpfr_vfprintf did not print %d characters" -+ printf ("Error in test #11: mpfr_vfprintf did not print %d characters" - " as expected\n", 14 + (int) BITS_PER_MP_LIMB / 4); - exit (1); - } -@@ -227,13 +232,13 @@ - if (limb[0] != 14 + 3 * BITS_PER_MP_LIMB / 4 || limb[1] != (mp_limb_t) 0 - || limb[2] != ~ (mp_limb_t) 0) - { -- printf ("Error in test #11: mpfr_vfprintf did not print %d characters" -+ printf ("Error in test #12: mpfr_vfprintf did not print %d characters" - " as expected\n", 14 + (int) BITS_PER_MP_LIMB / 4); - exit (1); - } - #endif - --#ifdef HAVE_LONG_LONG -+#if defined(HAVE_LONG_LONG) && !defined(NPRINTF_LL) - { - long long llo = -1; - unsigned long long ullo = 1; -diff -Naurd mpfr-2.4.0-a/tests/tprintf.c mpfr-2.4.0-b/tests/tprintf.c ---- mpfr-2.4.0-a/tests/tprintf.c 2009-01-26 12:52:00.000000000 +0000 -+++ mpfr-2.4.0-b/tests/tprintf.c 2009-02-20 16:31:02.000000000 +0000 -@@ -150,6 +150,7 @@ - short sh = -1; - unsigned short ush = 1; - int i = -1; -+ int j = 1; - unsigned int ui = 1; - long lo = -1; - unsigned long ulo = 1; -@@ -178,11 +179,10 @@ - mpfr_set_f (mpfr, mpf, GMP_RNDN); - prec = mpfr_get_prec (mpfr); - -- check_vprintf ("a. %Ra, b. %hhu, c. %u, d. %lx%hhn", mpfr, uch, ui, ulo, -- &uch); -- check_length (1, uch, 28, hhu); -- check_vprintf ("a. %hhi, b. %Rb, c. %u, d. %li%ln", sch, mpfr, i, lo, &ulo); -- check_length (2, ulo, 37, lu); -+ check_vprintf ("a. %Ra, b. %u, c. %lx%n", mpfr, ui, ulo, &j); -+ check_length (1, j, 22, d); -+ check_vprintf ("a. %c, b. %Rb, c. %u, d. %li%ln", i, mpfr, i, lo, &ulo); -+ check_length (2, ulo, 36, lu); - check_vprintf ("a. %hi, b. %*f, c. %Re%hn", ush, 3, f, mpfr, &ush); - check_length (3, ush, 29, hu); - check_vprintf ("a. %hi, b. %f, c. %#.2Rf%n", sh, d, mpfr, &i); -@@ -204,7 +204,12 @@ - check_length (9, sz, 30, zu); - #endif - --#ifdef HAVE_LONG_LONG -+#ifndef NPRINTF_HH -+ check_vprintf ("a. %hhi, b. %Ra, c. %hhu%hhn", sch, mpfr, uch, &uch); -+ check_length (10, uch, 22, hhu); -+#endif -+ -+#if defined(HAVE_LONG_LONG) && !defined(NPRINTF_LL) - { - long long llo = -1; - unsigned long long ullo = 1; -diff -Naurd mpfr-2.4.0-a/vasprintf.c mpfr-2.4.0-b/vasprintf.c ---- mpfr-2.4.0-a/vasprintf.c 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/vasprintf.c 2009-02-20 16:31:02.000000000 +0000 -@@ -235,10 +235,14 @@ - break; - case 'h': - if (*++format == 'h') -+#ifndef NPRINTF_HH - { - ++format; - specinfo->arg_type = CHAR_ARG; - } -+#else -+ specinfo->arg_type = UNSUPPORTED; -+#endif - else - specinfo->arg_type = SHORT_ARG; - break; -@@ -246,7 +250,7 @@ - if (*++format == 'l') - { - ++format; --#ifdef HAVE_LONG_LONG -+#if defined (HAVE_LONG_LONG) && !defined(NPRINTF_LL) - specinfo->arg_type = LONG_LONG_ARG; - #else - specinfo->arg_type = UNSUPPORTED; -diff -Naurd mpfr-2.4.0-a/version.c mpfr-2.4.0-b/version.c ---- mpfr-2.4.0-a/version.c 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/version.c 2009-02-20 17:27:44.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.0"; -+ return "2.4.0-p1"; - } diff --git a/patches/mpfr/2.4.0/110-mpfr_snprintf.patch b/patches/mpfr/2.4.0/110-mpfr_snprintf.patch deleted file mode 100644 index 92af137..0000000 --- a/patches/mpfr/2.4.0/110-mpfr_snprintf.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -Naurd mpfr-2.4.0-a/PATCHES mpfr-2.4.0-b/PATCHES ---- mpfr-2.4.0-a/PATCHES 2009-02-25 13:27:38.000000000 +0000 -+++ mpfr-2.4.0-b/PATCHES 2009-02-25 13:42:26.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_snprintf -diff -Naurd mpfr-2.4.0-a/VERSION mpfr-2.4.0-b/VERSION ---- mpfr-2.4.0-a/VERSION 2009-02-20 17:27:44.000000000 +0000 -+++ mpfr-2.4.0-b/VERSION 2009-02-25 13:41:31.000000000 +0000 -@@ -1 +1 @@ --2.4.0-p1 -+2.4.0-p2 -diff -Naurd mpfr-2.4.0-a/mpfr.h mpfr-2.4.0-b/mpfr.h ---- mpfr-2.4.0-a/mpfr.h 2009-02-20 17:27:44.000000000 +0000 -+++ mpfr-2.4.0-b/mpfr.h 2009-02-25 13:41:31.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "2.4.0-p1" -+#define MPFR_VERSION_STRING "2.4.0-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.0-a/printf.c mpfr-2.4.0-b/printf.c ---- mpfr-2.4.0-a/printf.c 2009-01-26 12:52:01.000000000 +0000 -+++ mpfr-2.4.0-b/printf.c 2009-02-25 13:41:22.000000000 +0000 -@@ -154,16 +154,16 @@ - int ret; - size_t min_size; - -- /* C99 allows SIZE to be null */ -- if (size == 0) -- return 0; -- -- MPFR_ASSERTD (buf != NULL); -- - GET_STR (ret, str, fmt); -- min_size = (size_t)ret < size ? (size_t)ret : size - 1; -- strncpy (buf, str, min_size); -- buf[min_size + 1] = '\0'; -+ -+ /* C99 allows SIZE to be zero */ -+ if (size != 0) -+ { -+ MPFR_ASSERTN (buf != NULL); -+ min_size = (size_t)ret < size ? (size_t)ret : size - 1; -+ strncpy (buf, str, min_size); -+ buf[min_size] = '\0'; -+ } - - mpfr_free_str (str); - return ret; -@@ -176,16 +176,17 @@ - int ret; - int min_size; - -- /* C99 allows SIZE to be null */ -- if (size == 0) -- return 0; -+ GET_STR_VA (ret, str, fmt, ap); - -- MPFR_ASSERTD (buf != NULL); -+ /* C99 allows SIZE to be zero */ -+ if (size != 0) -+ { -+ MPFR_ASSERTN (buf != NULL); -+ min_size = (size_t)ret < size ? (size_t)ret : size - 1; -+ strncpy (buf, str, min_size); -+ buf[min_size] = '\0'; -+ } - -- GET_STR_VA (ret, str, fmt, ap); -- min_size = (size_t)ret < size ? (size_t)ret : size - 1; -- strncpy (buf, str, min_size); -- buf[min_size + 1] = '\0'; - mpfr_free_str (str); - return ret; - } -diff -Naurd mpfr-2.4.0-a/tests/tsprintf.c mpfr-2.4.0-b/tests/tsprintf.c ---- mpfr-2.4.0-a/tests/tsprintf.c 2009-01-26 12:52:00.000000000 +0000 -+++ mpfr-2.4.0-b/tests/tsprintf.c 2009-02-25 13:41:22.000000000 +0000 -@@ -72,21 +72,37 @@ - - /* test mpfr_snprintf */ - p = (int) (randlimb () % n0); -- n1 = mpfr_snprintf (buffer, p, fmt, x); -- if ((p != 0 && n0 != n1) || (p == 0 && n1 != 0)) -+ if (p == 0 && (randlimb () & 1) == 0) -+ { -+ n1 = mpfr_snprintf (NULL, 0, fmt, x); -+ } -+ else -+ { -+ buffer[p] = 17; -+ n1 = mpfr_snprintf (buffer, p, fmt, x); -+ if (buffer[p] != 17) -+ { -+ printf ("Buffer overflow in mpfr_snprintf for p = %d!\n", p); -+ exit (1); -+ } -+ } -+ if (n0 != n1) - { - printf ("Error in mpfr_snprintf (s, %d, \"%s\", x) return value\n", - p, fmt); - printf ("expected: %d\ngot: %d\n", n0, n1); - exit (1); - } -- if (strncmp (expected, buffer, p) != 0) -+ if ((p > 1 && strncmp (expected, buffer, p-1) != 0) -+ || (p == 1 && buffer[0] != '\0')) - { -- printf ("Error in mpfr_snprintf (s, %d, \"%s\", x);\n", p, fmt); -- printf ("expected: \"%s\"\ngot: \"%s\"\n", expected, buffer); -+ char part_expected[p]; -+ strncpy (part_expected, expected, p); -+ part_expected[p-1] = '\0'; -+ printf ("Error in mpfr_vsnprintf (s, %d, \"%s\", ...);\n", p, fmt); -+ printf ("expected: \"%s\"\ngot: \"%s\"\n", part_expected, buffer); - exit (1); - } -- - return n0; - } - -@@ -116,8 +132,21 @@ - - /* test mpfr_snprintf */ - p = (int) (randlimb () % n0); -- n1 = mpfr_vsnprintf (buffer, p, fmt, ap1); -- if ((p != 0 && n0 != n1) || (p == 0 && n1 != 0)) -+ if (p == 0 && (randlimb () & 1) == 0) -+ { -+ n1 = mpfr_vsnprintf (NULL, 0, fmt, ap1); -+ } -+ else -+ { -+ buffer[p] = 17; -+ n1 = mpfr_vsnprintf (buffer, p, fmt, ap1); -+ if (buffer[p] != 17) -+ { -+ printf ("Buffer overflow in mpfr_vsnprintf for p = %d!\n", p); -+ exit (1); -+ } -+ } -+ if (n0 != n1) - { - printf ("Error in mpfr_vsnprintf (s, %d, \"%s\", ...) return value\n", - p, fmt); -@@ -126,10 +155,14 @@ - va_end (ap1); - exit (1); - } -- if (strncmp (expected, buffer, p) != 0) -+ if ((p > 1 && strncmp (expected, buffer, p-1) != 0) -+ || (p == 1 && buffer[0] != '\0')) - { -+ char part_expected[p]; -+ strncpy (part_expected, expected, p); -+ part_expected[p-1] = '\0'; - printf ("Error in mpfr_vsnprintf (s, %d, \"%s\", ...);\n", p, fmt); -- printf ("expected: \"%s\"\ngot: \"%s\"\n", expected, buffer); -+ printf ("expected: \"%s\"\ngot: \"%s\"\n", part_expected, buffer); - - va_end (ap1); - exit (1); -diff -Naurd mpfr-2.4.0-a/version.c mpfr-2.4.0-b/version.c ---- mpfr-2.4.0-a/version.c 2009-02-20 17:27:44.000000000 +0000 -+++ mpfr-2.4.0-b/version.c 2009-02-25 13:41:31.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.0-p1"; -+ return "2.4.0-p2"; - } diff --git a/patches/mpfr/2.4.1/100-remainder-neg.patch b/patches/mpfr/2.4.1/100-remainder-neg.patch deleted file mode 100644 index ae92788..0000000 --- a/patches/mpfr/2.4.1/100-remainder-neg.patch +++ /dev/null @@ -1,123 +0,0 @@ -diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES ---- mpfr-2.4.1-a/PATCHES 2009-02-20 09:43:17.000000000 +0000 -+++ mpfr-2.4.1-b/PATCHES 2009-02-27 16:56:29.000000000 +0000 -@@ -0,0 +1 @@ -+remainder-neg -diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION ---- mpfr-2.4.1-a/VERSION 2009-02-25 16:16:08.000000000 +0000 -+++ mpfr-2.4.1-b/VERSION 2009-02-27 16:55:37.000000000 +0000 -@@ -1 +1 @@ --2.4.1 -+2.4.1-p1 -diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h ---- mpfr-2.4.1-a/mpfr.h 2009-02-25 16:16:08.000000000 +0000 -+++ mpfr-2.4.1-b/mpfr.h 2009-02-27 16:55:38.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "2.4.1" -+#define MPFR_VERSION_STRING "2.4.1-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.1-a/rem1.c mpfr-2.4.1-b/rem1.c ---- mpfr-2.4.1-a/rem1.c 2009-02-20 09:43:17.000000000 +0000 -+++ mpfr-2.4.1-b/rem1.c 2009-02-27 16:55:15.000000000 +0000 -@@ -170,7 +170,12 @@ - } - - if (mpz_cmp_ui (r, 0) == 0) -- inex = mpfr_set_ui (rem, 0, GMP_RNDN); -+ { -+ inex = mpfr_set_ui (rem, 0, GMP_RNDN); -+ /* take into account sign of x */ -+ if (signx < 0) -+ mpfr_neg (rem, rem, GMP_RNDN); -+ } - else - { - if (rnd_q == GMP_RNDN) -@@ -190,6 +195,9 @@ - *quo += 1; - } - } -+ /* take into account sign of x */ -+ if (signx < 0) -+ mpz_neg (r, r); - inex = mpfr_set_z (rem, r, rnd); - /* if ex > ey, rem should be multiplied by 2^ey, else by 2^ex */ - MPFR_EXP (rem) += (ex > ey) ? ey : ex; -@@ -198,13 +206,6 @@ - if (quo) - *quo *= sign; - -- /* take into account sign of x */ -- if (signx < 0) -- { -- mpfr_neg (rem, rem, GMP_RNDN); -- inex = -inex; -- } -- - mpz_clear (mx); - mpz_clear (my); - mpz_clear (r); -diff -Naurd mpfr-2.4.1-a/tests/tremquo.c mpfr-2.4.1-b/tests/tremquo.c ---- mpfr-2.4.1-a/tests/tremquo.c 2009-02-20 09:43:15.000000000 +0000 -+++ mpfr-2.4.1-b/tests/tremquo.c 2009-02-27 16:55:15.000000000 +0000 -@@ -25,6 +25,36 @@ - - #include "mpfr-test.h" - -+static void -+bug20090227 (void) -+{ -+ mpfr_t x, y, r1, r2; -+ int inex1, inex2; -+ -+ mpfr_init2 (x, 118); -+ mpfr_init2 (y, 181); -+ mpfr_init2 (r1, 140); -+ mpfr_init2 (r2, 140); -+ mpfr_set_si (x, -1, GMP_RNDN); -+ mpfr_set_str_binary (y, "1.100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111010"); -+ inex1 = mpfr_remainder (r1, x, y, GMP_RNDU); -+ /* since the quotient is -1, r1 is the rounding of x+y */ -+ inex2 = mpfr_add (r2, x, y, GMP_RNDU); -+ if (mpfr_cmp (r1, r2)) -+ { -+ printf ("Error in mpfr_remainder (bug20090227)\n"); -+ printf ("Expected "); -+ mpfr_dump (r2); -+ printf ("Got "); -+ mpfr_dump (r1); -+ exit (1); -+ } -+ mpfr_clear (x); -+ mpfr_clear (y); -+ mpfr_clear (r1); -+ mpfr_clear (r2); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -50,6 +80,8 @@ - - tests_start_mpfr (); - -+ bug20090227 (); -+ - mpfr_init (x); - mpfr_init (y); - mpfr_init (r); -diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c ---- mpfr-2.4.1-a/version.c 2009-02-25 16:16:08.000000000 +0000 -+++ mpfr-2.4.1-b/version.c 2009-02-27 16:55:38.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.1"; -+ return "2.4.1-p1"; - } diff --git a/patches/mpfr/2.4.1/110-assert.patch b/patches/mpfr/2.4.1/110-assert.patch deleted file mode 100644 index c6b6aac..0000000 --- a/patches/mpfr/2.4.1/110-assert.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES ---- mpfr-2.4.1-a/PATCHES 2009-03-04 13:15:05.000000000 +0000 -+++ mpfr-2.4.1-b/PATCHES 2009-03-04 13:17:04.000000000 +0000 -@@ -0,0 +1 @@ -+assert -diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION ---- mpfr-2.4.1-a/VERSION 2009-02-27 16:55:37.000000000 +0000 -+++ mpfr-2.4.1-b/VERSION 2009-03-04 13:16:46.000000000 +0000 -@@ -1 +1 @@ --2.4.1-p1 -+2.4.1-p2 -diff -Naurd mpfr-2.4.1-a/mpfr-gmp.c mpfr-2.4.1-b/mpfr-gmp.c ---- mpfr-2.4.1-a/mpfr-gmp.c 2009-02-20 09:43:17.000000000 +0000 -+++ mpfr-2.4.1-b/mpfr-gmp.c 2009-03-04 13:16:39.000000000 +0000 -@@ -301,7 +301,7 @@ - if (linenum != -1) - fprintf (stderr, "%d: ", linenum); - } -- fprintf (stderr, " assertion failed: %s\n", expr); -+ fprintf (stderr, "MPFR assertion failed: %s\n", expr); - abort(); - } - -diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h ---- mpfr-2.4.1-a/mpfr.h 2009-02-27 16:55:38.000000000 +0000 -+++ mpfr-2.4.1-b/mpfr.h 2009-03-04 13:16:46.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "2.4.1-p1" -+#define MPFR_VERSION_STRING "2.4.1-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c ---- mpfr-2.4.1-a/version.c 2009-02-27 16:55:38.000000000 +0000 -+++ mpfr-2.4.1-b/version.c 2009-03-04 13:16:46.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.1-p1"; -+ return "2.4.1-p2"; - } diff --git a/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch b/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch deleted file mode 100644 index e85136a..0000000 --- a/patches/mpfr/2.4.1/120-cast-to-void-ptr.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naurd mpfr-2.4.1-a/tests/tfprintf.c mpfr-2.4.1-b/tests/tfprintf.c ---- mpfr-2.4.1-a/tests/tfprintf.c 2009-02-20 09:43:15.000000000 +0000 -+++ mpfr-2.4.1-b/tests/tfprintf.c 2009-03-10 01:12:45.000000000 +0000 -@@ -195,7 +195,7 @@ - check_vfprintf (fout, "a. %Pu, b. %c, c. %Zi%Zn", prec, ch, mpz, &mpz); - check_length_with_cmp (6, mpz, 17, mpz_cmp_ui (mpz, 17), Zi); - check_vfprintf (fout, "%% a. %#.0RNg, b. %Qx%Rn, c. %p", mpfr, mpq, &mpfr, -- &i); -+ (void *) &i); - check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg); - - #ifndef NPRINTF_T -diff -Naurd mpfr-2.4.1-a/tests/tprintf.c mpfr-2.4.1-b/tests/tprintf.c ---- mpfr-2.4.1-a/tests/tprintf.c 2009-02-20 09:43:15.000000000 +0000 -+++ mpfr-2.4.1-b/tests/tprintf.c 2009-03-10 01:12:45.000000000 +0000 -@@ -191,7 +191,8 @@ - check_length (5, sz, 34, zu); - check_vprintf ("a. %Pu, b. %c, c. %RUG, d. %Zi%Zn", prec, ch, mpfr, mpz, &mpz); - check_length_with_cmp (6, mpz, 24, mpz_cmp_ui (mpz, 24), Zi); -- check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", mpfr, mpq, &mpfr, &i); -+ check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", -+ mpfr, mpq, &mpfr, (void *) &i); - check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg); - - #ifndef NPRINTF_T diff --git a/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch b/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch deleted file mode 100644 index 08e21f2..0000000 --- a/patches/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES ---- mpfr-2.4.1-a/PATCHES 2009-03-10 01:44:39.000000000 +0000 -+++ mpfr-2.4.1-b/PATCHES 2009-03-10 01:44:40.000000000 +0000 -@@ -0,0 +1 @@ -+vasprintf-mp_limb_t -diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION ---- mpfr-2.4.1-a/VERSION 2009-03-04 13:16:46.000000000 +0000 -+++ mpfr-2.4.1-b/VERSION 2009-03-10 01:44:40.000000000 +0000 -@@ -1 +1 @@ --2.4.1-p2 -+2.4.1-p4 -diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h ---- mpfr-2.4.1-a/mpfr.h 2009-03-04 13:16:46.000000000 +0000 -+++ mpfr-2.4.1-b/mpfr.h 2009-03-10 01:44:40.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "2.4.1-p2" -+#define MPFR_VERSION_STRING "2.4.1-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.1-a/vasprintf.c mpfr-2.4.1-b/vasprintf.c ---- mpfr-2.4.1-a/vasprintf.c 2009-02-20 09:43:17.000000000 +0000 -+++ mpfr-2.4.1-b/vasprintf.c 2009-03-10 01:44:40.000000000 +0000 -@@ -398,7 +398,7 @@ - (void) va_arg ((ap), mpq_srcptr); \ - break; \ - case MP_LIMB_ARG: \ -- (void) va_arg ((ap), mp_ptr); \ -+ (void) va_arg ((ap), mp_limb_t); \ - break; \ - case MP_LIMB_ARRAY_ARG: \ - (void) va_arg ((ap), mp_ptr); \ -diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c ---- mpfr-2.4.1-a/version.c 2009-03-04 13:16:46.000000000 +0000 -+++ mpfr-2.4.1-b/version.c 2009-03-10 01:44:40.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.1-p2"; -+ return "2.4.1-p4"; - } diff --git a/patches/mpfr/2.4.1/140-zeta_ui-shift.patch b/patches/mpfr/2.4.1/140-zeta_ui-shift.patch deleted file mode 100644 index 710c698..0000000 --- a/patches/mpfr/2.4.1/140-zeta_ui-shift.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES ---- mpfr-2.4.1-a/PATCHES 2009-03-13 02:50:47.000000000 +0000 -+++ mpfr-2.4.1-b/PATCHES 2009-03-13 02:50:48.000000000 +0000 -@@ -0,0 +1 @@ -+zeta_ui-shift -diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION ---- mpfr-2.4.1-a/VERSION 2009-03-10 01:44:40.000000000 +0000 -+++ mpfr-2.4.1-b/VERSION 2009-03-13 02:50:48.000000000 +0000 -@@ -1 +1 @@ --2.4.1-p4 -+2.4.1-p5 -diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h ---- mpfr-2.4.1-a/mpfr.h 2009-03-10 01:44:40.000000000 +0000 -+++ mpfr-2.4.1-b/mpfr.h 2009-03-13 02:50:48.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "2.4.1-p4" -+#define MPFR_VERSION_STRING "2.4.1-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c ---- mpfr-2.4.1-a/version.c 2009-03-10 01:44:40.000000000 +0000 -+++ mpfr-2.4.1-b/version.c 2009-03-13 02:50:48.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.1-p4"; -+ return "2.4.1-p5"; - } -diff -Naurd mpfr-2.4.1-a/zeta_ui.c mpfr-2.4.1-b/zeta_ui.c ---- mpfr-2.4.1-a/zeta_ui.c 2009-02-20 09:43:17.000000000 +0000 -+++ mpfr-2.4.1-b/zeta_ui.c 2009-03-13 02:50:48.000000000 +0000 -@@ -177,7 +177,9 @@ - mpz_mul_ui (t, t, 2 * k - 1); - } - mpz_div_2exp (t, t, 1); -- if (n < 1UL << (BITS_PER_MP_LIMB / 2)) -+ /* Warning: the test below assumes that an unsigned long -+ has no padding bits. */ -+ if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2)) - /* (n - k + 1) * (n + k - 1) < n^2 */ - mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1)); - else diff --git a/patches/mpfr/2.4.1/150-test-tmul.patch b/patches/mpfr/2.4.1/150-test-tmul.patch deleted file mode 100644 index 8b757d3..0000000 --- a/patches/mpfr/2.4.1/150-test-tmul.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up ./tests/Makefile.am.orig ./tests/Makefile.am ---- ./tests/Makefile.am.orig 2009-07-28 16:28:55.377059021 +0300 -+++ ./tests/Makefile.am 2009-07-28 16:31:01.136810734 +0300 -@@ -20,7 +20,7 @@ check_PROGRAMS = tversion tinternals tin - - EXTRA_DIST = tgeneric.c tgeneric_ui.c mpf_compat.h inp_str.data tmul.dat - --tmul_CPPFLAGS = -DMPFR_SRCDIR=$(srcdir) -+tmul_CPPFLAGS = -DMPFR_SRCDIR=\"$(srcdir)\" - - LDADD = libfrtests.la $(MPFR_LIBM) $(top_builddir)/libmpfr.la - INCLUDES = -I$(top_srcdir) -I$(top_builddir) -diff -up ./tests/tmul.c.orig ./tests/tmul.c ---- ./tests/tmul.c.orig 2009-07-28 16:29:03.761058919 +0300 -+++ ./tests/tmul.c 2009-07-28 16:30:46.369812215 +0300 -@@ -26,10 +26,8 @@ MA 02110-1301, USA. */ - #include "mpfr-test.h" - - #ifndef MPFR_SRCDIR --#define MPFR_SRCDIR . -+#define MPFR_SRCDIR "." - #endif --#define QUOTE(X) NAME(X) --#define NAME(X) #X - - #ifdef CHECK_EXTERNAL - static int -@@ -482,10 +480,10 @@ check_regression (void) - mpfr_inits2 (6177, x, y, z, (mpfr_ptr) 0); - /* we read long strings from a file since ISO C90 does not support strings of - length > 509 */ -- fp = fopen (QUOTE (MPFR_SRCDIR)"/tmul.dat", "r"); -+ fp = fopen (MPFR_SRCDIR "/tmul.dat", "r"); - if (fp == NULL) - { -- fprintf (stderr, "Error, cannot open "QUOTE (MPFR_SRCDIR)"/tmul.dat\n"); -+ fprintf (stderr, "Error, cannot open " MPFR_SRCDIR "/tmul.dat\n"); - exit (1); - } - get_string (s, fp); diff --git a/patches/mpfr/2.4.2/100-sin_cos_underflow.patch b/patches/mpfr/2.4.2/100-sin_cos_underflow.patch deleted file mode 100644 index 2721517..0000000 --- a/patches/mpfr/2.4.2/100-sin_cos_underflow.patch +++ /dev/null @@ -1,184 +0,0 @@ -diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES ---- mpfr-2.4.2-a/PATCHES 2009-12-07 13:37:12.000000000 +0000 -+++ mpfr-2.4.2-b/PATCHES 2009-12-07 13:37:12.000000000 +0000 -@@ -0,0 +1 @@ -+sin_cos_underflow -diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION ---- mpfr-2.4.2-a/VERSION 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/VERSION 2009-12-07 13:37:12.000000000 +0000 -@@ -1 +1 @@ --2.4.2 -+2.4.2-p1 -diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h ---- mpfr-2.4.2-a/mpfr.h 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/mpfr.h 2009-12-07 13:37:12.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "2.4.2" -+#define MPFR_VERSION_STRING "2.4.2-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.2-a/sin_cos.c mpfr-2.4.2-b/sin_cos.c ---- mpfr-2.4.2-a/sin_cos.c 2009-11-30 02:43:09.000000000 +0000 -+++ mpfr-2.4.2-b/sin_cos.c 2009-12-07 13:37:12.000000000 +0000 -@@ -82,17 +82,19 @@ - if (y != x) - /* y and x differ, thus we can safely try to compute y first */ - { -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -2 * expx, 2, 0, rnd_mode, -- { inexy = _inexact; -- goto small_input; }); -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT ( -+ y, x, -2 * expx, 2, 0, rnd_mode, -+ { inexy = _inexact; -+ goto small_input; }); - if (0) - { - small_input: - /* we can go here only if we can round sin(x) */ -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (z, __gmpfr_one, -2 * expx, -- 1, 0, rnd_mode, -- { inexz = _inexact; -- goto end; }); -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT ( -+ z, __gmpfr_one, -2 * expx, 1, 0, rnd_mode, -+ { inexz = _inexact; -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ goto end; }); - } - - /* if we go here, one of the two MPFR_FAST_COMPUTE_IF_SMALL_INPUT -@@ -101,18 +103,19 @@ - else /* y and x are the same variable: try to compute z first, which - necessarily differs */ - { -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (z, __gmpfr_one, -2 * expx, -- 1, 0, rnd_mode, -- { inexz = _inexact; -- goto small_input2; }); -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT ( -+ z, __gmpfr_one, -2 * expx, 1, 0, rnd_mode, -+ { inexz = _inexact; -+ goto small_input2; }); - if (0) - { - small_input2: - /* we can go here only if we can round cos(x) */ -- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, x, -2 * expx, 2, 0, -- rnd_mode, -- { inexy = _inexact; -- goto end; }); -+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT ( -+ y, x, -2 * expx, 2, 0, rnd_mode, -+ { inexy = _inexact; -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); -+ goto end; }); - } - } - m += 2 * (-expx); -@@ -207,7 +210,6 @@ - mpfr_clear (xr); - - end: -- /* FIXME: update the underflow flag if need be. */ - MPFR_SAVE_EXPO_FREE (expo); - mpfr_check_range (y, inexy, rnd_mode); - mpfr_check_range (z, inexz, rnd_mode); -diff -Naurd mpfr-2.4.2-a/tests/tsin_cos.c mpfr-2.4.2-b/tests/tsin_cos.c ---- mpfr-2.4.2-a/tests/tsin_cos.c 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/tests/tsin_cos.c 2009-12-07 13:37:12.000000000 +0000 -@@ -382,23 +382,56 @@ - consistency (void) - { - mpfr_t x, s1, s2, c1, c2; -+ mp_exp_t emin, emax; - mp_rnd_t rnd; -+ unsigned int flags_sin, flags_cos, flags, flags_before, flags_ref; -+ int inex_sin, inex_cos, inex, inex_ref; - int i; - -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ - for (i = 0; i <= 10000; i++) - { - mpfr_init2 (x, MPFR_PREC_MIN + (randlimb () % 8)); - mpfr_inits2 (MPFR_PREC_MIN + (randlimb () % 8), s1, s2, c1, c2, - (mpfr_ptr) 0); -- tests_default_random (x, 256, -5, 50); -- rnd = RND_RAND (); -- mpfr_sin (s1, x, rnd); -- mpfr_cos (c1, x, rnd); -- mpfr_sin_cos (s2, c2, x, rnd); -- if (!(mpfr_equal_p (s1, s2) && mpfr_equal_p (c1, c2))) -+ if (i < 8 * GMP_RND_MAX) - { -- printf ("mpfr_sin_cos and mpfr_sin/mpfr_cos disagree on %s,\nx = ", -- mpfr_print_rnd_mode (rnd)); -+ int j = i / GMP_RND_MAX; -+ if (j & 1) -+ mpfr_set_emin (MPFR_EMIN_MIN); -+ mpfr_set_si (x, (j & 2) ? 1 : -1, GMP_RNDN); -+ mpfr_set_exp (x, mpfr_get_emin ()); -+ rnd = (mpfr_rnd_t) (i % GMP_RND_MAX); -+ flags_before = 0; -+ if (j & 4) -+ mpfr_set_emax (-17); -+ } -+ else -+ { -+ tests_default_random (x, 256, -5, 50); -+ rnd = RND_RAND (); -+ flags_before = (randlimb () & 1) ? -+ (unsigned int) (MPFR_FLAGS_ALL ^ MPFR_FLAGS_ERANGE) : -+ (unsigned int) 0; -+ } -+ __gmpfr_flags = flags_before; -+ inex_sin = mpfr_sin (s1, x, rnd); -+ flags_sin = __gmpfr_flags; -+ __gmpfr_flags = flags_before; -+ inex_cos = mpfr_cos (c1, x, rnd); -+ flags_cos = __gmpfr_flags; -+ __gmpfr_flags = flags_before; -+ inex = !!mpfr_sin_cos (s2, c2, x, rnd); -+ flags = __gmpfr_flags; -+ inex_ref = inex_sin || inex_cos; -+ flags_ref = flags_sin | flags_cos; -+ if (!(mpfr_equal_p (s1, s2) && mpfr_equal_p (c1, c2)) || -+ inex != inex_ref || flags != flags_ref) -+ { -+ printf ("mpfr_sin_cos and mpfr_sin/mpfr_cos disagree on %s," -+ " i = %d\nx = ", mpfr_print_rnd_mode (rnd), i); - mpfr_dump (x); - printf ("s1 = "); - mpfr_dump (s1); -@@ -408,9 +441,16 @@ - mpfr_dump (c1); - printf ("c2 = "); - mpfr_dump (c2); -+ printf ("inex_sin = %d, inex_cos = %d, inex = %d (expected %d)\n", -+ inex_sin, inex_cos, inex, inex_ref); -+ printf ("flags_sin = 0x%x, flags_cos = 0x%x, " -+ "flags = 0x%x (expected 0x%x)\n", -+ flags_sin, flags_cos, flags, flags_ref); - exit (1); - } - mpfr_clears (x, s1, s2, c1, c2, (mpfr_ptr) 0); -+ mpfr_set_emin (emin); -+ mpfr_set_emax (emax); - } - } - -diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c ---- mpfr-2.4.2-a/version.c 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/version.c 2009-12-07 13:37:12.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.2"; -+ return "2.4.2-p1"; - } diff --git a/patches/mpfr/2.4.2/110-longlong.h.patch b/patches/mpfr/2.4.2/110-longlong.h.patch deleted file mode 100644 index fa85d8e..0000000 --- a/patches/mpfr/2.4.2/110-longlong.h.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES ---- mpfr-2.4.2-a/PATCHES 2009-12-18 12:03:30.000000000 +0000 -+++ mpfr-2.4.2-b/PATCHES 2009-12-18 12:05:19.000000000 +0000 -@@ -0,0 +1 @@ -+longlong.h -diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION ---- mpfr-2.4.2-a/VERSION 2009-12-07 13:37:12.000000000 +0000 -+++ mpfr-2.4.2-b/VERSION 2009-12-18 12:05:09.000000000 +0000 -@@ -1 +1 @@ --2.4.2-p1 -+2.4.2-p2 -diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h ---- mpfr-2.4.2-a/mpfr-longlong.h 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/mpfr-longlong.h 2009-12-18 12:04:29.000000000 +0000 -@@ -1011,7 +1011,15 @@ - #endif /* __m88000__ */ - - #if defined (__mips) && W_TYPE_SIZE == 32 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UDItype _r; \ -+ _r = (UDItype) u * v; \ -+ (w1) = _r >> 32; \ -+ (w0) = (USItype) _r; \ -+ } while (0) -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) - #else -@@ -1024,7 +1032,16 @@ - #endif /* __mips */ - - #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) -+typedef unsigned int UTItype __attribute__ ((mode (TI))); -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UTItype _r; \ -+ _r = (UTItype) u * v; \ -+ (w1) = _r >> 64; \ -+ (w0) = (UDItype) _r; \ -+ } while (0) -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) - #else -diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h ---- mpfr-2.4.2-a/mpfr.h 2009-12-07 13:37:12.000000000 +0000 -+++ mpfr-2.4.2-b/mpfr.h 2009-12-18 12:05:09.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "2.4.2-p1" -+#define MPFR_VERSION_STRING "2.4.2-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c ---- mpfr-2.4.2-a/version.c 2009-12-07 13:37:12.000000000 +0000 -+++ mpfr-2.4.2-b/version.c 2009-12-18 12:05:09.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.2-p1"; -+ return "2.4.2-p2"; - } diff --git a/patches/mpfr/2.4.2/120-gmp5.patch b/patches/mpfr/2.4.2/120-gmp5.patch deleted file mode 100644 index 3ce4952..0000000 --- a/patches/mpfr/2.4.2/120-gmp5.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES ---- mpfr-2.4.2-a/PATCHES 2010-01-11 15:27:18.000000000 +0000 -+++ mpfr-2.4.2-b/PATCHES 2010-01-11 15:30:31.000000000 +0000 -@@ -0,0 +1 @@ -+gmp5 -diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION ---- mpfr-2.4.2-a/VERSION 2009-12-18 12:05:09.000000000 +0000 -+++ mpfr-2.4.2-b/VERSION 2010-01-11 15:29:40.000000000 +0000 -@@ -1 +1 @@ --2.4.2-p2 -+2.4.2-p3 -diff -Naurd mpfr-2.4.2-a/configure mpfr-2.4.2-b/configure ---- mpfr-2.4.2-a/configure 2009-11-30 02:44:35.000000000 +0000 -+++ mpfr-2.4.2-b/configure 2010-01-11 15:28:56.000000000 +0000 -@@ -20449,6 +20449,9 @@ - main () - { - -+#ifndef BITS_PER_MP_LIMB -+#define BITS_PER_MP_LIMB GMP_LIMB_BITS -+#endif - return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT - && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; - -diff -Naurd mpfr-2.4.2-a/configure.in mpfr-2.4.2-b/configure.in ---- mpfr-2.4.2-a/configure.in 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/configure.in 2009-11-30 02:43:08.000000000 +0000 -@@ -424,6 +424,9 @@ - #include "gmp.h" - #include "gmp-impl.h" - ]], [[ -+#ifndef BITS_PER_MP_LIMB -+#define BITS_PER_MP_LIMB GMP_LIMB_BITS -+#endif - return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT - && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; - ]])], [AC_MSG_RESULT(yes)], [ -diff -Naurd mpfr-2.4.2-a/mpfr-impl.h mpfr-2.4.2-b/mpfr-impl.h ---- mpfr-2.4.2-a/mpfr-impl.h 2009-11-30 02:43:08.000000000 +0000 -+++ mpfr-2.4.2-b/mpfr-impl.h 2010-01-11 15:28:01.000000000 +0000 -@@ -65,6 +65,12 @@ - # ifndef __GMP_IMPL_H__ - # include "gmp-impl.h" - # endif -+# ifndef BITS_PER_MP_LIMB -+# define BITS_PER_MP_LIMB GMP_LIMB_BITS -+# endif -+#ifndef mpn_sqr_n -+# define mpn_sqr_n mpn_sqr -+#endif - # ifdef MPFR_NEED_LONGLONG_H - # include "longlong.h" - # endif -diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h ---- mpfr-2.4.2-a/mpfr.h 2009-12-18 12:05:09.000000000 +0000 -+++ mpfr-2.4.2-b/mpfr.h 2010-01-11 15:29:40.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 2 - #define MPFR_VERSION_MINOR 4 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "2.4.2-p2" -+#define MPFR_VERSION_STRING "2.4.2-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c ---- mpfr-2.4.2-a/version.c 2009-12-18 12:05:09.000000000 +0000 -+++ mpfr-2.4.2-b/version.c 2010-01-11 15:29:40.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "2.4.2-p2"; -+ return "2.4.2-p3"; - } diff --git a/patches/mpfr/3.0.0/110-mpfr_out_str.patch b/patches/mpfr/3.0.0/110-mpfr_out_str.patch deleted file mode 100644 index da98aab..0000000 --- a/patches/mpfr/3.0.0/110-mpfr_out_str.patch +++ /dev/null @@ -1,220 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-06-23 11:02:49.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-06-23 11:03:36.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_out_str -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-06-23 11:03:20.000000000 +0000 -@@ -1 +1 @@ --3.0.0 -+3.0.0-p1 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-06-23 11:03:20.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0" -+#define MPFR_VERSION_STRING "3.0.0-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi ---- mpfr-3.0.0-a/mpfr.texi 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.texi 2010-06-23 11:03:12.000000000 +0000 -@@ -2050,7 +2050,7 @@ - are printed. If @var{base} is greater than 10, @samp{@@} will be used - instead of @samp{e} as exponent delimiter. - --Return the number of bytes written, or if an error occurred, return 0. -+Return the number of characters written, or if an error occurred, return 0. - @end deftypefun - - @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd}) -diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c ---- mpfr-3.0.0-a/out_str.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/out_str.c 2010-06-23 11:03:12.000000000 +0000 -@@ -22,6 +22,16 @@ - - #include "mpfr-impl.h" - -+/* Warning! S should not contain "%". */ -+#define OUT_STR_RET(S) \ -+ do \ -+ { \ -+ int r; \ -+ r = fprintf (stream, (S)); \ -+ return r < 0 ? 0 : r; \ -+ } \ -+ while (0) -+ - size_t - mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op, - mpfr_rnd_t rnd_mode) -@@ -29,6 +39,7 @@ - char *s, *s0; - size_t l; - mpfr_exp_t e; -+ int err; - - MPFR_ASSERTN (base >= 2 && base <= 62); - -@@ -36,37 +47,16 @@ - if (stream == NULL) - stream = stdout; - -- if (MPFR_IS_NAN(op)) -- { -- fprintf (stream, "@NaN@"); -- return 3; -- } -- -- if (MPFR_IS_INF(op)) -- { -- if (MPFR_SIGN(op) > 0) -- { -- fprintf (stream, "@Inf@"); -- return 3; -- } -- else -- { -- fprintf (stream, "-@Inf@"); -- return 4; -- } -- } -- -- if (MPFR_IS_ZERO(op)) -+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op))) - { -- if (MPFR_SIGN(op) > 0) -- { -- fprintf(stream, "0"); -- return 1; -- } -+ if (MPFR_IS_NAN (op)) -+ OUT_STR_RET ("@NaN@"); -+ else if (MPFR_IS_INF (op)) -+ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@"); - else - { -- fprintf(stream, "-0"); -- return 2; -+ MPFR_ASSERTD (MPFR_IS_ZERO (op)); -+ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0"); - } - } - -@@ -77,21 +67,31 @@ - - l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str - - may be incorrect, as only an upper bound? */ -- if (*s == '-') -- fputc (*s++, stream); - -- /* outputs mantissa */ -- fputc (*s++, stream); e--; /* leading digit */ -- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream); -- fputs (s, stream); /* rest of mantissa */ -+ /* outputs possible sign and significand */ -+ err = (*s == '-' && fputc (*s++, stream) == EOF) -+ || fputc (*s++, stream) == EOF /* leading digit */ -+ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF -+ || fputs (s, stream) == EOF; /* trailing significand */ - (*__gmp_free_func) (s0, l); -+ if (MPFR_UNLIKELY (err)) -+ return 0; -+ -+ e--; /* due to the leading digit */ - - /* outputs exponent */ - if (e) - { -+ int r; -+ - MPFR_ASSERTN(e >= LONG_MIN); - MPFR_ASSERTN(e <= LONG_MAX); -- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); -+ -+ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); -+ if (MPFR_UNLIKELY (r < 0)) -+ return 0; -+ -+ l += r; - } - - return l; -diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c ---- mpfr-3.0.0-a/tests/tout_str.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tout_str.c 2010-06-23 11:03:12.000000000 +0000 -@@ -46,22 +46,54 @@ - special (void) - { - mpfr_t x; -+ unsigned int n; - - mpfr_init (x); - - mpfr_set_nan (x); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 5) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u " -+ "characters instead of 5.\n", n); -+ exit (1); -+ } - - mpfr_set_inf (x, 1); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 5) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u " -+ "characters instead of 5.\n", n); -+ exit (1); -+ } - - mpfr_set_inf (x, -1); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 6) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u " -+ "characters instead of 6.\n", n); -+ exit (1); -+ } - - mpfr_set_ui (x, 0, MPFR_RNDN); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 1) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u " -+ "characters instead of 1.\n", n); -+ exit (1); -+ } -+ - mpfr_neg (x, x, MPFR_RNDN); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 2) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u " -+ "characters instead of 2.\n", n); -+ exit (1); -+ } - - mpfr_clear (x); - } -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-06-23 11:03:20.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0"; -+ return "3.0.0-p1"; - } diff --git a/patches/mpfr/3.0.0/120-alloca.patch b/patches/mpfr/3.0.0/120-alloca.patch deleted file mode 100644 index af6dfb2..0000000 --- a/patches/mpfr/3.0.0/120-alloca.patch +++ /dev/null @@ -1,377 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in ---- mpfr-3.0.0-a/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -+++ mpfr-3.0.0-b/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -@@ -239,6 +239,7 @@ - distuninstallcheck_listfiles = find . -type f -print - distcleancheck_listfiles = find . -type f -print - ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ - AMTAR = @AMTAR@ - AR = @AR@ - AS = @AS@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-06-23 11:03:36.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-06-25 13:23:13.000000000 +0000 -@@ -0,0 +1 @@ -+alloca -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-06-23 11:03:20.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-06-25 13:23:13.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p1 -+3.0.0-p2 -diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4 ---- mpfr-3.0.0-a/acinclude.m4 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/acinclude.m4 2010-06-10 11:00:14.000000000 +0000 -@@ -59,6 +59,9 @@ - dnl sys/fpu.h - MIPS specific - AC_CHECK_HEADERS([sys/time.h sys/fpu.h]) - -+dnl Check how to get `alloca' -+AC_FUNC_ALLOCA -+ - dnl SIZE_MAX macro - gl_SIZE_MAX - -diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure ---- mpfr-3.0.0-a/configure 2010-06-10 11:00:51.000000000 +0000 -+++ mpfr-3.0.0-b/configure 2010-06-25 13:23:05.000000000 +0000 -@@ -783,6 +783,7 @@ - OBJDUMP - DLLTOOL - AS -+ALLOCA - MPFR_LIBM - ANSI2KNR - U -@@ -5622,6 +5623,197 @@ - done - - -+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -+# for constant arguments. Useless! -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -+$as_echo_n "checking for working alloca.h... " >&6; } -+if test "${ac_cv_working_alloca_h+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include <alloca.h> -+int -+main () -+{ -+char *p = (char *) alloca (2 * sizeof (int)); -+ if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_working_alloca_h=yes -+else -+ ac_cv_working_alloca_h=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -+$as_echo "$ac_cv_working_alloca_h" >&6; } -+if test $ac_cv_working_alloca_h = yes; then -+ -+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h -+ -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -+$as_echo_n "checking for alloca... " >&6; } -+if test "${ac_cv_func_alloca_works+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifdef __GNUC__ -+# define alloca __builtin_alloca -+#else -+# ifdef _MSC_VER -+# include <malloc.h> -+# define alloca _alloca -+# else -+# ifdef HAVE_ALLOCA_H -+# include <alloca.h> -+# else -+# ifdef _AIX -+ #pragma alloca -+# else -+# ifndef alloca /* predefined by HP cc +Olibcalls */ -+char *alloca (); -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+int -+main () -+{ -+char *p = (char *) alloca (1); -+ if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_func_alloca_works=yes -+else -+ ac_cv_func_alloca_works=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -+$as_echo "$ac_cv_func_alloca_works" >&6; } -+ -+if test $ac_cv_func_alloca_works = yes; then -+ -+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h -+ -+else -+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions -+# that cause trouble. Some versions do not even contain alloca or -+# contain a buggy version. If you still want to use their alloca, -+# use ar to extract alloca.o from them instead of compiling alloca.c. -+ -+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -+ -+$as_echo "#define C_ALLOCA 1" >>confdefs.h -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -+if test "${ac_cv_os_cray+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#if defined CRAY && ! defined CRAY2 -+webecray -+#else -+wenotbecray -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "webecray" >/dev/null 2>&1; then : -+ ac_cv_os_cray=yes -+else -+ ac_cv_os_cray=no -+fi -+rm -f conftest* -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -+$as_echo "$ac_cv_os_cray" >&6; } -+if test $ac_cv_os_cray = yes; then -+ for ac_func in _getb67 GETB67 getb67; do -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+eval as_val=\$$as_ac_var -+ if test "x$as_val" = x""yes; then : -+ -+cat >>confdefs.h <<_ACEOF -+#define CRAY_STACKSEG_END $ac_func -+_ACEOF -+ -+ break -+fi -+ -+ done -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -+$as_echo_n "checking stack direction for C alloca... " >&6; } -+if test "${ac_cv_c_stack_direction+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ ac_cv_c_stack_direction=0 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$ac_includes_default -+int -+find_stack_direction () -+{ -+ static char *addr = 0; -+ auto char dummy; -+ if (addr == 0) -+ { -+ addr = &dummy; -+ return find_stack_direction (); -+ } -+ else -+ return (&dummy > addr) ? 1 : -1; -+} -+ -+int -+main () -+{ -+ return find_stack_direction () < 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_c_stack_direction=1 -+else -+ ac_cv_c_stack_direction=-1 -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -+$as_echo "$ac_cv_c_stack_direction" >&6; } -+cat >>confdefs.h <<_ACEOF -+#define STACK_DIRECTION $ac_cv_c_stack_direction -+_ACEOF -+ -+ -+fi -+ -+ - - for ac_header in stdint.h - do : -@@ -7564,13 +7756,13 @@ - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:7573: output\"" >&5) -+ (eval echo "\"\$as_me:7765: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -8772,7 +8964,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 8775 "configure"' > conftest.$ac_ext -+ echo '#line 8967 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -10032,11 +10224,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:10039: \$? = $ac_status" >&5 -+ echo "$as_me:10231: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -10371,11 +10563,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:10378: \$? = $ac_status" >&5 -+ echo "$as_me:10570: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -10476,11 +10668,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:10483: \$? = $ac_status" >&5 -+ echo "$as_me:10675: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -10531,11 +10723,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:10538: \$? = $ac_status" >&5 -+ echo "$as_me:10730: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -12915,7 +13107,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12918 "configure" -+#line 13110 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -13011,7 +13203,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 13014 "configure" -+#line 13206 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-06-23 11:03:20.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-06-25 13:23:13.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p1" -+#define MPFR_VERSION_STRING "3.0.0-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in ---- mpfr-3.0.0-a/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -+++ mpfr-3.0.0-b/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000 -@@ -960,6 +960,7 @@ - red=; grn=; lgn=; blu=; std= - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ - AMTAR = @AMTAR@ - AR = @AR@ - AS = @AS@ -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-06-23 11:03:20.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-06-25 13:23:13.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p1"; -+ return "3.0.0-p2"; - } diff --git a/patches/mpfr/3.0.0/130-gamma_underflow.patch b/patches/mpfr/3.0.0/130-gamma_underflow.patch deleted file mode 100644 index cf8a936..0000000 --- a/patches/mpfr/3.0.0/130-gamma_underflow.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-07-10 00:11:19.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-07-10 00:12:50.000000000 +0000 -@@ -0,0 +1 @@ -+gamma_underflow -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-06-25 13:23:13.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-07-10 00:11:53.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p2 -+3.0.0-p3 -diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c ---- mpfr-3.0.0-a/gamma.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/gamma.c 2010-07-10 00:11:46.000000000 +0000 -@@ -274,7 +274,7 @@ - /* we want an upper bound for x * [log(2-x)-1]. - since x < 0, we need a lower bound on log(2-x) */ - mpfr_ui_sub (xp, 2, x, MPFR_RNDD); -- mpfr_log (xp, xp, MPFR_RNDD); -+ mpfr_log2 (xp, xp, MPFR_RNDD); - mpfr_sub_ui (xp, xp, 1, MPFR_RNDD); - mpfr_mul (xp, xp, x, MPFR_RNDU); - -@@ -303,8 +303,8 @@ - { - mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */ - mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */ -- mpfr_log (tmp, tmp, MPFR_RNDU); -- mpfr_add (tmp, tmp, xp, MPFR_RNDU); -+ mpfr_log2 (tmp, tmp, MPFR_RNDU); -+ mpfr_add (xp, tmp, xp, MPFR_RNDU); - underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0; - } - -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-06-25 13:23:13.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-07-10 00:11:53.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p2" -+#define MPFR_VERSION_STRING "3.0.0-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c ---- mpfr-3.0.0-a/tests/tgamma.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tgamma.c 2010-07-10 00:11:46.000000000 +0000 -@@ -461,6 +461,20 @@ - mpfr_clear (x); - } - -+/* bug found by Stathis, only occurs on 32-bit machines */ -+static void -+test20100709 (void) -+{ -+ mpfr_t x; -+ int inex; -+ -+ mpfr_init2 (x, 100); -+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN); -+ inex = mpfr_gamma (x, x, MPFR_RNDN); -+ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0); -+ mpfr_clear (x); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -471,6 +485,7 @@ - test_generic (2, 100, 2); - gamma_integer (); - test20071231 (); -+ test20100709 (); - - data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); - -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-06-25 13:23:13.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-07-10 00:11:53.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p2"; -+ return "3.0.0-p3"; - } diff --git a/patches/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch b/patches/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch deleted file mode 100644 index 67d6a6a..0000000 --- a/patches/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch +++ /dev/null @@ -1,239 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-09-07 08:44:01.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-09-07 08:48:46.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_cmp/set_ui/si -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-07-10 00:11:53.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-09-07 08:46:06.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p3 -+3.0.0-p4 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-07-10 00:11:53.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-09-07 08:46:06.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p3" -+#define MPFR_VERSION_STRING "3.0.0-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -798,35 +798,45 @@ - anyway. Checking with other ICC versions is needed. Possibly detect - whether warnings are produced or not with a configure test. - + Remove C++ too, since it complains too much. */ -+/* Added casts to improve robustness in case of undefined behavior and -+ compiler extensions based on UB (in particular -fwrapv). MPFR doesn't -+ use such extensions, but these macros will be used by 3rd-party code, -+ where such extensions may be required. -+ Moreover casts to unsigned long have been added to avoid warnings in -+ programs that use MPFR and are compiled with -Wconversion; such casts -+ are OK since if X is a constant expression, then (unsigned long) X is -+ also a constant expression, so that the optimizations still work. */ - #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus) - #if (__GNUC__ >= 2) - #undef mpfr_cmp_ui --/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. */ --#define mpfr_cmp_ui(_f,_u) \ -- (__builtin_constant_p (_u) && (_u) == 0 ? \ -- mpfr_sgn (_f) : \ -- mpfr_cmp_ui_2exp ((_f),(_u),0)) -+/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. -+ But warning! mpfr_sgn is specified as a macro in the API, thus the macro -+ mustn't be used if side effects are possible, like here. */ -+#define mpfr_cmp_ui(_f,_u) \ -+ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ (mpfr_sgn) (_f) : \ -+ mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0)) - #undef mpfr_cmp_si --#define mpfr_cmp_si(_f,_s) \ -- (__builtin_constant_p (_s) && (_s) >= 0 ? \ -- mpfr_cmp_ui ((_f), (_s)) : \ -- mpfr_cmp_si_2exp ((_f), (_s), 0)) -+#define mpfr_cmp_si(_f,_s) \ -+ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -+ mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \ -+ mpfr_cmp_si_2exp ((_f), (long) (_s), 0)) - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 - #undef mpfr_set_ui --#define mpfr_set_ui(_f,_u,_r) \ -- (__builtin_constant_p (_u) && (_u) == 0 ? \ -- __extension__ ({ \ -- mpfr_ptr _p = (_f); \ -- _p->_mpfr_sign = 1; \ -- _p->_mpfr_exp = __MPFR_EXP_ZERO; \ -- (void) (_r); 0; }) : \ -- mpfr_set_ui_2exp ((_f), (_u), 0, (_r))) -+#define mpfr_set_ui(_f,_u,_r) \ -+ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ __extension__ ({ \ -+ mpfr_ptr _p = (_f); \ -+ _p->_mpfr_sign = 1; \ -+ _p->_mpfr_exp = __MPFR_EXP_ZERO; \ -+ (void) (_r); 0; }) : \ -+ mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r))) - #endif - #undef mpfr_set_si --#define mpfr_set_si(_f,_s,_r) \ -- (__builtin_constant_p (_s) && (_s) >= 0 ? \ -- mpfr_set_ui ((_f), (_s), (_r)) : \ -- mpfr_set_si_2exp ((_f), (_s), 0, (_r))) -+#define mpfr_set_si(_f,_s,_r) \ -+ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -+ mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \ -+ mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r))) - #endif - #endif - -diff -Naurd mpfr-3.0.0-a/tests/tcmp_ui.c mpfr-3.0.0-b/tests/tcmp_ui.c ---- mpfr-3.0.0-a/tests/tcmp_ui.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tcmp_ui.c 2010-09-07 08:45:12.000000000 +0000 -@@ -88,6 +88,126 @@ - mpfr_clear (x); - } - -+/* Since mpfr_cmp_ui and mpfr_cmp_si are also implemented by a macro -+ with __builtin_constant_p for GCC, check that side effects are -+ handled correctly. */ -+static void -+check_macros (void) -+{ -+ mpfr_t x; -+ int c; -+ -+ mpfr_init2 (x, 32); -+ -+ c = 0; -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ if (mpfr_cmp_ui (x, 17) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_ui(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_ui (x, (c++, 17)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_ui(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 1) -+ { -+ printf ("Error 3 on mpfr_cmp_ui(x,17) in check_macros\n" -+ "(c = %d instead of 1)\n", c); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, 17) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_si(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, (c++, 17)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_si(x,17) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 2) -+ { -+ printf ("Error 3 on mpfr_cmp_si(x,17) in check_macros\n" -+ "(c = %d instead of 2)\n", c); -+ exit (1); -+ } -+ -+ c = 0; -+ mpfr_set_ui (x, 0, MPFR_RNDN); -+ if (mpfr_cmp_ui (x, 0) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_ui(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_ui (x, (c++, 0)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_ui(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 1) -+ { -+ printf ("Error 3 on mpfr_cmp_ui(x,0) in check_macros\n" -+ "(c = %d instead of 1)\n", c); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, 0) != 0) -+ { -+ printf ("Error 1 on mpfr_cmp_si(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (mpfr_cmp_si (x, (c++, 0)) != 0) -+ { -+ printf ("Error 2 on mpfr_cmp_si(x,0) in check_macros\n"); -+ exit (1); -+ } -+ if (c != 2) -+ { -+ printf ("Error 3 on mpfr_cmp_si(x,0) in check_macros\n" -+ "(c = %d instead of 2)\n", c); -+ exit (1); -+ } -+ -+ mpfr_clear (x); -+} -+ -+/* Bug in r7114 */ -+static void -+test_macros (void) -+{ -+ mpfr_t x[3]; -+ mpfr_ptr p; -+ -+ mpfr_inits (x[0], x[1], x[2], (mpfr_ptr) 0); -+ mpfr_set_ui (x[0], 0, MPFR_RNDN); -+ p = x[0]; -+ if (mpfr_cmp_ui (p++, 0) != 0) -+ { -+ printf ("Error in mpfr_cmp_ui macro: result should be 0.\n"); -+ exit (1); -+ } -+ if (p != x[1]) -+ { -+ printf ("Error in mpfr_cmp_ui macro: p - x[0] = %d (expecting 1)\n", -+ (int) (p - x[0])); -+ exit (1); -+ } -+ p = x[0]; -+ if (mpfr_cmp_si (p++, 0) != 0) -+ { -+ printf ("Error in mpfr_cmp_si macro: result should be 0.\n"); -+ exit (1); -+ } -+ if (p != x[1]) -+ { -+ printf ("Error in mpfr_cmp_si macro: p - x[0] = %d (expecting 1)\n", -+ (int) (p - x[0])); -+ exit (1); -+ } -+ mpfr_clears (x[0], x[1], x[2], (mpfr_ptr) 0); -+} -+ - int - main (void) - { -@@ -216,6 +336,8 @@ - mpfr_clear (x); - - check_nan (); -+ check_macros (); -+ test_macros (); - - tests_end_mpfr (); - return 0; -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-07-10 00:11:53.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-09-07 08:46:06.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p3"; -+ return "3.0.0-p4"; - } diff --git a/patches/mpfr/3.0.0/150-tcan_round.patch b/patches/mpfr/3.0.0/150-tcan_round.patch deleted file mode 100644 index 292e7a5..0000000 --- a/patches/mpfr/3.0.0/150-tcan_round.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-10-21 20:28:38.000000000 +0000 -@@ -0,0 +1 @@ -+tcan_round -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-09-07 08:46:06.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-10-21 20:28:38.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p4 -+3.0.0-p5 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-09-07 08:46:06.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 20:28:38.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p4" -+#define MPFR_VERSION_STRING "3.0.0-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/tests/tcan_round.c mpfr-3.0.0-b/tests/tcan_round.c ---- mpfr-3.0.0-a/tests/tcan_round.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tcan_round.c 2010-10-21 20:28:38.000000000 +0000 -@@ -41,7 +41,7 @@ - /* avoid mpn_random which leaks memory */ - for (i = 0; i < n; i++) - buf[i] = randlimb (); -- p = (mpfr_prec_t) randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; -+ p = randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; - err = p + randlimb () % GMP_NUMB_BITS; - r1 = mpfr_round_p (buf, n, err, p); - r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-09-07 08:46:06.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-10-21 20:28:38.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p4"; -+ return "3.0.0-p5"; - } diff --git a/patches/mpfr/3.0.0/160-mpfr_sub1.patch b/patches/mpfr/3.0.0/160-mpfr_sub1.patch deleted file mode 100644 index 2ce98e9..0000000 --- a/patches/mpfr/3.0.0/160-mpfr_sub1.patch +++ /dev/null @@ -1,628 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-10-21 20:59:32.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_sub1 -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-10-21 20:59:32.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p5 -+3.0.0-p6 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 20:59:32.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p5" -+#define MPFR_VERSION_STRING "3.0.0-p6" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/sub1.c mpfr-3.0.0-b/sub1.c ---- mpfr-3.0.0-a/sub1.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/sub1.c 2010-10-21 20:59:32.000000000 +0000 -@@ -37,7 +37,9 @@ - mp_size_t cancel2, an, bn, cn, cn0; - mp_limb_t *ap, *bp, *cp; - mp_limb_t carry, bb, cc, borrow = 0; -- int inexact, shift_b, shift_c, is_exact = 1, down = 0, add_exp = 0; -+ int inexact, shift_b, shift_c, add_exp = 0; -+ int cmp_low = 0; /* used for rounding to nearest: 0 if low(b) = low(c), -+ negative if low(b) < low(c), positive if low(b)>low(c) */ - int sh, k; - MPFR_TMP_DECL(marker); - -@@ -196,7 +198,8 @@ - } - - #ifdef DEBUG -- printf ("shift_b=%d shift_c=%d diffexp=%lu\n", shift_b, shift_c, -+ printf ("rnd=%s shift_b=%d shift_c=%d diffexp=%lu\n", -+ mpfr_print_rnd_mode (rnd_mode), shift_b, shift_c, - (unsigned long) diff_exp); - #endif - -@@ -307,17 +310,18 @@ - { - if (MPFR_LIKELY(sh)) - { -- is_exact = (carry == 0); - /* can decide except when carry = 2^(sh-1) [middle] - or carry = 0 [truncate, but cannot decide inexact flag] */ -- down = (carry < (MPFR_LIMB_ONE << (sh - 1))); - if (carry > (MPFR_LIMB_ONE << (sh - 1))) - goto add_one_ulp; -- else if ((0 < carry) && down) -+ else if ((0 < carry) && (carry < (MPFR_LIMB_ONE << (sh - 1)))) - { - inexact = -1; /* result if smaller than exact value */ - goto truncate; - } -+ /* now carry = 2^(sh-1), in which case cmp_low=2, -+ or carry = 0, in which case cmp_low=0 */ -+ cmp_low = (carry == 0) ? 0 : 2; - } - } - else /* directed rounding: set rnd_mode to RNDZ iff toward zero */ -@@ -344,12 +348,32 @@ - cn -= (long int) an + cancel2; - - #ifdef DEBUG -- printf ("last %d bits from a are %lu, bn=%ld, cn=%ld\n", -+ printf ("last sh=%d bits from a are %lu, bn=%ld, cn=%ld\n", - sh, (unsigned long) carry, (long) bn, (long) cn); - #endif - -+ /* for rounding to nearest, we couldn't conclude up to here in the following -+ cases: -+ 1. sh = 0, then cmp_low=0: we can either truncate, subtract one ulp -+ or add one ulp: -1 ulp < low(b)-low(c) < 1 ulp -+ 2. sh > 0 but the low sh bits from high(b)-high(c) equal 2^(sh-1): -+ -0.5 ulp <= -1/2^sh < low(b)-low(c)-0.5 < 1/2^sh <= 0.5 ulp -+ we can't decide the rounding, in that case cmp_low=2: -+ either we truncate and flag=-1, or we add one ulp and flag=1 -+ 3. the low sh>0 bits from high(b)-high(c) equal 0: we know we have to -+ truncate but we can't decide the ternary value, here cmp_low=0: -+ -0.5 ulp <= -1/2^sh < low(b)-low(c) < 1/2^sh <= 0.5 ulp -+ we always truncate and inexact can be any of -1,0,1 -+ */ -+ -+ /* note: here cn might exceed cn0, in which case we consider a zero limb */ - for (k = 0; (bn > 0) || (cn > 0); k = 1) - { -+ /* if cmp_low < 0, we know low(b) - low(c) < 0 -+ if cmp_low > 0, we know low(b) - low(c) > 0 -+ (more precisely if cmp_low = 2, low(b) - low(c) = 0.5 ulp so far) -+ if cmp_low = 0, so far low(b) - low(c) = 0 */ -+ - /* get next limbs */ - bb = (bn > 0) ? bp[--bn] : 0; - if ((cn > 0) && (cn-- <= cn0)) -@@ -357,76 +381,115 @@ - else - cc = 0; - -- /* down is set when low(b) < low(c) */ -- if (down == 0) -- down = (bb < cc); -+ /* cmp_low compares low(b) and low(c) */ -+ if (cmp_low == 0) /* case 1 or 3 */ -+ cmp_low = (bb < cc) ? -2+k : (bb > cc) ? 1 : 0; -+ -+ /* Case 1 for k=0 splits into 7 subcases: -+ 1a: bb > cc + half -+ 1b: bb = cc + half -+ 1c: 0 < bb - cc < half -+ 1d: bb = cc -+ 1e: -half < bb - cc < 0 -+ 1f: bb - cc = -half -+ 1g: bb - cc < -half -+ -+ Case 2 splits into 3 subcases: -+ 2a: bb > cc -+ 2b: bb = cc -+ 2c: bb < cc -+ -+ Case 3 splits into 3 subcases: -+ 3a: bb > cc -+ 3b: bb = cc -+ 3c: bb < cc -+ */ - - /* the case rounding to nearest with sh=0 is special since one couldn't - subtract above 1/2 ulp in the trailing limb of the result */ -- if ((rnd_mode == MPFR_RNDN) && sh == 0 && k == 0) -+ if (rnd_mode == MPFR_RNDN && sh == 0 && k == 0) /* case 1 for k=0 */ - { - mp_limb_t half = MPFR_LIMB_HIGHBIT; - -- is_exact = (bb == cc); -- - /* add one ulp if bb > cc + half - truncate if cc - half < bb < cc + half - sub one ulp if bb < cc - half - */ - -- if (down) -+ if (cmp_low < 0) /* bb < cc: -1 ulp < low(b) - low(c) < 0, -+ cases 1e, 1f and 1g */ - { - if (cc >= half) - cc -= half; -- else -+ else /* since bb < cc < half, bb+half < 2*half */ - bb += half; -+ /* now we have bb < cc + half: -+ we have to subtract one ulp if bb < cc, -+ and truncate if bb > cc */ - } -- else /* bb >= cc */ -+ else if (cmp_low >= 0) /* bb >= cc, cases 1a to 1d */ - { - if (cc < half) - cc += half; -- else -+ else /* since bb >= cc >= half, bb - half >= 0 */ - bb -= half; -+ /* now we have bb > cc - half: we have to add one ulp if bb > cc, -+ and truncate if bb < cc */ -+ if (cmp_low > 0) -+ cmp_low = 2; - } - } - - #ifdef DEBUG -- printf (" bb=%lu cc=%lu down=%d is_exact=%d\n", -- (unsigned long) bb, (unsigned long) cc, down, is_exact); -+ printf ("k=%u bb=%lu cc=%lu cmp_low=%d\n", k, -+ (unsigned long) bb, (unsigned long) cc, cmp_low); - #endif -- if (bb < cc) -+ if (cmp_low < 0) /* low(b) - low(c) < 0: either truncate or subtract -+ one ulp */ - { - if (rnd_mode == MPFR_RNDZ) -- goto sub_one_ulp; -+ goto sub_one_ulp; /* set inexact=-1 */ - else if (rnd_mode != MPFR_RNDN) /* round away */ - { - inexact = 1; - goto truncate; - } -- else /* round to nearest: special case here since for sh=k=0 -- bb = bb0 - MPFR_LIMB_HIGHBIT */ -+ else /* round to nearest */ - { -- if (is_exact && sh == 0) -- { -- /* For k=0 we can't decide exactness since it may depend -- from low order bits. -- For k=1, the first low limbs matched: low(b)-low(c)<0. */ -- if (k) -- { -- inexact = 1; -- goto truncate; -- } -- } -- else if (down && sh == 0) -- goto sub_one_ulp; -- else -- { -- inexact = (is_exact) ? 1 : -1; -+ /* If cmp_low < 0 and bb > cc, then -0.5 ulp < low(b)-low(c) < 0, -+ whatever the value of sh. -+ If sh>0, then cmp_low < 0 implies that the initial neglected -+ sh bits were 0 (otherwise cmp_low=2 initially), thus the -+ weight of the new bits is less than 0.5 ulp too. -+ If k > 0 (and sh=0) this means that either the first neglected -+ limbs bb and cc were equal (thus cmp_low was 0 for k=0), -+ or we had bb - cc = -0.5 ulp or 0.5 ulp. -+ The last case is not possible here since we would have -+ cmp_low > 0 which is sticky. -+ In the first case (where we have cmp_low = -1), we truncate, -+ whereas in the 2nd case we have cmp_low = -2 and we subtract -+ one ulp. -+ */ -+ if (bb > cc || sh > 0 || cmp_low == -1) -+ { /* -0.5 ulp < low(b)-low(c) < 0, -+ bb > cc corresponds to cases 1e and 1f1 -+ sh > 0 corresponds to cases 3c and 3b3 -+ cmp_low = -1 corresponds to case 1d3 (also 3b3) */ -+ inexact = 1; - goto truncate; - } -+ else if (bb < cc) /* here sh = 0 and low(b)-low(c) < -0.5 ulp, -+ this corresponds to cases 1g and 1f3 */ -+ goto sub_one_ulp; -+ /* the only case where we can't conclude is sh=0 and bb=cc, -+ i.e., we have low(b) - low(c) = -0.5 ulp (up to now), thus -+ we don't know if we must truncate or subtract one ulp. -+ Note: for sh=0 we can't have low(b) - low(c) = -0.5 ulp up to -+ now, since low(b) - low(c) > 1/2^sh */ - } - } -- else if (bb > cc) -+ else if (cmp_low > 0) /* 0 < low(b) - low(c): either truncate or -+ add one ulp */ - { - if (rnd_mode == MPFR_RNDZ) - { -@@ -437,34 +500,70 @@ - goto add_one_ulp; - else /* round to nearest */ - { -- if (is_exact) -+ if (bb > cc) - { -- inexact = -1; -- goto truncate; -+ /* if sh=0, then bb>cc means that low(b)-low(c) > 0.5 ulp, -+ and similarly when cmp_low=2 */ -+ if (cmp_low == 2) /* cases 1a, 1b1, 2a and 2b1 */ -+ goto add_one_ulp; -+ /* sh > 0 and cmp_low > 0: this implies that the sh initial -+ neglected bits were 0, and the remaining low(b)-low(c)>0, -+ but its weight is less than 0.5 ulp */ -+ else /* 0 < low(b) - low(c) < 0.5 ulp, this corresponds to -+ cases 3a, 1d1 and 3b1 */ -+ { -+ inexact = -1; -+ goto truncate; -+ } - } -- else if (down) -+ else if (bb < cc) /* 0 < low(b) - low(c) < 0.5 ulp, cases 1c, -+ 1b3, 2b3 and 2c */ - { -- inexact = 1; -+ inexact = -1; - goto truncate; - } -- else -- goto add_one_ulp; -+ /* the only case where we can't conclude is bb=cc, i.e., -+ low(b) - low(c) = 0.5 ulp (up to now), thus we don't know -+ if we must truncate or add one ulp. */ - } - } -+ /* after k=0, we cannot conclude in the following cases, we split them -+ according to the values of bb and cc for k=1: -+ 1b. sh=0 and cmp_low = 1 and bb-cc = half [around 0.5 ulp] -+ 1b1. bb > cc: add one ulp, inex = 1 -+ 1b2: bb = cc: cannot conclude -+ 1b3: bb < cc: truncate, inex = -1 -+ 1d. sh=0 and cmp_low = 0 and bb-cc = 0 [around 0] -+ 1d1: bb > cc: truncate, inex = -1 -+ 1d2: bb = cc: cannot conclude -+ 1d3: bb < cc: truncate, inex = +1 -+ 1f. sh=0 and cmp_low = -1 and bb-cc = -half [around -0.5 ulp] -+ 1f1: bb > cc: truncate, inex = +1 -+ 1f2: bb = cc: cannot conclude -+ 1f3: bb < cc: sub one ulp, inex = -1 -+ 2b. sh > 0 and cmp_low = 2 and bb=cc [around 0.5 ulp] -+ 2b1. bb > cc: add one ulp, inex = 1 -+ 2b2: bb = cc: cannot conclude -+ 2b3: bb < cc: truncate, inex = -1 -+ 3b. sh > 0 and cmp_low = 0 [around 0] -+ 3b1. bb > cc: truncate, inex = -1 -+ 3b2: bb = cc: cannot conclude -+ 3b3: bb < cc: truncate, inex = +1 -+ */ - } - -- if ((rnd_mode == MPFR_RNDN) && !is_exact) -+ if ((rnd_mode == MPFR_RNDN) && cmp_low != 0) - { - /* even rounding rule */ - if ((ap[0] >> sh) & 1) - { -- if (down) -+ if (cmp_low < 0) - goto sub_one_ulp; - else - goto add_one_ulp; - } - else -- inexact = (down) ? 1 : -1; -+ inexact = (cmp_low > 0) ? -1 : 1; - } - else - inexact = 0; -diff -Naurd mpfr-3.0.0-a/tests/tfma.c mpfr-3.0.0-b/tests/tfma.c ---- mpfr-3.0.0-a/tests/tfma.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tfma.c 2010-10-21 20:59:32.000000000 +0000 -@@ -337,6 +337,94 @@ - mpfr_clears (x, y, z, r, (mpfr_ptr) 0); - } - -+static void -+bug20101018 (void) -+{ -+ mpfr_t x, y, z, t, u; -+ int i; -+ -+ mpfr_init2 (x, 64); -+ mpfr_init2 (y, 64); -+ mpfr_init2 (z, 64); -+ mpfr_init2 (t, 64); -+ mpfr_init2 (u, 64); -+ -+ mpfr_set_str (x, "0xf.fffffffffffffffp-14766", 16, MPFR_RNDN); -+ mpfr_set_str (y, "-0xf.fffffffffffffffp+317", 16, MPFR_RNDN); -+ mpfr_set_str (z, "0x8.3ffffffffffe3ffp-14443", 16, MPFR_RNDN); -+ mpfr_set_str (t, "0x8.7ffffffffffc7ffp-14444", 16, MPFR_RNDN); -+ i = mpfr_fma (u, x, y, z, MPFR_RNDN); -+ if (mpfr_cmp (u, t) != 0) -+ { -+ printf ("Wrong result in bug20101018 (a)\n"); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); -+ printf ("\nGot "); -+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in bug20101018 (a)\n"); -+ printf ("Expected > 0\n"); -+ printf ("Got %d\n", i); -+ exit (1); -+ } -+ -+ mpfr_set_str (x, "-0xf.fffffffffffffffp-11420", 16, MPFR_RNDN); -+ mpfr_set_str (y, "0xf.fffffffffffffffp+9863", 16, MPFR_RNDN); -+ mpfr_set_str (z, "0x8.fffff80ffffffffp-1551", 16, MPFR_RNDN); -+ mpfr_set_str (t, "0x9.fffff01ffffffffp-1552", 16, MPFR_RNDN); -+ i = mpfr_fma (u, x, y, z, MPFR_RNDN); -+ if (mpfr_cmp (u, t) != 0) -+ { -+ printf ("Wrong result in bug20101018 (b)\n"); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); -+ printf ("\nGot "); -+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in bug20101018 (b)\n"); -+ printf ("Expected > 0\n"); -+ printf ("Got %d\n", i); -+ exit (1); -+ } -+ -+ mpfr_set_str (x, "0xf.fffffffffffffffp-2125", 16, MPFR_RNDN); -+ mpfr_set_str (y, "-0xf.fffffffffffffffp-6000", 16, MPFR_RNDN); -+ mpfr_set_str (z, "0x8p-8119", 16, MPFR_RNDN); -+ mpfr_set_str (t, "0x8.000000000000001p-8120", 16, MPFR_RNDN); -+ i = mpfr_fma (u, x, y, z, MPFR_RNDN); -+ if (mpfr_cmp (u, t) != 0) -+ { -+ printf ("Wrong result in bug20101018 (c)\n"); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); -+ printf ("\nGot "); -+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in bug20101018 (c)\n"); -+ printf ("Expected > 0\n"); -+ printf ("Got %d\n", i); -+ exit (1); -+ } -+ -+ mpfr_clear (x); -+ mpfr_clear (y); -+ mpfr_clear (z); -+ mpfr_clear (t); -+ mpfr_clear (u); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -345,6 +433,8 @@ - - tests_start_mpfr (); - -+ bug20101018 (); -+ - mpfr_init (x); - mpfr_init (s); - mpfr_init (y); -diff -Naurd mpfr-3.0.0-a/tests/tsub.c mpfr-3.0.0-b/tests/tsub.c ---- mpfr-3.0.0-a/tests/tsub.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tsub.c 2010-10-21 20:59:32.000000000 +0000 -@@ -201,6 +201,8 @@ - if (mpfr_cmp (z, x)) - { - printf ("Error in mpfr_sub (2)\n"); -+ printf ("Expected "); mpfr_print_binary (x); puts (""); -+ printf ("Got "); mpfr_print_binary (z); puts (""); - exit (1); - } - mpfr_set_str_binary (x, "1.1110111011110001110111011111111111101000011001011100101100101101"); -@@ -478,6 +480,156 @@ - mpfr_clear (u); - } - -+/* Bug found by Jakub Jelinek -+ * http://bugzilla.redhat.com/643657 -+ * https://gforge.inria.fr/tracker/index.php?func=detail&aid=11301 -+ * The consequence can be either an assertion failure (i = 2 in the -+ * testcase below, in debug mode) or an incorrectly rounded value. -+ */ -+static void -+bug20101017 (void) -+{ -+ mpfr_t a, b, c; -+ int inex; -+ int i; -+ -+ mpfr_init2 (a, GMP_NUMB_BITS * 2); -+ mpfr_init2 (b, GMP_NUMB_BITS); -+ mpfr_init2 (c, GMP_NUMB_BITS); -+ -+ /* a = 2^(2N) + k.2^(2N-1) + 2^N and b = 1 -+ with N = GMP_NUMB_BITS and k = 0 or 1. -+ c = a - b should round to the same value as a. */ -+ -+ for (i = 2; i <= 3; i++) -+ { -+ mpfr_set_ui_2exp (a, i, GMP_NUMB_BITS - 1, MPFR_RNDN); -+ mpfr_add_ui (a, a, 1, MPFR_RNDN); -+ mpfr_mul_2ui (a, a, GMP_NUMB_BITS, MPFR_RNDN); -+ mpfr_set_ui (b, 1, MPFR_RNDN); -+ inex = mpfr_sub (c, a, b, MPFR_RNDN); -+ mpfr_set (b, a, MPFR_RNDN); -+ if (! mpfr_equal_p (c, b)) -+ { -+ printf ("Error in bug20101017 for i = %d.\n", i); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, b, MPFR_RNDN); -+ putchar ('\n'); -+ printf ("Got "); -+ mpfr_out_str (stdout, 16, 0, c, MPFR_RNDN); -+ putchar ('\n'); -+ exit (1); -+ } -+ if (inex >= 0) -+ { -+ printf ("Error in bug20101017 for i = %d: bad inex value.\n", i); -+ printf ("Expected negative, got %d.\n", inex); -+ exit (1); -+ } -+ } -+ -+ mpfr_set_prec (a, 64); -+ mpfr_set_prec (b, 129); -+ mpfr_set_prec (c, 2); -+ mpfr_set_str_binary (b, "0.100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001E65"); -+ mpfr_set_str_binary (c, "0.10E1"); -+ inex = mpfr_sub (a, b, c, MPFR_RNDN); -+ if (mpfr_cmp_ui_2exp (a, 1, 64) != 0 || inex >= 0) -+ { -+ printf ("Error in mpfr_sub for b-c for b=2^64+1+2^(-64), c=1\n"); -+ printf ("Expected result 2^64 with inex < 0\n"); -+ printf ("Got "); mpfr_print_binary (a); -+ printf (" with inex=%d\n", inex); -+ exit (1); -+ } -+ -+ mpfr_clears (a, b, c, (mpfr_ptr) 0); -+} -+ -+/* hard test of rounding */ -+static void -+check_rounding (void) -+{ -+ mpfr_t a, b, c, res; -+ mpfr_prec_t p; -+ long k, l; -+ int i; -+ -+#define MAXKL (2 * GMP_NUMB_BITS) -+ for (p = MPFR_PREC_MIN; p <= GMP_NUMB_BITS; p++) -+ { -+ mpfr_init2 (a, p); -+ mpfr_init2 (res, p); -+ mpfr_init2 (b, p + 1 + MAXKL); -+ mpfr_init2 (c, MPFR_PREC_MIN); -+ -+ /* b = 2^p + 1 + 2^(-k), c = 2^(-l) */ -+ for (k = 0; k <= MAXKL; k++) -+ for (l = 0; l <= MAXKL; l++) -+ { -+ mpfr_set_ui_2exp (b, 1, p, MPFR_RNDN); -+ mpfr_add_ui (b, b, 1, MPFR_RNDN); -+ mpfr_mul_2ui (b, b, k, MPFR_RNDN); -+ mpfr_add_ui (b, b, 1, MPFR_RNDN); -+ mpfr_div_2ui (b, b, k, MPFR_RNDN); -+ mpfr_set_ui_2exp (c, 1, -l, MPFR_RNDN); -+ i = mpfr_sub (a, b, c, MPFR_RNDN); -+ /* b - c = 2^p + 1 + 2^(-k) - 2^(-l), should be rounded to -+ 2^p for l <= k, and 2^p+2 for l < k */ -+ if (l <= k) -+ { -+ if (mpfr_cmp_ui_2exp (a, 1, p) != 0) -+ { -+ printf ("Wrong result in check_rounding\n"); -+ printf ("p=%lu k=%ld l=%ld\n", p, k, l); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("Expected 2^%lu\n", p); -+ printf ("Got "); mpfr_print_binary (a); puts (""); -+ exit (1); -+ } -+ if (i >= 0) -+ { -+ printf ("Wrong ternary value in check_rounding\n"); -+ printf ("p=%lu k=%ld l=%ld\n", p, k, l); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("a="); mpfr_print_binary (a); puts (""); -+ printf ("Expected < 0, got %d\n", i); -+ exit (1); -+ } -+ } -+ else /* l < k */ -+ { -+ mpfr_set_ui_2exp (res, 1, p, MPFR_RNDN); -+ mpfr_add_ui (res, res, 2, MPFR_RNDN); -+ if (mpfr_cmp (a, res) != 0) -+ { -+ printf ("Wrong result in check_rounding\n"); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("Expected "); mpfr_print_binary (res); puts (""); -+ printf ("Got "); mpfr_print_binary (a); puts (""); -+ exit (1); -+ } -+ if (i <= 0) -+ { -+ printf ("Wrong ternary value in check_rounding\n"); -+ printf ("b="); mpfr_print_binary (b); puts (""); -+ printf ("c="); mpfr_print_binary (c); puts (""); -+ printf ("Expected > 0, got %d\n", i); -+ exit (1); -+ } -+ } -+ } -+ -+ mpfr_clear (a); -+ mpfr_clear (res); -+ mpfr_clear (b); -+ mpfr_clear (c); -+ } -+} -+ - #define TEST_FUNCTION test_sub - #define TWO_ARGS - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) -@@ -491,6 +643,8 @@ - - tests_start_mpfr (); - -+ bug20101017 (); -+ check_rounding (); - check_diverse (); - check_inexact (); - bug_ddefour (); -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-10-21 20:28:38.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-10-21 20:59:32.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p5"; -+ return "3.0.0-p6"; - } diff --git a/patches/mpfr/3.0.0/170-mpfr_set_ld.patch b/patches/mpfr/3.0.0/170-mpfr_set_ld.patch deleted file mode 100644 index 9209afe..0000000 --- a/patches/mpfr/3.0.0/170-mpfr_set_ld.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-10-21 21:18:26.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_set_ld -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-10-21 21:18:26.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p6 -+3.0.0-p7 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 21:18:26.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p6" -+#define MPFR_VERSION_STRING "3.0.0-p7" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.0-a/set_ld.c mpfr-3.0.0-b/set_ld.c ---- mpfr-3.0.0-a/set_ld.c 2010-06-10 11:00:14.000000000 +0000 -+++ mpfr-3.0.0-b/set_ld.c 2010-10-21 21:18:26.000000000 +0000 -@@ -102,21 +102,25 @@ - { - x /= div13; /* exact */ - shift_exp += 8192; -+ mpfr_div_2si (t, t, 8192, MPFR_RNDZ); - } - if (ABS (x) >= div12) - { - x /= div12; /* exact */ - shift_exp += 4096; -+ mpfr_div_2si (t, t, 4096, MPFR_RNDZ); - } - if (ABS (x) >= div11) - { - x /= div11; /* exact */ - shift_exp += 2048; -+ mpfr_div_2si (t, t, 2048, MPFR_RNDZ); - } - if (ABS (x) >= div10) - { - x /= div10; /* exact */ - shift_exp += 1024; -+ mpfr_div_2si (t, t, 1024, MPFR_RNDZ); - } - /* warning: we may have DBL_MAX=2^1024*(1-2^(-53)) < x < 2^1024, - therefore we have one extra exponent reduction step */ -@@ -124,9 +128,10 @@ - { - x /= div9; /* exact */ - shift_exp += 512; -+ mpfr_div_2si (t, t, 512, MPFR_RNDZ); - } - } /* Check overflow of double */ -- else -+ else /* no overflow on double */ - { - long double div9, div10, div11; - -@@ -149,29 +154,34 @@ - { - x /= div13; /* exact */ - shift_exp -= 8192; -+ mpfr_mul_2si (t, t, 8192, MPFR_RNDZ); - } - if (ABS (x) <= div12) - { - x /= div12; /* exact */ - shift_exp -= 4096; -+ mpfr_mul_2si (t, t, 4096, MPFR_RNDZ); - } - if (ABS (x) <= div11) - { - x /= div11; /* exact */ - shift_exp -= 2048; -+ mpfr_mul_2si (t, t, 2048, MPFR_RNDZ); - } - if (ABS (x) <= div10) - { - x /= div10; /* exact */ - shift_exp -= 1024; -+ mpfr_mul_2si (t, t, 1024, MPFR_RNDZ); - } - if (ABS(x) <= div9) - { - x /= div9; /* exact */ - shift_exp -= 512; -+ mpfr_mul_2si (t, t, 512, MPFR_RNDZ); - } - } -- else -+ else /* no underflow */ - { - inexact = mpfr_set_d (u, (double) x, MPFR_RNDZ); - MPFR_ASSERTD (inexact == 0); -diff -Naurd mpfr-3.0.0-a/tests/tset_ld.c mpfr-3.0.0-b/tests/tset_ld.c ---- mpfr-3.0.0-a/tests/tset_ld.c 2010-06-10 11:00:13.000000000 +0000 -+++ mpfr-3.0.0-b/tests/tset_ld.c 2010-10-21 21:18:26.000000000 +0000 -@@ -147,12 +147,39 @@ - test_fixed_bugs (void) - { - mpfr_t x; -- long double d; -+ long double l, m; - - /* bug found by Steve Kargl (2009-03-14) */ - mpfr_init2 (x, 64); - mpfr_set_ui_2exp (x, 1, -16447, MPFR_RNDN); -- d = mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */ -+ mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */ -+ -+ /* bug reported by Jakub Jelinek (2010-10-17) -+ https://gforge.inria.fr/tracker/?func=detail&aid=11300 */ -+ mpfr_set_prec (x, MPFR_LDBL_MANT_DIG); -+ /* l = 0x1.23456789abcdef0123456789abcdp-914L; */ -+ l = 8.215640181713713164092636634579e-276; -+ mpfr_set_ld (x, l, MPFR_RNDN); -+ m = mpfr_get_ld (x, MPFR_RNDN); -+ if (m != l) -+ { -+ printf ("Error in get_ld o set_ld for l=%Le\n", l); -+ printf ("Got m=%Le instead of l\n", m); -+ exit (1); -+ } -+ -+ /* another similar test which failed with extended double precision and the -+ generic code for mpfr_set_ld */ -+ /* l = 0x1.23456789abcdef0123456789abcdp-968L; */ -+ l = 4.560596445887084662336528403703e-292; -+ mpfr_set_ld (x, l, MPFR_RNDN); -+ m = mpfr_get_ld (x, MPFR_RNDN); -+ if (m != l) -+ { -+ printf ("Error in get_ld o set_ld for l=%Le\n", l); -+ printf ("Got m=%Le instead of l\n", m); -+ exit (1); -+ } - - mpfr_clear (x); - } -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-10-21 20:59:32.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-10-21 21:18:26.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p6"; -+ return "3.0.0-p7"; - } diff --git a/patches/mpfr/3.0.0/180-macros.patch b/patches/mpfr/3.0.0/180-macros.patch deleted file mode 100644 index 58a490f..0000000 --- a/patches/mpfr/3.0.0/180-macros.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES ---- mpfr-3.0.0-a/PATCHES 2010-11-09 15:15:07.000000000 +0000 -+++ mpfr-3.0.0-b/PATCHES 2010-11-09 15:15:07.000000000 +0000 -@@ -0,0 +1 @@ -+macros -diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION ---- mpfr-3.0.0-a/VERSION 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/VERSION 2010-11-09 15:15:07.000000000 +0000 -@@ -1 +1 @@ --3.0.0-p7 -+3.0.0-p8 -diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h ---- mpfr-3.0.0-a/mpfr.h 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/mpfr.h 2010-11-09 15:15:07.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0-p7" -+#define MPFR_VERSION_STRING "3.0.0-p8" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -67,6 +67,16 @@ - # define _MPFR_H_HAVE_INTMAX_T 1 - #endif - -+/* Avoid some problems with macro expansion if the user defines macros -+ with the same name as keywords. By convention, identifiers and macro -+ names starting with mpfr_ are reserved by MPFR. */ -+typedef void mpfr_void; -+typedef int mpfr_int; -+typedef unsigned int mpfr_uint; -+typedef long mpfr_long; -+typedef unsigned long mpfr_ulong; -+typedef size_t mpfr_size_t; -+ - /* Definition of rounding modes (DON'T USE MPFR_RNDNA!). - Warning! Changing the contents of this enum should be seen as an - interface change since the old and the new types are not compatible -@@ -136,7 +146,7 @@ - typedef mp_exp_t mpfr_exp_t; - - /* Definition of the standard exponent limits */ --#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((unsigned long) 1 << 30) - 1)) -+#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((mpfr_ulong) 1 << 30) - 1)) - #define MPFR_EMIN_DEFAULT (-(MPFR_EMAX_DEFAULT)) - - /* Definition of the main structure */ -@@ -725,13 +735,13 @@ - unexpected results with future compilers and aggressive optimisations. - Why not working only with signed types, using INT_MIN and LONG_MIN? */ - #if __GMP_MP_SIZE_T_INT --#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+2)) --#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+1)) --#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+3)) -+#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+2)) -+#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+1)) -+#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+3)) - #else --#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+2)) --#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+1)) --#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+3)) -+#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+2)) -+#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+1)) -+#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+3)) - #endif - - /* Define MPFR_USE_EXTENSION to avoid "gcc -pedantic" warnings. */ -@@ -760,9 +770,9 @@ - #define mpfr_inf_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_INF) - #define mpfr_zero_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_ZERO) - #define mpfr_regular_p(_x) ((_x)->_mpfr_exp > __MPFR_EXP_INF) --#define mpfr_sgn(_x) \ -- ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \ -- (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (void) 0), 0 : \ -+#define mpfr_sgn(_x) \ -+ ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \ -+ (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (mpfr_void) 0), 0 : \ - MPFR_SIGN (_x)) - - /* Prevent them from using as lvalues */ -@@ -805,7 +815,19 @@ - Moreover casts to unsigned long have been added to avoid warnings in - programs that use MPFR and are compiled with -Wconversion; such casts - are OK since if X is a constant expression, then (unsigned long) X is -- also a constant expression, so that the optimizations still work. */ -+ also a constant expression, so that the optimizations still work. The -+ warnings are probably related to the following two bugs: -+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 -+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38470 (possibly a variant) -+ and the casts could be removed once these bugs are fixed. -+ Casts shouldn't be used on the generic calls (to the ..._2exp functions), -+ where implicit conversions are performed. Indeed, having at least one -+ implicit conversion in the macro allows the compiler to emit diagnostics -+ when normally expected, for instance in the following call: -+ mpfr_set_ui (x, "foo", MPFR_RNDN); -+ If this is not possible (for future macros), one of the tricks described -+ on http://groups.google.com/group/comp.std.c/msg/e92abd24bf9eaf7b could -+ be used. */ - #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus) - #if (__GNUC__ >= 2) - #undef mpfr_cmp_ui -@@ -813,45 +835,45 @@ - But warning! mpfr_sgn is specified as a macro in the API, thus the macro - mustn't be used if side effects are possible, like here. */ - #define mpfr_cmp_ui(_f,_u) \ -- (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \ - (mpfr_sgn) (_f) : \ -- mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0)) -+ mpfr_cmp_ui_2exp ((_f), (_u), 0)) - #undef mpfr_cmp_si --#define mpfr_cmp_si(_f,_s) \ -- (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -- mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \ -- mpfr_cmp_si_2exp ((_f), (long) (_s), 0)) -+#define mpfr_cmp_si(_f,_s) \ -+ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \ -+ mpfr_cmp_ui ((_f), (mpfr_ulong) (mpfr_long) (_s)) : \ -+ mpfr_cmp_si_2exp ((_f), (_s), 0)) - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 - #undef mpfr_set_ui - #define mpfr_set_ui(_f,_u,_r) \ -- (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \ -+ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \ - __extension__ ({ \ - mpfr_ptr _p = (_f); \ - _p->_mpfr_sign = 1; \ - _p->_mpfr_exp = __MPFR_EXP_ZERO; \ -- (void) (_r); 0; }) : \ -- mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r))) -+ (mpfr_void) (_r); 0; }) : \ -+ mpfr_set_ui_2exp ((_f), (_u), 0, (_r))) - #endif - #undef mpfr_set_si - #define mpfr_set_si(_f,_s,_r) \ -- (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \ -- mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \ -- mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r))) -+ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \ -+ mpfr_set_ui ((_f), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \ -+ mpfr_set_si_2exp ((_f), (_s), 0, (_r))) - #endif - #endif - - /* Macro version of mpfr_stack interface for fast access */ --#define mpfr_custom_get_size(p) ((size_t) \ -+#define mpfr_custom_get_size(p) ((mpfr_size_t) \ - (((p)+GMP_NUMB_BITS-1)/GMP_NUMB_BITS*sizeof (mp_limb_t))) - #define mpfr_custom_init(m,p) do {} while (0) --#define mpfr_custom_get_significand(x) ((void*)((x)->_mpfr_d)) -+#define mpfr_custom_get_significand(x) ((mpfr_void*)((x)->_mpfr_d)) - #define mpfr_custom_get_exp(x) ((x)->_mpfr_exp) - #define mpfr_custom_move(x,m) do { ((x)->_mpfr_d = (mp_limb_t*)(m)); } while (0) - #define mpfr_custom_init_set(x,k,e,p,m) do { \ - mpfr_ptr _x = (x); \ - mpfr_exp_t _e; \ - mpfr_kind_t _t; \ -- int _s, _k; \ -+ mpfr_int _s, _k; \ - _k = (k); \ - if (_k >= 0) { \ - _t = (mpfr_kind_t) _k; \ -@@ -868,11 +890,13 @@ - _x->_mpfr_exp = _e; \ - _x->_mpfr_d = (mp_limb_t*) (m); \ - } while (0) --#define mpfr_custom_get_kind(x) \ -- ( (x)->_mpfr_exp > __MPFR_EXP_INF ? (int)MPFR_REGULAR_KIND*MPFR_SIGN (x) \ -- : (x)->_mpfr_exp == __MPFR_EXP_INF ? (int)MPFR_INF_KIND*MPFR_SIGN (x) \ -- : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (int)MPFR_NAN_KIND \ -- : (int) MPFR_ZERO_KIND * MPFR_SIGN (x) ) -+#define mpfr_custom_get_kind(x) \ -+ ( (x)->_mpfr_exp > __MPFR_EXP_INF ? \ -+ (mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (x) \ -+ : (x)->_mpfr_exp == __MPFR_EXP_INF ? \ -+ (mpfr_int) MPFR_INF_KIND * MPFR_SIGN (x) \ -+ : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (mpfr_int) MPFR_NAN_KIND \ -+ : (mpfr_int) MPFR_ZERO_KIND * MPFR_SIGN (x) ) - - - #endif /* MPFR_USE_NO_MACRO */ -diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c ---- mpfr-3.0.0-a/version.c 2010-10-21 21:18:26.000000000 +0000 -+++ mpfr-3.0.0-b/version.c 2010-11-09 15:15:07.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0-p7"; -+ return "3.0.0-p8"; - } diff --git a/patches/mpfr/3.0.1/110-asin_exprange.patch b/patches/mpfr/3.0.1/110-asin_exprange.patch deleted file mode 100644 index d79a6f9..0000000 --- a/patches/mpfr/3.0.1/110-asin_exprange.patch +++ /dev/null @@ -1,137 +0,0 @@ -diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES ---- mpfr-3.0.1-a/PATCHES 2011-04-12 10:50:02.000000000 +0000 -+++ mpfr-3.0.1-b/PATCHES 2011-04-12 10:50:02.000000000 +0000 -@@ -0,0 +1 @@ -+asin_exprange -diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION ---- mpfr-3.0.1-a/VERSION 2011-04-04 10:19:18.000000000 +0000 -+++ mpfr-3.0.1-b/VERSION 2011-04-12 10:50:02.000000000 +0000 -@@ -1 +1 @@ --3.0.1 -+3.0.1-p1 -diff -Naurd mpfr-3.0.1-a/asin.c mpfr-3.0.1-b/asin.c ---- mpfr-3.0.1-a/asin.c 2011-04-04 10:19:18.000000000 +0000 -+++ mpfr-3.0.1-b/asin.c 2011-04-12 10:50:02.000000000 +0000 -@@ -63,11 +63,14 @@ - - compared = mpfr_cmp_ui (xp, 1); - -+ MPFR_SAVE_EXPO_MARK (expo); -+ - if (MPFR_UNLIKELY (compared >= 0)) - { - mpfr_clear (xp); - if (compared > 0) /* asin(x) = NaN for |x| > 1 */ - { -+ MPFR_SAVE_EXPO_FREE (expo); - MPFR_SET_NAN (asin); - MPFR_RET_NAN; - } -@@ -80,13 +83,11 @@ - inexact = -mpfr_const_pi (asin, MPFR_INVERT_RND(rnd_mode)); - MPFR_CHANGE_SIGN (asin); - } -- mpfr_div_2ui (asin, asin, 1, rnd_mode); /* May underflow */ -- return inexact; -+ mpfr_div_2ui (asin, asin, 1, rnd_mode); - } - } -- -- MPFR_SAVE_EXPO_MARK (expo); -- -+ else -+ { - /* Compute exponent of 1 - ABS(x) */ - mpfr_ui_sub (xp, 1, xp, MPFR_RNDD); - MPFR_ASSERTD (MPFR_GET_EXP (xp) <= 0); -@@ -115,6 +116,7 @@ - inexact = mpfr_set (asin, xp, rnd_mode); - - mpfr_clear (xp); -+ } - - MPFR_SAVE_EXPO_FREE (expo); - return mpfr_check_range (asin, inexact, rnd_mode); -diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h ---- mpfr-3.0.1-a/mpfr.h 2011-04-04 10:19:18.000000000 +0000 -+++ mpfr-3.0.1-b/mpfr.h 2011-04-12 10:50:02.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.0.1" -+#define MPFR_VERSION_STRING "3.0.1-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.1-a/tests/tasin.c mpfr-3.0.1-b/tests/tasin.c ---- mpfr-3.0.1-a/tests/tasin.c 2011-04-04 10:19:17.000000000 +0000 -+++ mpfr-3.0.1-b/tests/tasin.c 2011-04-12 10:50:02.000000000 +0000 -@@ -219,6 +219,49 @@ - mpfr_clear (y); - } - -+static void -+reduced_expo_range (void) -+{ -+ mpfr_exp_t emin, emax; -+ mpfr_t x, y, ex_y; -+ int inex, ex_inex; -+ unsigned int flags, ex_flags; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ mpfr_inits2 (4, x, y, ex_y, (mpfr_ptr) 0); -+ mpfr_set_str (x, "-0.1e1", 2, MPFR_RNDN); -+ -+ mpfr_set_emin (1); -+ mpfr_set_emax (1); -+ mpfr_clear_flags (); -+ inex = mpfr_asin (y, x, MPFR_RNDA); -+ flags = __gmpfr_flags; -+ mpfr_set_emin (emin); -+ mpfr_set_emax (emax); -+ -+ mpfr_set_str (ex_y, "-0.1101e1", 2, MPFR_RNDN); -+ ex_inex = -1; -+ ex_flags = MPFR_FLAGS_INEXACT; -+ -+ if (SIGN (inex) != ex_inex || flags != ex_flags || -+ ! mpfr_equal_p (y, ex_y)) -+ { -+ printf ("Error in reduced_expo_range\non x = "); -+ mpfr_dump (x); -+ printf ("Expected y = "); -+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN); -+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags); -+ printf ("Got y = "); -+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN); -+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags); -+ exit (1); -+ } -+ -+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0); -+} -+ - int - main (void) - { -@@ -226,6 +269,7 @@ - - special (); - special_overflow (); -+ reduced_expo_range (); - - test_generic (2, 100, 15); - -diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c ---- mpfr-3.0.1-a/version.c 2011-04-04 10:19:18.000000000 +0000 -+++ mpfr-3.0.1-b/version.c 2011-04-12 10:50:02.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.1"; -+ return "3.0.1-p1"; - } diff --git a/patches/mpfr/3.0.1/120-rec_sqrt-carry.patch b/patches/mpfr/3.0.1/120-rec_sqrt-carry.patch deleted file mode 100644 index 0367d84..0000000 --- a/patches/mpfr/3.0.1/120-rec_sqrt-carry.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES ---- mpfr-3.0.1-a/PATCHES 2011-05-04 11:18:33.000000000 +0000 -+++ mpfr-3.0.1-b/PATCHES 2011-05-04 11:18:33.000000000 +0000 -@@ -0,0 +1 @@ -+rec_sqrt-carry -diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION ---- mpfr-3.0.1-a/VERSION 2011-04-12 10:50:02.000000000 +0000 -+++ mpfr-3.0.1-b/VERSION 2011-05-04 11:18:33.000000000 +0000 -@@ -1 +1 @@ --3.0.1-p1 -+3.0.1-p2 -diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h ---- mpfr-3.0.1-a/mpfr.h 2011-04-12 10:50:02.000000000 +0000 -+++ mpfr-3.0.1-b/mpfr.h 2011-05-04 11:18:33.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.0.1-p1" -+#define MPFR_VERSION_STRING "3.0.1-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.1-a/rec_sqrt.c mpfr-3.0.1-b/rec_sqrt.c ---- mpfr-3.0.1-a/rec_sqrt.c 2011-04-04 10:19:18.000000000 +0000 -+++ mpfr-3.0.1-b/rec_sqrt.c 2011-05-04 11:18:33.000000000 +0000 -@@ -375,20 +375,37 @@ - MPFR_ASSERTD(un == ln + 1 || un == ln + 2); - /* the high un-ln limbs of u will overlap the low part of {x+ln,xn}, - we need to add or subtract the overlapping part {u + ln, un - ln} */ -+ /* Warning! th may be 0, in which case the mpn_add_1 and mpn_sub_1 -+ below (with size = th) mustn't be used. In such a case, the limb -+ (carry) will be 0, so that this is semantically a no-op, but if -+ mpn_add_1 and mpn_sub_1 are used, GMP (currently) still does a -+ non-atomic read/write in a place that is not always allocated, -+ with the possible consequences: a crash if the corresponding -+ address is not mapped, or (rather unlikely) memory corruption -+ if another process/thread writes at the same place; things may -+ be worse with future GMP versions. Hence the tests carry != 0. */ - if (neg == 0) - { - if (ln > 0) - MPN_COPY (x, u, ln); - cy = mpn_add (x + ln, x + ln, xn, u + ln, un - ln); - /* add cu at x+un */ -- cy += mpn_add_1 (x + un, x + un, th, cu); -+ if (cu != 0) -+ { -+ MPFR_ASSERTD (th != 0); -+ cy += mpn_add_1 (x + un, x + un, th, cu); -+ } - } - else /* negative case */ - { - /* subtract {u+ln, un-ln} from {x+ln,un} */ - cy = mpn_sub (x + ln, x + ln, xn, u + ln, un - ln); - /* carry cy is at x+un, like cu */ -- cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */ -+ if (cy + cu != 0) -+ { -+ MPFR_ASSERTD (th != 0); -+ cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */ -+ } - /* cy cannot be zero, since the most significant bit of Xh is 1, - and the correction is bounded by 2^{-h+3} */ - MPFR_ASSERTD(cy == 0); -diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c ---- mpfr-3.0.1-a/version.c 2011-04-12 10:50:02.000000000 +0000 -+++ mpfr-3.0.1-b/version.c 2011-05-04 11:18:33.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.1-p1"; -+ return "3.0.1-p2"; - } diff --git a/patches/mpfr/3.0.1/130-atan-expo-range.patch b/patches/mpfr/3.0.1/130-atan-expo-range.patch deleted file mode 100644 index 251b837..0000000 --- a/patches/mpfr/3.0.1/130-atan-expo-range.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES ---- mpfr-3.0.1-a/PATCHES 2011-05-05 00:00:35.000000000 +0000 -+++ mpfr-3.0.1-b/PATCHES 2011-05-05 00:00:35.000000000 +0000 -@@ -0,0 +1 @@ -+atan-expo-range -diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION ---- mpfr-3.0.1-a/VERSION 2011-05-04 11:18:33.000000000 +0000 -+++ mpfr-3.0.1-b/VERSION 2011-05-05 00:00:35.000000000 +0000 -@@ -1 +1 @@ --3.0.1-p2 -+3.0.1-p3 -diff -Naurd mpfr-3.0.1-a/atan.c mpfr-3.0.1-b/atan.c ---- mpfr-3.0.1-a/atan.c 2011-04-04 10:19:18.000000000 +0000 -+++ mpfr-3.0.1-b/atan.c 2011-05-05 00:00:35.000000000 +0000 -@@ -431,5 +431,5 @@ - MPFR_GROUP_CLEAR (group); - - MPFR_SAVE_EXPO_FREE (expo); -- return mpfr_check_range (arctgt, inexact, rnd_mode); -+ return mpfr_check_range (atan, inexact, rnd_mode); - } -diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h ---- mpfr-3.0.1-a/mpfr.h 2011-05-04 11:18:33.000000000 +0000 -+++ mpfr-3.0.1-b/mpfr.h 2011-05-05 00:00:35.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.0.1-p2" -+#define MPFR_VERSION_STRING "3.0.1-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.1-a/tests/tatan.c mpfr-3.0.1-b/tests/tatan.c ---- mpfr-3.0.1-a/tests/tatan.c 2011-04-04 10:19:17.000000000 +0000 -+++ mpfr-3.0.1-b/tests/tatan.c 2011-05-05 00:00:35.000000000 +0000 -@@ -535,6 +535,52 @@ - mpfr_clears (a, x, y, (mpfr_ptr) 0); - } - -+/* http://websympa.loria.fr/wwsympa/arc/mpfr/2011-05/msg00008.html -+ * Incorrect flags (in debug mode on a 32-bit machine, assertion failure). -+ */ -+static void -+reduced_expo_range (void) -+{ -+ mpfr_exp_t emin, emax; -+ mpfr_t x, y, ex_y; -+ int inex, ex_inex; -+ unsigned int flags, ex_flags; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ mpfr_inits2 (12, x, y, ex_y, (mpfr_ptr) 0); -+ mpfr_set_str (x, "0.1e-5", 2, MPFR_RNDN); -+ -+ mpfr_set_emin (-5); -+ mpfr_set_emax (-5); -+ mpfr_clear_flags (); -+ inex = mpfr_atan (y, x, MPFR_RNDN); -+ flags = __gmpfr_flags; -+ mpfr_set_emin (emin); -+ mpfr_set_emax (emax); -+ -+ mpfr_set_str (ex_y, "0.1e-5", 2, MPFR_RNDN); -+ ex_inex = 1; -+ ex_flags = MPFR_FLAGS_INEXACT; -+ -+ if (SIGN (inex) != ex_inex || flags != ex_flags || -+ ! mpfr_equal_p (y, ex_y)) -+ { -+ printf ("Error in reduced_expo_range\non x = "); -+ mpfr_dump (x); -+ printf ("Expected y = "); -+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN); -+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags); -+ printf ("Got y = "); -+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN); -+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags); -+ exit (1); -+ } -+ -+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -546,6 +592,7 @@ - smallvals_atan2 (); - atan2_bug_20071003 (); - atan2_different_prec (); -+ reduced_expo_range (); - - test_generic_atan (2, 200, 17); - test_generic_atan2 (2, 200, 17); -diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c ---- mpfr-3.0.1-a/version.c 2011-05-04 11:18:33.000000000 +0000 -+++ mpfr-3.0.1-b/version.c 2011-05-05 00:00:35.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.1-p2"; -+ return "3.0.1-p3"; - } diff --git a/patches/mpfr/3.0.1/140-texp-zero.patch b/patches/mpfr/3.0.1/140-texp-zero.patch deleted file mode 100644 index fd74087..0000000 --- a/patches/mpfr/3.0.1/140-texp-zero.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES ---- mpfr-3.0.1-a/PATCHES 2011-05-09 14:48:24.000000000 +0000 -+++ mpfr-3.0.1-b/PATCHES 2011-05-09 14:48:24.000000000 +0000 -@@ -0,0 +1 @@ -+texp-zero -diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION ---- mpfr-3.0.1-a/VERSION 2011-05-05 00:00:35.000000000 +0000 -+++ mpfr-3.0.1-b/VERSION 2011-05-09 14:48:24.000000000 +0000 -@@ -1 +1 @@ --3.0.1-p3 -+3.0.1-p4 -diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h ---- mpfr-3.0.1-a/mpfr.h 2011-05-05 00:00:35.000000000 +0000 -+++ mpfr-3.0.1-b/mpfr.h 2011-05-09 14:48:24.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.0.1-p3" -+#define MPFR_VERSION_STRING "3.0.1-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.0.1-a/tests/texp.c mpfr-3.0.1-b/tests/texp.c ---- mpfr-3.0.1-a/tests/texp.c 2011-04-04 10:19:17.000000000 +0000 -+++ mpfr-3.0.1-b/tests/texp.c 2011-05-09 14:48:24.000000000 +0000 -@@ -170,7 +170,9 @@ - mpfr_set_prec (x, prec); - mpfr_set_prec (y, prec); - mpfr_set_prec (z, prec); -- mpfr_urandomb (x, RANDS); -+ do -+ mpfr_urandomb (x, RANDS); -+ while (MPFR_IS_ZERO (x)); /* 0 is handled by mpfr_exp only */ - rnd = RND_RAND (); - mpfr_exp_2 (y, x, rnd); - mpfr_exp_3 (z, x, rnd); -diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c ---- mpfr-3.0.1-a/version.c 2011-05-05 00:00:35.000000000 +0000 -+++ mpfr-3.0.1-b/version.c 2011-05-09 14:48:24.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.1-p3"; -+ return "3.0.1-p4"; - } diff --git a/patches/mpfr/3.1.0/110-mpfr_unlikely.patch b/patches/mpfr/3.1.0/110-mpfr_unlikely.patch deleted file mode 100644 index 437b1a2..0000000 --- a/patches/mpfr/3.1.0/110-mpfr_unlikely.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2011-10-05 21:39:57.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2011-10-05 21:39:57.000000000 +0000 -@@ -0,0 +1 @@ -+mpfr_unlikely -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2011-10-03 08:17:15.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2011-10-05 21:39:57.000000000 +0000 -@@ -1 +1 @@ --3.1.0 -+3.1.0-p1 -diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h ---- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000 -@@ -988,10 +988,11 @@ - ******************************************************/ - - /* Theses macros help the compiler to determine if a test is -- * likely or unlikely. */ -+ likely or unlikely. The !! is necessary in case x is larger -+ than a long. */ - #if __MPFR_GNUC(3,0) || __MPFR_ICC(8,1,0) - # define MPFR_LIKELY(x) (__builtin_expect(!!(x),1)) --# define MPFR_UNLIKELY(x) (__builtin_expect((x),0)) -+# define MPFR_UNLIKELY(x) (__builtin_expect(!!(x),0)) - #else - # define MPFR_LIKELY(x) (x) - # define MPFR_UNLIKELY(x) (x) -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0" -+#define MPFR_VERSION_STRING "3.1.0-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2011-10-05 21:39:57.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0"; -+ return "3.1.0-p1"; - } diff --git a/patches/mpfr/3.1.0/120-lib-search-path.patch b/patches/mpfr/3.1.0/120-lib-search-path.patch deleted file mode 100644 index 4714ac9..0000000 --- a/patches/mpfr/3.1.0/120-lib-search-path.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2011-10-14 10:43:32.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2011-10-14 10:43:32.000000000 +0000 -@@ -0,0 +1 @@ -+lib-search-path -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2011-10-05 21:39:57.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2011-10-14 10:43:32.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p1 -+3.1.0-p2 -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p1" -+#define MPFR_VERSION_STRING "3.1.0-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2011-10-05 21:39:57.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2011-10-14 10:43:32.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p1"; -+ return "3.1.0-p2"; - } -diff -Naurd mpfr-3.1.0-a/tests/Makefile.am mpfr-3.1.0-b/tests/Makefile.am ---- mpfr-3.1.0-a/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000 -@@ -65,8 +65,24 @@ - TESTS = $(check_PROGRAMS) - TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND) - --# Option to prevent libtool from generating wrapper scripts for the tests. -+# The -no-install option prevents libtool from generating wrapper scripts -+# for the tests. - # This is useful to easily run the test scripts under valgrind or gdb. - # See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033 - # http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular. --AM_LDFLAGS = -no-install -+# -+# The -L$(top_builddir)/src/.libs option is necessary for some platforms, -+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR -+# library is already installed in the corresponding lib directory: its -+# purpose is to make sure that the local .libs comes first in the library -+# search path (otherwise the tests are linked against the old MPFR library -+# by the LINK command -- see the generated Makefile). See: -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html -+# and -+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728 -+# -+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs -diff -Naurd mpfr-3.1.0-a/tests/Makefile.in mpfr-3.1.0-b/tests/Makefile.in ---- mpfr-3.1.0-a/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000 -+++ mpfr-3.1.0-b/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000 -@@ -1124,11 +1124,27 @@ - TESTS = $(check_PROGRAMS) - TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND) - --# Option to prevent libtool from generating wrapper scripts for the tests. -+# The -no-install option prevents libtool from generating wrapper scripts -+# for the tests. - # This is useful to easily run the test scripts under valgrind or gdb. - # See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033 - # http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular. --AM_LDFLAGS = -no-install -+# -+# The -L$(top_builddir)/src/.libs option is necessary for some platforms, -+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR -+# library is already installed in the corresponding lib directory: its -+# purpose is to make sure that the local .libs comes first in the library -+# search path (otherwise the tests are linked against the old MPFR library -+# by the LINK command -- see the generated Makefile). See: -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html -+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html -+# and -+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728 -+# -+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs - all: all-am - - .SUFFIXES: diff --git a/patches/mpfr/3.1.0/130-vasprintf.patch b/patches/mpfr/3.1.0/130-vasprintf.patch deleted file mode 100644 index aa1cfbc..0000000 --- a/patches/mpfr/3.1.0/130-vasprintf.patch +++ /dev/null @@ -1,247 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2011-11-03 15:15:11.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2011-11-03 15:15:11.000000000 +0000 -@@ -0,0 +1 @@ -+vasprintf -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2011-10-14 10:43:32.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2011-11-03 15:15:11.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p2 -+3.1.0-p3 -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p2" -+#define MPFR_VERSION_STRING "3.1.0-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/vasprintf.c mpfr-3.1.0-b/src/vasprintf.c ---- mpfr-3.1.0-a/src/vasprintf.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/vasprintf.c 2011-11-03 15:15:11.000000000 +0000 -@@ -1178,7 +1178,7 @@ - mpfr_exp_t exp; - char * str; - const int spec_g = (spec.spec == 'g' || spec.spec == 'G'); -- const int keep_trailing_zeros = spec_g && spec.alt; -+ const int keep_trailing_zeros = !spec_g || spec.alt; - - /* WARNING: an empty precision field is forbidden (it means precision = 6 - and it should have been changed to 6 before the function call) */ -@@ -1356,7 +1356,7 @@ - else - /* 1 <= |p| */ - { -- size_t nsd; /* Number of significant digits */ -+ size_t str_len; - - /* Determine the position of the most significant decimal digit. */ - exp = floor_log10 (p); -@@ -1365,12 +1365,10 @@ - /* P is too large to print all its integral part digits */ - return -1; - -- np->ip_size = exp + 1; -- -- nsd = spec.prec + np->ip_size; - if (dec_info == NULL) -- { -- str = mpfr_get_str (NULL, &exp, 10, nsd, p, spec.rnd_mode); -+ { /* this case occurs with mpfr_printf ("%.0RUf", x) with x=9.5 */ -+ str = -+ mpfr_get_str (NULL, &exp, 10, spec.prec+exp+1, p, spec.rnd_mode); - register_string (np->sl, str); - } - else -@@ -1379,81 +1377,60 @@ - str = dec_info->str; - } - np->ip_ptr = MPFR_IS_NEG (p) ? ++str : str; /* skip sign */ -+ str_len = strlen (str); -+ -+ /* integral part */ -+ if (exp > str_len) -+ /* mpfr_get_str gives no trailing zero when p is rounded up to the next -+ power of 10 (p integer, so no fractional part) */ -+ { -+ np->ip_trailing_zeros = exp - str_len; -+ np->ip_size = str_len; -+ } -+ else -+ np->ip_size = exp; - - if (spec.group) - /* thousands separator in integral part */ - np->thousands_sep = MPFR_THOUSANDS_SEPARATOR; - -- if (nsd == 0 || (spec_g && !spec.alt)) -- /* compute how much non-zero digits in integral and fractional -- parts */ -+ /* fractional part */ -+ str += np->ip_size; -+ str_len -= np->ip_size; -+ if (!keep_trailing_zeros) -+ /* remove trailing zeros, if any */ - { -- size_t str_len; -- str_len = strlen (str); /* note: the sign has been skipped */ -- -- if (exp > str_len) -- /* mpfr_get_str doesn't give the trailing zeros when p is a -- multiple of 10 (p integer, so no fractional part) */ -- { -- np->ip_trailing_zeros = exp - str_len; -- np->ip_size = str_len; -- if (spec.alt) -- np->point = MPFR_DECIMAL_POINT; -- } -- else -- /* str may contain some digits which are in fractional part */ -+ char *ptr = str + str_len - 1; /* pointer to the last digit of -+ str */ -+ while ((*ptr == '0') && (str_len != 0)) - { -- char *ptr; -- -- ptr = str + str_len - 1; /* points to the end of str */ -- str_len -= np->ip_size; /* number of digits in fractional -- part */ -- -- if (!keep_trailing_zeros) -- /* remove trailing zeros, if any */ -- { -- while ((*ptr == '0') && (str_len != 0)) -- { -- --ptr; -- --str_len; -- } -- } -- -- if (str_len > INT_MAX) -- /* too many digits in fractional part */ -- return -1; -- -- if (str_len != 0) -- /* some digits in fractional part */ -- { -- np->point = MPFR_DECIMAL_POINT; -- np->fp_ptr = str + np->ip_size; -- np->fp_size = str_len; -- } -+ --ptr; -+ --str_len; - } - } -- else -- /* spec.prec digits in fractional part */ -+ -+ if (str_len > 0) -+ /* some nonzero digits in fractional part */ - { -- if (np->ip_size == exp - 1) -- /* the absolute value of the number has been rounded up to a power -- of ten. -- Insert an additional zero in integral part and put the rest of -- them in fractional part. */ -- np->ip_trailing_zeros = 1; -+ if (str_len > INT_MAX) -+ /* too many digits in fractional part */ -+ return -1; - -- if (spec.prec != 0) -- { -- MPFR_ASSERTD (np->ip_size + np->ip_trailing_zeros == exp); -- MPFR_ASSERTD (np->ip_size + spec.prec == nsd); -+ np->point = MPFR_DECIMAL_POINT; -+ np->fp_ptr = str; -+ np->fp_size = str_len; -+ } - -- np->point = MPFR_DECIMAL_POINT; -- np->fp_ptr = str + np->ip_size; -- np->fp_size = spec.prec; -- } -- else if (spec.alt) -- np->point = MPFR_DECIMAL_POINT; -+ if (keep_trailing_zeros && str_len < spec.prec) -+ /* add missing trailing zeros */ -+ { -+ np->point = MPFR_DECIMAL_POINT; -+ np->fp_trailing_zeros = spec.prec - np->fp_size; - } -+ -+ if (spec.alt) -+ /* add decimal point even if no digits follow it */ -+ np->point = MPFR_DECIMAL_POINT; - } - - return 0; -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2011-10-14 10:43:32.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2011-11-03 15:15:11.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p2"; -+ return "3.1.0-p3"; - } -diff -Naurd mpfr-3.1.0-a/tests/tsprintf.c mpfr-3.1.0-b/tests/tsprintf.c ---- mpfr-3.1.0-a/tests/tsprintf.c 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/tests/tsprintf.c 2011-11-03 15:15:11.000000000 +0000 -@@ -475,6 +475,18 @@ - check_sprintf ("-1.", "%- #0.1RG", x); - - /* precision zero */ -+ mpfr_set_d (x, 9.5, MPFR_RNDN); -+ check_sprintf ("9", "%.0RDf", x); -+ check_sprintf ("10", "%.0RUf", x); -+ -+ mpfr_set_d (x, 19.5, MPFR_RNDN); -+ check_sprintf ("19", "%.0RDf", x); -+ check_sprintf ("20", "%.0RUf", x); -+ -+ mpfr_set_d (x, 99.5, MPFR_RNDN); -+ check_sprintf ("99", "%.0RDf", x); -+ check_sprintf ("100", "%.0RUf", x); -+ - mpfr_set_d (x, -9.5, MPFR_RNDN); - check_sprintf ("-10", "%.0RDf", x); - check_sprintf ("-10", "%.0RYf", x); -@@ -1078,6 +1090,23 @@ - mpfr_clear (x); - } - -+static void -+bug20111102 (void) -+{ -+ mpfr_t t; -+ char s[100]; -+ -+ mpfr_init2 (t, 84); -+ mpfr_set_str (t, "999.99999999999999999999", 10, MPFR_RNDN); -+ mpfr_sprintf (s, "%.20RNg", t); -+ if (strcmp (s, "1000") != 0) -+ { -+ printf ("Error in bug20111102, expected 1000, got %s\n", s); -+ exit (1); -+ } -+ mpfr_clear (t); -+} -+ - /* In particular, the following test makes sure that the rounding - * for %Ra and %Rb is not done on the MPFR number itself (as it - * would overflow). Note: it has been reported on comp.std.c that -@@ -1161,6 +1190,7 @@ - locale = setlocale (LC_ALL, "C"); - #endif - -+ bug20111102 (); - native_types (); - hexadecimal (); - binary (); diff --git a/patches/mpfr/3.1.0/140-gmp41compat.patch b/patches/mpfr/3.1.0/140-gmp41compat.patch deleted file mode 100644 index 4b1ba08..0000000 --- a/patches/mpfr/3.1.0/140-gmp41compat.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2011-11-28 12:22:52.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2011-11-28 12:22:52.000000000 +0000 -@@ -0,0 +1 @@ -+gmp41compat -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2011-11-03 15:15:11.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2011-11-28 12:22:52.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p3 -+3.1.0-p4 -diff -Naurd mpfr-3.1.0-a/doc/mpfr.info mpfr-3.1.0-b/doc/mpfr.info ---- mpfr-3.1.0-a/doc/mpfr.info 2011-10-03 09:43:04.000000000 +0000 -+++ mpfr-3.1.0-b/doc/mpfr.info 2011-11-28 12:22:52.000000000 +0000 -@@ -2994,11 +2994,12 @@ - - * `mpfr_urandom' and `mpfr_urandomb' changed in MPFR 3.1. Their - behavior no longer depends on the platform (assuming this is also -- true for GMP's random generator). As a consequence, the returned -- values can be different between MPFR 3.1 and previous MPFR -- versions. Note: as the reproducibility of these functions was not -- specified before MPFR 3.1, the MPFR 3.1 behavior is _not_ regarded -- as backward incompatible with previous versions. -+ true for GMP's random generator, which is not the case between GMP -+ 4.1 and 4.2 if `gmp_randinit_default' is used). As a consequence, -+ the returned values can be different between MPFR 3.1 and previous -+ MPFR versions. Note: as the reproducibility of these functions -+ was not specified before MPFR 3.1, the MPFR 3.1 behavior is _not_ -+ regarded as backward incompatible with previous versions. - - - -@@ -4239,13 +4240,13 @@ - Node: Type and Macro Changes129308 - Node: Added Functions132029 - Node: Changed Functions134972 --Node: Removed Functions139167 --Node: Other Changes139579 --Node: Contributors141108 --Node: References143574 --Node: GNU Free Documentation License145315 --Node: Concept Index167758 --Node: Function and Type Index173677 -+Node: Removed Functions139253 -+Node: Other Changes139665 -+Node: Contributors141194 -+Node: References143660 -+Node: GNU Free Documentation License145401 -+Node: Concept Index167844 -+Node: Function and Type Index173763 - - End Tag Table - -diff -Naurd mpfr-3.1.0-a/doc/mpfr.texi mpfr-3.1.0-b/doc/mpfr.texi ---- mpfr-3.1.0-a/doc/mpfr.texi 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/doc/mpfr.texi 2011-11-28 12:22:52.000000000 +0000 -@@ -3466,8 +3466,9 @@ - a lack of specification. - - @item @code{mpfr_urandom} and @code{mpfr_urandomb} changed in MPFR 3.1. --Their behavior no longer depends on the platform (assuming this is also --true for GMP's random generator). As a consequence, the returned values -+Their behavior no longer depends on the platform (assuming this is also true -+for GMP's random generator, which is not the case between GMP 4.1 and 4.2 if -+@code{gmp_randinit_default} is used). As a consequence, the returned values - can be different between MPFR 3.1 and previous MPFR versions. - Note: as the reproducibility of these functions was not specified - before MPFR 3.1, the MPFR 3.1 behavior is @emph{not} regarded as -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p3" -+#define MPFR_VERSION_STRING "3.1.0-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2011-11-03 15:15:11.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2011-11-28 12:22:52.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p3"; -+ return "3.1.0-p4"; - } -diff -Naurd mpfr-3.1.0-a/tests/trandom.c mpfr-3.1.0-b/tests/trandom.c ---- mpfr-3.1.0-a/tests/trandom.c 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/tests/trandom.c 2011-11-28 12:22:52.000000000 +0000 -@@ -114,21 +114,29 @@ - mpfr_t x; - gmp_randstate_t s; - -+#if __MPFR_GMP(4,2,0) -+# define C1 "0.895943" -+# define C2 "0.848824" -+#else -+# define C1 "0.479652" -+# define C2 "0.648529" -+#endif -+ - gmp_randinit_default (s); - gmp_randseed_ui (s, 42); - mpfr_init2 (x, 17); - mpfr_urandomb (x, s); -- if (mpfr_cmp_str1 (x, "0.895943") != 0) -+ if (mpfr_cmp_str1 (x, C1) != 0) - { -- printf ("Error in bug20100914, expected 0.895943, got "); -+ printf ("Error in bug20100914, expected " C1 ", got "); - mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); - printf ("\n"); - exit (1); - } - mpfr_urandomb (x, s); -- if (mpfr_cmp_str1 (x, "0.848824") != 0) -+ if (mpfr_cmp_str1 (x, C2) != 0) - { -- printf ("Error in bug20100914, expected 0.848824, got "); -+ printf ("Error in bug20100914, expected " C2 ", got "); - mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); - printf ("\n"); - exit (1); -diff -Naurd mpfr-3.1.0-a/tests/turandom.c mpfr-3.1.0-b/tests/turandom.c ---- mpfr-3.1.0-a/tests/turandom.c 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/tests/turandom.c 2011-11-28 12:22:52.000000000 +0000 -@@ -160,23 +160,29 @@ - mpfr_t x; - gmp_randstate_t s; - -+#if __MPFR_GMP(4,2,0) -+# define C1 "0.8488312" -+# define C2 "0.8156509" -+#else -+# define C1 "0.6485367" -+# define C2 "0.9362717" -+#endif -+ - gmp_randinit_default (s); - gmp_randseed_ui (s, 42); - mpfr_init2 (x, 17); - mpfr_urandom (x, s, MPFR_RNDN); -- /* the following values are obtained on a 32-bit computer, we should get -- the same values on a 64-bit computer */ -- if (mpfr_cmp_str1 (x, "0.8488312") != 0) -+ if (mpfr_cmp_str1 (x, C1) != 0) - { -- printf ("Error in bug20100914, expected 0.8488312, got "); -+ printf ("Error in bug20100914, expected " C1 ", got "); - mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); - printf ("\n"); - exit (1); - } - mpfr_urandom (x, s, MPFR_RNDN); -- if (mpfr_cmp_str1 (x, "0.8156509") != 0) -+ if (mpfr_cmp_str1 (x, C2) != 0) - { -- printf ("Error in bug20100914, expected 0.8156509, got "); -+ printf ("Error in bug20100914, expected " C2 ", got "); - mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); - printf ("\n"); - exit (1); diff --git a/patches/mpfr/3.1.0/150-logging-freeze.patch b/patches/mpfr/3.1.0/150-logging-freeze.patch deleted file mode 100644 index c664cee..0000000 --- a/patches/mpfr/3.1.0/150-logging-freeze.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2012-02-24 12:44:49.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2012-02-24 12:44:49.000000000 +0000 -@@ -0,0 +1 @@ -+logging-freeze -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2011-11-28 12:22:52.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2012-02-24 12:44:49.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p4 -+3.1.0-p5 -diff -Naurd mpfr-3.1.0-a/src/add_d.c mpfr-3.1.0-b/src/add_d.c ---- mpfr-3.1.0-a/src/add_d.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/add_d.c 2012-02-24 12:44:49.000000000 +0000 -@@ -34,7 +34,7 @@ - (("b[%Pu]=%.*Rg c=%.20g rnd=%d", - mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode), - ("a[%Pu]=%.*Rg inexact=%d", -- mpfr_get_prec (a), mpfr_get_prec, a, inexact)); -+ mpfr_get_prec (a), mpfr_log_prec, a, inexact)); - - MPFR_SAVE_EXPO_MARK (expo); - -diff -Naurd mpfr-3.1.0-a/src/add_ui.c mpfr-3.1.0-b/src/add_ui.c ---- mpfr-3.1.0-a/src/add_ui.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/add_ui.c 2012-02-24 12:44:49.000000000 +0000 -@@ -29,7 +29,7 @@ - MPFR_LOG_FUNC - (("x[%Pu]=%.*Rg u=%d rnd=%d", - mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode), -- ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_get_prec, y)); -+ ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_log_prec, y)); - - if (MPFR_LIKELY(u != 0) ) /* if u=0, do nothing */ - { -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p4" -+#define MPFR_VERSION_STRING "3.1.0-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/mul_d.c mpfr-3.1.0-b/src/mul_d.c ---- mpfr-3.1.0-a/src/mul_d.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/mul_d.c 2012-02-24 12:44:49.000000000 +0000 -@@ -34,7 +34,7 @@ - (("b[%Pu]=%.*Rg c=%.20g rnd=%d", - mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode), - ("a[%Pu]=%.*Rg inexact=%d", -- mpfr_get_prec (a), mpfr_get_prec, a, inexact)); -+ mpfr_get_prec (a), mpfr_log_prec, a, inexact)); - - MPFR_SAVE_EXPO_MARK (expo); - -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2011-11-28 12:22:52.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2012-02-24 12:44:49.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p4"; -+ return "3.1.0-p5"; - } diff --git a/patches/mpfr/3.1.0/160-logging-varfmt.patch b/patches/mpfr/3.1.0/160-logging-varfmt.patch deleted file mode 100644 index 0f4bfad..0000000 --- a/patches/mpfr/3.1.0/160-logging-varfmt.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2012-02-24 13:50:05.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2012-02-24 13:50:05.000000000 +0000 -@@ -0,0 +1 @@ -+logging-varfmt -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2012-02-24 12:44:49.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2012-02-24 13:50:05.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p5 -+3.1.0-p6 -diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h ---- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000 -@@ -1592,7 +1592,7 @@ - do \ - if ((MPFR_LOG_INTERNAL_F & mpfr_log_type) && \ - (mpfr_log_current <= mpfr_log_level)) \ -- LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rf\n", __func__, __LINE__, \ -+ LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rg\n", __func__, __LINE__, \ - #x, mpfr_get_prec (x), mpfr_log_prec, x); \ - while (0) - -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p5" -+#define MPFR_VERSION_STRING "3.1.0-p6" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2012-02-24 12:44:49.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2012-02-24 13:50:05.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p5"; -+ return "3.1.0-p6"; - } diff --git a/patches/mpfr/3.1.0/170-large-prec.patch b/patches/mpfr/3.1.0/170-large-prec.patch deleted file mode 100644 index 08e7b57..0000000 --- a/patches/mpfr/3.1.0/170-large-prec.patch +++ /dev/null @@ -1,591 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2012-03-08 15:17:03.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2012-03-08 15:17:03.000000000 +0000 -@@ -0,0 +1 @@ -+large-prec -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2012-02-24 13:50:05.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2012-03-08 15:17:03.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p6 -+3.1.0-p7 -diff -Naurd mpfr-3.1.0-a/src/add1.c mpfr-3.1.0-b/src/add1.c ---- mpfr-3.1.0-a/src/add1.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/add1.c 2012-03-08 15:17:03.000000000 +0000 -@@ -44,12 +44,12 @@ - bq = MPFR_PREC(b); - cq = MPFR_PREC(c); - -- an = (aq-1)/GMP_NUMB_BITS+1; /* number of limbs of a */ -+ an = MPFR_PREC2LIMBS (aq); /* number of limbs of a */ - aq2 = (mpfr_prec_t) an * GMP_NUMB_BITS; - sh = aq2 - aq; /* non-significant bits in low limb */ - -- bn = (bq-1)/GMP_NUMB_BITS+1; /* number of limbs of b */ -- cn = (cq-1)/GMP_NUMB_BITS+1; /* number of limbs of c */ -+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */ -+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */ - - ap = MPFR_MANT(a); - bp = MPFR_MANT(b); -@@ -124,7 +124,7 @@ - dif = aq2 - diff_exp; - /* dif is the number of bits of c which overlap with a' */ - -- difn = (dif-1)/GMP_NUMB_BITS + 1; -+ difn = MPFR_PREC2LIMBS (dif); - /* only the highest difn limbs from c have to be considered */ - if (MPFR_UNLIKELY(difn > cn)) - { -diff -Naurd mpfr-3.1.0-a/src/add1sp.c mpfr-3.1.0-b/src/add1sp.c ---- mpfr-3.1.0-a/src/add1sp.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/add1sp.c 2012-03-08 15:17:03.000000000 +0000 -@@ -107,7 +107,7 @@ - - /* Read prec and num of limbs */ - p = MPFR_PREC(b); -- n = (p+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; -+ n = MPFR_PREC2LIMBS (p); - MPFR_UNSIGNED_MINUS_MODULO(sh, p); - bx = MPFR_GET_EXP(b); - d = (mpfr_uexp_t) (bx - MPFR_GET_EXP(c)); -diff -Naurd mpfr-3.1.0-a/src/agm.c mpfr-3.1.0-b/src/agm.c ---- mpfr-3.1.0-a/src/agm.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/agm.c 2012-03-08 15:17:03.000000000 +0000 -@@ -91,7 +91,7 @@ - q = MPFR_PREC(r); - p = q + MPFR_INT_CEIL_LOG2(q) + 15; - MPFR_ASSERTD (p >= 7); /* see algorithms.tex */ -- s = (p - 1) / GMP_NUMB_BITS + 1; -+ s = MPFR_PREC2LIMBS (p); - - /* b (op2) and a (op1) are the 2 operands but we want b >= a */ - compare = mpfr_cmp (op1, op2); -@@ -285,7 +285,7 @@ - - /* Next iteration */ - MPFR_ZIV_NEXT (loop, p); -- s = (p - 1) / GMP_NUMB_BITS + 1; -+ s = MPFR_PREC2LIMBS (p); - } - MPFR_ZIV_FREE (loop); - -diff -Naurd mpfr-3.1.0-a/src/eq.c mpfr-3.1.0-b/src/eq.c ---- mpfr-3.1.0-a/src/eq.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/eq.c 2012-03-08 15:17:03.000000000 +0000 -@@ -56,8 +56,8 @@ - if (uexp != vexp) - return 0; /* no bit agree */ - -- usize = (MPFR_PREC(u) - 1) / GMP_NUMB_BITS + 1; -- vsize = (MPFR_PREC(v) - 1) / GMP_NUMB_BITS + 1; -+ usize = MPFR_LIMB_SIZE (u); -+ vsize = MPFR_LIMB_SIZE (v); - - if (vsize > usize) /* exchange u and v */ - { -diff -Naurd mpfr-3.1.0-a/src/exp.c mpfr-3.1.0-b/src/exp.c ---- mpfr-3.1.0-a/src/exp.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/exp.c 2012-03-08 15:17:03.000000000 +0000 -@@ -133,7 +133,7 @@ - mp_size_t yn; - int sh; - -- yn = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS; -+ yn = MPFR_LIMB_SIZE (y); - sh = (mpfr_prec_t) yn * GMP_NUMB_BITS - MPFR_PREC(y); - MPFR_MANT(y)[0] += MPFR_LIMB_ONE << sh; - inexact = 1; -diff -Naurd mpfr-3.1.0-a/src/get_d.c mpfr-3.1.0-b/src/get_d.c ---- mpfr-3.1.0-a/src/get_d.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/get_d.c 2012-03-08 15:17:03.000000000 +0000 -@@ -100,7 +100,7 @@ - nbits += (1021 + e); - MPFR_ASSERTD (nbits >= 1); - } -- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; -+ np = MPFR_PREC2LIMBS (nbits); - MPFR_ASSERTD ( np <= MPFR_LIMBS_PER_DOUBLE ); - carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative, - nbits, rnd_mode); -diff -Naurd mpfr-3.1.0-a/src/get_flt.c mpfr-3.1.0-b/src/get_flt.c ---- mpfr-3.1.0-a/src/get_flt.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/get_flt.c 2012-03-08 15:17:03.000000000 +0000 -@@ -92,7 +92,7 @@ - nbits += (125 + e); - MPFR_ASSERTD (nbits >= 1); - } -- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; -+ np = MPFR_PREC2LIMBS (nbits); - MPFR_ASSERTD(np <= MPFR_LIMBS_PER_FLT); - carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative, - nbits, rnd_mode); -diff -Naurd mpfr-3.1.0-a/src/get_str.c mpfr-3.1.0-b/src/get_str.c ---- mpfr-3.1.0-a/src/get_str.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/get_str.c 2012-03-08 15:17:03.000000000 +0000 -@@ -2351,7 +2351,7 @@ - - /* the first digit will contain only r bits */ - prec = (m - 1) * pow2 + r; /* total number of bits */ -- n = (prec - 1) / GMP_NUMB_BITS + 1; -+ n = MPFR_PREC2LIMBS (prec); - - MPFR_TMP_MARK (marker); - x1 = MPFR_TMP_LIMBS_ALLOC (n + 1); -@@ -2417,12 +2417,12 @@ - exact = 1; - - /* number of limbs */ -- n = 1 + (prec - 1) / GMP_NUMB_BITS; -+ n = MPFR_PREC2LIMBS (prec); - - /* a will contain the approximation of the mantissa */ - a = MPFR_TMP_LIMBS_ALLOC (n); - -- nx = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS; -+ nx = MPFR_LIMB_SIZE (x); - - if ((mpfr_exp_t) m == g) /* final exponent is 0, no multiplication or - division to perform */ -diff -Naurd mpfr-3.1.0-a/src/init2.c mpfr-3.1.0-b/src/init2.c ---- mpfr-3.1.0-a/src/init2.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/init2.c 2012-03-08 15:17:03.000000000 +0000 -@@ -51,7 +51,7 @@ - which both have an odd mantissa */ - MPFR_ASSERTN(p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX); - -- xsize = (mp_size_t) ((p - 1) / GMP_NUMB_BITS) + 1; -+ xsize = MPFR_PREC2LIMBS (p); - tmp = (mpfr_limb_ptr) (*__gmp_allocate_func)(MPFR_MALLOC_SIZE(xsize)); - - MPFR_PREC(x) = p; /* Set prec */ -diff -Naurd mpfr-3.1.0-a/src/lngamma.c mpfr-3.1.0-b/src/lngamma.c ---- mpfr-3.1.0-a/src/lngamma.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/lngamma.c 2012-03-08 15:17:03.000000000 +0000 -@@ -67,7 +67,7 @@ - - /* Now, the unit bit is represented. */ - -- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo; -+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo; - /* number of represented fractional bits (including the trailing 0's) */ - - x0 = *(MPFR_MANT (x) + prec / GMP_NUMB_BITS); -diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h ---- mpfr-3.1.0-a/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-03-09 12:06:26.000000000 +0000 -@@ -646,10 +646,24 @@ - **************** mpfr_t properties ******************* - ******************************************************/ - -+/* In the following macro, p is usually a mpfr_prec_t, but this macro -+ works with other integer types (without integer overflow). Checking -+ that p >= 1 in debug mode is useful here because this macro can be -+ used on a computed precision (in particular, this formula does not -+ work for a degenerate case p = 0, and could give different results -+ on different platforms). But let us not use an assertion checking -+ in the MPFR_LAST_LIMB() and MPFR_LIMB_SIZE() macros below to avoid -+ too much expansion for assertions (in practice, this should be a -+ problem just when testing MPFR with the --enable-assert configure -+ option and the -ansi -pedantic-errors gcc compiler flags). */ -+#define MPFR_PREC2LIMBS(p) \ -+ (MPFR_ASSERTD ((p) >= 1), ((p) - 1) / GMP_NUMB_BITS + 1) -+ - #define MPFR_PREC(x) ((x)->_mpfr_prec) - #define MPFR_EXP(x) ((x)->_mpfr_exp) - #define MPFR_MANT(x) ((x)->_mpfr_d) --#define MPFR_LIMB_SIZE(x) ((MPFR_PREC((x))-1)/GMP_NUMB_BITS+1) -+#define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS) -+#define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1) - - - /****************************************************** -@@ -749,7 +763,8 @@ - #define MPFR_IS_FP(x) (!MPFR_IS_NAN(x) && !MPFR_IS_INF(x)) - #define MPFR_IS_SINGULAR(x) (MPFR_EXP(x) <= MPFR_EXP_INF) - #define MPFR_IS_PURE_FP(x) (!MPFR_IS_SINGULAR(x) && \ -- (MPFR_ASSERTD (MPFR_MANT(x)[MPFR_LIMB_SIZE(x)-1] & MPFR_LIMB_HIGHBIT), 1)) -+ (MPFR_ASSERTD ((MPFR_MANT(x)[MPFR_LAST_LIMB(x)] \ -+ & MPFR_LIMB_HIGHBIT) != 0), 1)) - - #define MPFR_ARE_SINGULAR(x,y) \ - (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)) || MPFR_UNLIKELY(MPFR_IS_SINGULAR(y))) -@@ -1061,7 +1076,7 @@ - /* Set a number to 1 (Fast) - It doesn't check if 1 is in the exponent range */ - #define MPFR_SET_ONE(x) \ - do { \ -- mp_size_t _size = MPFR_LIMB_SIZE(x) - 1; \ -+ mp_size_t _size = MPFR_LAST_LIMB(x); \ - MPFR_SET_POS(x); \ - MPFR_EXP(x) = 1; \ - MPN_ZERO ( MPFR_MANT(x), _size); \ -@@ -1213,8 +1228,8 @@ - _destp = MPFR_MANT (dest); \ - if (MPFR_UNLIKELY (_destprec >= _srcprec)) \ - { \ -- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \ -- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS - _srcs; \ -+ _srcs = MPFR_PREC2LIMBS (_srcprec); \ -+ _dests = MPFR_PREC2LIMBS (_destprec) - _srcs; \ - MPN_COPY (_destp + _dests, srcp, _srcs); \ - MPN_ZERO (_destp, _dests); \ - inexact = 0; \ -@@ -1227,8 +1242,8 @@ - mp_limb_t _rb, _sb, _ulp; \ - \ - /* Compute Position and shift */ \ -- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \ -- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \ -+ _srcs = MPFR_PREC2LIMBS (_srcprec); \ -+ _dests = MPFR_PREC2LIMBS (_destprec); \ - MPFR_UNSIGNED_MINUS_MODULO (_sh, _destprec); \ - _sp = (srcp) + _srcs - _dests; \ - \ -@@ -1372,7 +1387,7 @@ - if (MPFR_LIKELY (MPFR_PREC (dest) == MPFR_PREC (src))) \ - { \ - MPN_COPY (MPFR_MANT (dest), MPFR_MANT (src), \ -- (MPFR_PREC (src) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS); \ -+ MPFR_LIMB_SIZE (src)); \ - inexact = 0; \ - } \ - else \ -@@ -1682,7 +1697,7 @@ - MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \ - if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \ - mpfr_abort_prec_max (); \ -- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \ -+ _size = MPFR_PREC2LIMBS (_prec); \ - if (MPFR_UNLIKELY (_size * (num) > MPFR_GROUP_STATIC_SIZE)) \ - { \ - (g).alloc = (num) * _size * sizeof (mp_limb_t); \ -@@ -1733,7 +1748,7 @@ - MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \ - if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \ - mpfr_abort_prec_max (); \ -- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \ -+ _size = MPFR_PREC2LIMBS (_prec); \ - (g).alloc = (num) * _size * sizeof (mp_limb_t); \ - if (MPFR_LIKELY (_oalloc == 0)) \ - (g).mant = (mp_limb_t *) (*__gmp_allocate_func) ((g).alloc); \ -@@ -1886,7 +1901,7 @@ - MPFR_NORETURN_ATTR; - - __MPFR_DECLSPEC void mpfr_rand_raw _MPFR_PROTO((mpfr_limb_ptr, gmp_randstate_t, -- unsigned long)); -+ mpfr_prec_t)); - - __MPFR_DECLSPEC mpz_t* mpfr_bernoulli_internal _MPFR_PROTO((mpz_t*, - unsigned long)); -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2012-03-08 15:17:03.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p6" -+#define MPFR_VERSION_STRING "3.1.0-p7" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/mul.c mpfr-3.1.0-b/src/mul.c ---- mpfr-3.1.0-a/src/mul.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/mul.c 2012-03-08 15:17:03.000000000 +0000 -@@ -93,15 +93,15 @@ - - ax = MPFR_GET_EXP (b) + MPFR_GET_EXP (c); - -- bq = MPFR_PREC(b); -- cq = MPFR_PREC(c); -+ bq = MPFR_PREC (b); -+ cq = MPFR_PREC (c); - -- MPFR_ASSERTD(bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */ -+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX); - -- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */ -- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */ -+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */ -+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */ - k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */ -- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; -+ tn = MPFR_PREC2LIMBS (bq + cq); - /* <= k, thus no int overflow */ - MPFR_ASSERTD(tn <= k); - -@@ -292,12 +292,12 @@ - bq = MPFR_PREC (b); - cq = MPFR_PREC (c); - -- MPFR_ASSERTD (bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */ -+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX); - -- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */ -- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */ -+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */ -+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */ - k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */ -- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; -+ tn = MPFR_PREC2LIMBS (bq + cq); - MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */ - - /* Check for no size_t overflow*/ -diff -Naurd mpfr-3.1.0-a/src/pow.c mpfr-3.1.0-b/src/pow.c ---- mpfr-3.1.0-a/src/pow.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/pow.c 2012-03-08 15:17:03.000000000 +0000 -@@ -136,7 +136,7 @@ - (b) all the 'z' bits are zero - */ - -- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo; -+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo; - /* number of z+0 bits */ - - yn = prec / GMP_NUMB_BITS; -diff -Naurd mpfr-3.1.0-a/src/print_raw.c mpfr-3.1.0-b/src/print_raw.c ---- mpfr-3.1.0-a/src/print_raw.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/print_raw.c 2012-03-08 15:17:03.000000000 +0000 -@@ -84,7 +84,7 @@ - int i; - mpfr_prec_t count = 0; - char c; -- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1; -+ mp_size_t n = MPFR_PREC2LIMBS (r); - - printf("%s ", str); - for(n-- ; n>=0 ; n--) -@@ -109,7 +109,7 @@ - int i; - mpfr_prec_t count = 0; - char c; -- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1; -+ mp_size_t n = MPFR_PREC2LIMBS (r); - - for(n-- ; n>=0 ; n--) - { -diff -Naurd mpfr-3.1.0-a/src/round_prec.c mpfr-3.1.0-b/src/round_prec.c ---- mpfr-3.1.0-a/src/round_prec.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/round_prec.c 2012-03-08 15:17:03.000000000 +0000 -@@ -55,12 +55,12 @@ - - MPFR_ASSERTN(prec >= MPFR_PREC_MIN && prec <= MPFR_PREC_MAX); - -- nw = 1 + (prec - 1) / GMP_NUMB_BITS; /* needed allocated limbs */ -+ nw = MPFR_PREC2LIMBS (prec); /* needed allocated limbs */ - - /* check if x has enough allocated space for the significand */ - /* Get the number of limbs from the precision. - (Compatible with all allocation methods) */ -- ow = (MPFR_PREC (x) + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; -+ ow = MPFR_LIMB_SIZE (x); - if (nw > ow) - { - /* FIXME: Variable can't be created using custom allocation, -diff -Naurd mpfr-3.1.0-a/src/round_raw_generic.c mpfr-3.1.0-b/src/round_raw_generic.c ---- mpfr-3.1.0-a/src/round_raw_generic.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/round_raw_generic.c 2012-03-08 15:17:03.000000000 +0000 -@@ -80,7 +80,7 @@ - (xprec <= yprec || MPFR_IS_LIKE_RNDZ (rnd_mode, neg))) - return 0; - -- xsize = (xprec-1)/GMP_NUMB_BITS + 1; -+ xsize = MPFR_PREC2LIMBS (xprec); - nw = yprec / GMP_NUMB_BITS; - rw = yprec & (GMP_NUMB_BITS - 1); - -diff -Naurd mpfr-3.1.0-a/src/set.c mpfr-3.1.0-b/src/set.c ---- mpfr-3.1.0-a/src/set.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/set.c 2012-03-08 15:17:03.000000000 +0000 -@@ -48,8 +48,7 @@ - /* Same precision and b is not singular: - * just copy the mantissa, and set the exponent and the sign - * The result is exact. */ -- MPN_COPY (MPFR_MANT (a), MPFR_MANT (b), -- (MPFR_PREC (b) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS); -+ MPN_COPY (MPFR_MANT (a), MPFR_MANT (b), MPFR_LIMB_SIZE (b)); - MPFR_RET (0); - } - else -diff -Naurd mpfr-3.1.0-a/src/set_f.c mpfr-3.1.0-b/src/set_f.c ---- mpfr-3.1.0-a/src/set_f.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/set_f.c 2012-03-08 15:17:03.000000000 +0000 -@@ -43,7 +43,7 @@ - if (SIZ(x) * MPFR_FROM_SIGN_TO_INT(MPFR_SIGN(y)) < 0) - MPFR_CHANGE_SIGN (y); - -- sy = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS; -+ sy = MPFR_LIMB_SIZE (y); - my = MPFR_MANT(y); - mx = PTR(x); - -diff -Naurd mpfr-3.1.0-a/src/set_prec.c mpfr-3.1.0-b/src/set_prec.c ---- mpfr-3.1.0-a/src/set_prec.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/set_prec.c 2012-03-08 15:17:03.000000000 +0000 -@@ -32,7 +32,7 @@ - MPFR_ASSERTN (p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX); - - /* Calculate the new number of limbs */ -- xsize = (p - 1) / GMP_NUMB_BITS + 1; -+ xsize = MPFR_PREC2LIMBS (p); - - /* Realloc only if the new size is greater than the old */ - xoldsize = MPFR_GET_ALLOC_SIZE (x); -diff -Naurd mpfr-3.1.0-a/src/setmax.c mpfr-3.1.0-b/src/setmax.c ---- mpfr-3.1.0-a/src/setmax.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/setmax.c 2012-03-08 15:17:03.000000000 +0000 -@@ -32,7 +32,7 @@ - mp_limb_t *xp; - - MPFR_SET_EXP (x, e); -- xn = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS; -+ xn = MPFR_LIMB_SIZE (x); - sh = (mpfr_prec_t) xn * GMP_NUMB_BITS - MPFR_PREC(x); - xp = MPFR_MANT(x); - xp[0] = MP_LIMB_T_MAX << sh; -diff -Naurd mpfr-3.1.0-a/src/sqr.c mpfr-3.1.0-b/src/sqr.c ---- mpfr-3.1.0-a/src/sqr.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/sqr.c 2012-03-08 15:17:03.000000000 +0000 -@@ -56,11 +56,11 @@ - ax = 2 * MPFR_GET_EXP (b); - bq = MPFR_PREC(b); - -- MPFR_ASSERTD (2 * bq > bq); /* PREC_MAX is /2 so no integer overflow */ -+ MPFR_ASSERTN (2 * (mpfr_uprec_t) bq <= MPFR_PREC_MAX); - -- bn = MPFR_LIMB_SIZE(b); /* number of limbs of b */ -- tn = 1 + (2 * bq - 1) / GMP_NUMB_BITS; /* number of limbs of square, -- 2*bn or 2*bn-1 */ -+ bn = MPFR_LIMB_SIZE (b); /* number of limbs of b */ -+ tn = MPFR_PREC2LIMBS (2 * bq); /* number of limbs of square, -+ 2*bn or 2*bn-1 */ - - if (MPFR_UNLIKELY(bn > MPFR_SQR_THRESHOLD)) - return mpfr_mul (a, b, b, rnd_mode); -diff -Naurd mpfr-3.1.0-a/src/stack_interface.c mpfr-3.1.0-b/src/stack_interface.c ---- mpfr-3.1.0-a/src/stack_interface.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/stack_interface.c 2012-03-08 15:17:03.000000000 +0000 -@@ -26,7 +26,7 @@ - size_t - mpfr_custom_get_size (mpfr_prec_t prec) - { -- return (prec + GMP_NUMB_BITS -1) / GMP_NUMB_BITS * BYTES_PER_MP_LIMB; -+ return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB; - } - - #undef mpfr_custom_init -diff -Naurd mpfr-3.1.0-a/src/strtofr.c mpfr-3.1.0-b/src/strtofr.c ---- mpfr-3.1.0-a/src/strtofr.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/strtofr.c 2012-03-08 15:17:03.000000000 +0000 -@@ -467,7 +467,7 @@ - /* Set y to the value of the ~prec most significant bits of pstr->mant - (as long as we guarantee correct rounding, we don't need to get - exactly prec bits). */ -- ysize = (prec - 1) / GMP_NUMB_BITS + 1; -+ ysize = MPFR_PREC2LIMBS (prec); - /* prec bits corresponds to ysize limbs */ - ysize_bits = ysize * GMP_NUMB_BITS; - /* and to ysize_bits >= prec > MPFR_PREC (x) bits */ -diff -Naurd mpfr-3.1.0-a/src/sub1sp.c mpfr-3.1.0-b/src/sub1sp.c ---- mpfr-3.1.0-a/src/sub1sp.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/sub1sp.c 2012-03-08 15:17:03.000000000 +0000 -@@ -155,8 +155,8 @@ - MPFR_ASSERTD(MPFR_IS_PURE_FP(c)); - - /* Read prec and num of limbs */ -- p = MPFR_PREC(b); -- n = (p-1)/GMP_NUMB_BITS+1; -+ p = MPFR_PREC (b); -+ n = MPFR_PREC2LIMBS (p); - - /* Fast cmp of |b| and |c|*/ - bx = MPFR_GET_EXP (b); -diff -Naurd mpfr-3.1.0-a/src/urandomb.c mpfr-3.1.0-b/src/urandomb.c ---- mpfr-3.1.0-a/src/urandomb.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/urandomb.c 2012-03-08 15:17:03.000000000 +0000 -@@ -31,13 +31,20 @@ - a sufficient number of limbs */ - void - mpfr_rand_raw (mpfr_limb_ptr mp, gmp_randstate_t rstate, -- unsigned long int nbits) -+ mpfr_prec_t nbits) - { - mpz_t z; - -+ MPFR_ASSERTN (nbits >= 1); - /* To be sure to avoid the potential allocation of mpz_urandomb */ -- ALLOC(z) = SIZ(z) = ((nbits - 1) / GMP_NUMB_BITS) + 1; -+ ALLOC(z) = SIZ(z) = MPFR_PREC2LIMBS (nbits); - PTR(z) = mp; -+#if __MPFR_GMP(5,0,0) -+ /* Check for integer overflow (unless mp_bitcnt_t is signed, -+ but according to the GMP manual, this shouldn't happen). -+ Note: mp_bitcnt_t has been introduced in GMP 5.0.0. */ -+ MPFR_ASSERTN ((mp_bitcnt_t) -1 < 0 || nbits <= (mp_bitcnt_t) -1); -+#endif - mpz_urandomb (z, rstate, nbits); - } - -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2012-02-24 13:50:05.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2012-03-08 15:17:03.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p6"; -+ return "3.1.0-p7"; - } -diff -Naurd mpfr-3.1.0-a/tests/tinits.c mpfr-3.1.0-b/tests/tinits.c ---- mpfr-3.1.0-a/tests/tinits.c 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/tests/tinits.c 2012-03-08 15:17:03.000000000 +0000 -@@ -1,4 +1,4 @@ --/* Test file for mpfr_inits, mpfr_inits2 and mpfr_clears. -+/* Test file for mpfr_init2, mpfr_inits, mpfr_inits2 and mpfr_clears. - - Copyright 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. - Contributed by the Arenaire and Caramel projects, INRIA. -@@ -20,18 +20,43 @@ - http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ - -+#include <stdlib.h> -+ - #include "mpfr-test.h" - - int - main (void) - { - mpfr_t a, b, c; -+ long large_prec; - - tests_start_mpfr (); -+ - mpfr_inits (a, b, c, (mpfr_ptr) 0); - mpfr_clears (a, b, c, (mpfr_ptr) 0); - mpfr_inits2 (200, a, b, c, (mpfr_ptr) 0); - mpfr_clears (a, b, c, (mpfr_ptr) 0); -+ -+ /* test for precision 2^31-1, see -+ https://gforge.inria.fr/tracker/index.php?func=detail&aid=13918 */ -+ large_prec = 2147483647; -+ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL) -+ { -+ /* We assume that the precision won't be increased internally. */ -+ if (large_prec > MPFR_PREC_MAX) -+ large_prec = MPFR_PREC_MAX; -+ mpfr_inits2 (large_prec, a, b, (mpfr_ptr) 0); -+ mpfr_set_ui (a, 17, MPFR_RNDN); -+ mpfr_set (b, a, MPFR_RNDN); -+ if (mpfr_get_ui (a, MPFR_RNDN) != 17) -+ { -+ printf ("Error in mpfr_init2 with precision 2^31-1\n"); -+ exit (1); -+ } -+ mpfr_clears (a, b, (mpfr_ptr) 0); -+ } -+ - tests_end_mpfr (); -+ - return 0; - } diff --git a/patches/mpfr/3.1.0/180-__gmp_const.patch b/patches/mpfr/3.1.0/180-__gmp_const.patch deleted file mode 100644 index 94444b6..0000000 --- a/patches/mpfr/3.1.0/180-__gmp_const.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2012-03-12 11:59:47.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2012-03-12 11:59:47.000000000 +0000 -@@ -0,0 +1 @@ -+__gmp_const -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2012-03-08 15:17:03.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2012-03-12 11:59:47.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p7 -+3.1.0-p8 -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2012-03-08 15:17:03.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2012-03-12 11:59:47.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p7" -+#define MPFR_VERSION_STRING "3.1.0-p8" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -39,6 +39,18 @@ - # include <gmp.h> - #endif - -+/* GMP's internal __gmp_const macro has been removed on 2012-03-04: -+ http://gmplib.org:8000/gmp/rev/d287cfaf6732 -+ const is standard and now assumed to be available. If the __gmp_const -+ definition is no longer present in GMP, this probably means that GMP -+ assumes that const is available; thus let's define it to const. -+ Note: this is a temporary fix that can be backported to previous MPFR -+ versions. In the future, __gmp_const should be replaced by const like -+ in GMP. */ -+#ifndef __gmp_const -+# define __gmp_const const -+#endif -+ - /* Avoid some problems with macro expansion if the user defines macros - with the same name as keywords. By convention, identifiers and macro - names starting with mpfr_ are reserved by MPFR. */ -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2012-03-08 15:17:03.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2012-03-12 11:59:47.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p7"; -+ return "3.1.0-p8"; - } diff --git a/patches/mpfr/3.1.0/190-gamma-underflow.patch b/patches/mpfr/3.1.0/190-gamma-underflow.patch deleted file mode 100644 index 3de1d19..0000000 --- a/patches/mpfr/3.1.0/190-gamma-underflow.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2012-04-27 01:13:15.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2012-04-27 01:13:15.000000000 +0000 -@@ -0,0 +1 @@ -+gamma-underflow -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2012-03-12 11:59:47.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2012-04-27 01:13:15.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p8 -+3.1.0-p9 -diff -Naurd mpfr-3.1.0-a/src/gamma.c mpfr-3.1.0-b/src/gamma.c ---- mpfr-3.1.0-a/src/gamma.c 2011-10-03 08:17:09.000000000 +0000 -+++ mpfr-3.1.0-b/src/gamma.c 2012-04-27 01:13:15.000000000 +0000 -@@ -296,7 +296,7 @@ - /* we want an upper bound for x * [log(2-x)-1]. - since x < 0, we need a lower bound on log(2-x) */ - mpfr_ui_sub (xp, 2, x, MPFR_RNDD); -- mpfr_log2 (xp, xp, MPFR_RNDD); -+ mpfr_log (xp, xp, MPFR_RNDD); - mpfr_sub_ui (xp, xp, 1, MPFR_RNDD); - mpfr_mul (xp, xp, x, MPFR_RNDU); - -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2012-03-12 11:59:47.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2012-04-27 01:13:15.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p8" -+#define MPFR_VERSION_STRING "3.1.0-p9" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2012-03-12 11:59:47.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2012-04-27 01:13:15.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p8"; -+ return "3.1.0-p9"; - } -diff -Naurd mpfr-3.1.0-a/tests/tgamma.c mpfr-3.1.0-b/tests/tgamma.c ---- mpfr-3.1.0-a/tests/tgamma.c 2011-10-03 08:17:14.000000000 +0000 -+++ mpfr-3.1.0-b/tests/tgamma.c 2012-04-27 01:13:15.000000000 +0000 -@@ -478,6 +478,36 @@ - mpfr_clear (x); - } - -+/* bug found by Giridhar Tammana */ -+static void -+test20120426 (void) -+{ -+ mpfr_t xa, xb; -+ int i; -+ mpfr_exp_t emin; -+ -+ mpfr_init2 (xa, 53); -+ mpfr_init2 (xb, 53); -+ mpfr_set_d (xb, -168.5, MPFR_RNDN); -+ emin = mpfr_get_emin (); -+ mpfr_set_emin (-1073); -+ i = mpfr_gamma (xa, xb, MPFR_RNDN); -+ i = mpfr_subnormalize (xa, i, MPFR_RNDN); /* new ternary value */ -+ mpfr_set_str (xb, "-9.5737343987585366746184749943e-304", 10, MPFR_RNDN); -+ if (!((i > 0) && (mpfr_cmp (xa, xb) == 0))) -+ { -+ printf ("Error in test20120426, i=%d\n", i); -+ printf ("expected "); -+ mpfr_print_binary (xb); putchar ('\n'); -+ printf ("got "); -+ mpfr_print_binary (xa); putchar ('\n'); -+ exit (1); -+ } -+ mpfr_set_emin (emin); -+ mpfr_clear (xa); -+ mpfr_clear (xb); -+} -+ - static void - exprange (void) - { -@@ -821,6 +851,7 @@ - gamma_integer (); - test20071231 (); - test20100709 (); -+ test20120426 (); - - data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); - diff --git a/patches/mpfr/3.1.0/200-gamma-overunderflow.patch b/patches/mpfr/3.1.0/200-gamma-overunderflow.patch deleted file mode 100644 index e6d6051..0000000 --- a/patches/mpfr/3.1.0/200-gamma-overunderflow.patch +++ /dev/null @@ -1,487 +0,0 @@ -diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES ---- mpfr-3.1.0-a/PATCHES 2012-05-07 18:52:45.000000000 +0000 -+++ mpfr-3.1.0-b/PATCHES 2012-05-07 18:52:45.000000000 +0000 -@@ -0,0 +1 @@ -+gamma-overunderflow -diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION ---- mpfr-3.1.0-a/VERSION 2012-04-27 01:13:15.000000000 +0000 -+++ mpfr-3.1.0-b/VERSION 2012-05-07 18:52:45.000000000 +0000 -@@ -1 +1 @@ --3.1.0-p9 -+3.1.0-p10 -diff -Naurd mpfr-3.1.0-a/src/gamma.c mpfr-3.1.0-b/src/gamma.c ---- mpfr-3.1.0-a/src/gamma.c 2012-04-27 01:13:15.000000000 +0000 -+++ mpfr-3.1.0-b/src/gamma.c 2012-05-07 18:52:45.000000000 +0000 -@@ -100,7 +100,8 @@ - mpfr_t xp, GammaTrial, tmp, tmp2; - mpz_t fact; - mpfr_prec_t realprec; -- int compared, inex, is_integer; -+ int compared, is_integer; -+ int inex = 0; /* 0 means: result gamma not set yet */ - MPFR_GROUP_DECL (group); - MPFR_SAVE_EXPO_DECL (expo); - MPFR_ZIV_DECL (loop); -@@ -377,6 +378,15 @@ - mpfr_mul (GammaTrial, tmp2, xp, MPFR_RNDN); /* Pi*(2-x), error (1+u)^2 */ - err_g = MPFR_GET_EXP(GammaTrial); - mpfr_sin (GammaTrial, GammaTrial, MPFR_RNDN); /* sin(Pi*(2-x)) */ -+ /* If tmp is +Inf, we compute exp(lngamma(x)). */ -+ if (mpfr_inf_p (tmp)) -+ { -+ inex = mpfr_explgamma (gamma, x, &expo, tmp, tmp2, rnd_mode); -+ if (inex) -+ goto end; -+ else -+ goto ziv_next; -+ } - err_g = err_g + 1 - MPFR_GET_EXP(GammaTrial); - /* let g0 the true value of Pi*(2-x), g the computed value. - We have g = g0 + h with |h| <= |(1+u^2)-1|*g. -@@ -411,11 +421,16 @@ - if (MPFR_LIKELY (MPFR_CAN_ROUND (GammaTrial, realprec - err_g, - MPFR_PREC(gamma), rnd_mode))) - break; -+ -+ ziv_next: - MPFR_ZIV_NEXT (loop, realprec); - } -+ -+ end: - MPFR_ZIV_FREE (loop); - -- inex = mpfr_set (gamma, GammaTrial, rnd_mode); -+ if (inex == 0) -+ inex = mpfr_set (gamma, GammaTrial, rnd_mode); - MPFR_GROUP_CLEAR (group); - mpz_clear (fact); - -diff -Naurd mpfr-3.1.0-a/src/lngamma.c mpfr-3.1.0-b/src/lngamma.c ---- mpfr-3.1.0-a/src/lngamma.c 2012-03-08 15:17:03.000000000 +0000 -+++ mpfr-3.1.0-b/src/lngamma.c 2012-05-07 18:52:45.000000000 +0000 -@@ -49,9 +49,72 @@ - mpfr_set_ui_2exp (s, 9, -1, MPFR_RNDN); /* 4.5 */ - } - --#ifndef IS_GAMMA -+#ifdef IS_GAMMA -+ -+/* This function is called in case of intermediate overflow/underflow. -+ The s1 and s2 arguments are temporary MPFR numbers, having the -+ working precision. If the result could be determined, then the -+ flags are updated via pexpo, y is set to the result, and the -+ (non-zero) ternary value is returned. Otherwise 0 is returned -+ in order to perform the next Ziv iteration. */ - static int --unit_bit (mpfr_srcptr (x)) -+mpfr_explgamma (mpfr_ptr y, mpfr_srcptr x, mpfr_save_expo_t *pexpo, -+ mpfr_ptr s1, mpfr_ptr s2, mpfr_rnd_t rnd) -+{ -+ mpfr_t t1, t2; -+ int inex1, inex2, sign; -+ MPFR_BLOCK_DECL (flags1); -+ MPFR_BLOCK_DECL (flags2); -+ MPFR_GROUP_DECL (group); -+ -+ MPFR_BLOCK (flags1, inex1 = mpfr_lgamma (s1, &sign, x, MPFR_RNDD)); -+ MPFR_ASSERTN (inex1 != 0); -+ /* s1 = RNDD(lngamma(x)), inexact */ -+ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags1))) -+ { -+ if (MPFR_SIGN (s1) > 0) -+ { -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (*pexpo, MPFR_FLAGS_OVERFLOW); -+ return mpfr_overflow (y, rnd, sign); -+ } -+ else -+ { -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (*pexpo, MPFR_FLAGS_UNDERFLOW); -+ return mpfr_underflow (y, rnd == MPFR_RNDN ? MPFR_RNDZ : rnd, sign); -+ } -+ } -+ -+ mpfr_set (s2, s1, MPFR_RNDN); /* exact */ -+ mpfr_nextabove (s2); /* v = RNDU(lngamma(z0)) */ -+ -+ if (sign < 0) -+ rnd = MPFR_INVERT_RND (rnd); /* since the result with be negated */ -+ MPFR_GROUP_INIT_2 (group, MPFR_PREC (y), t1, t2); -+ MPFR_BLOCK (flags1, inex1 = mpfr_exp (t1, s1, rnd)); -+ MPFR_BLOCK (flags2, inex2 = mpfr_exp (t2, s2, rnd)); -+ /* t1 is the rounding with mode 'rnd' of a lower bound on |Gamma(x)|, -+ t2 is the rounding with mode 'rnd' of an upper bound, thus if both -+ are equal, so is the wanted result. If t1 and t2 differ or the flags -+ differ, at some point of Ziv's loop they should agree. */ -+ if (mpfr_equal_p (t1, t2) && flags1 == flags2) -+ { -+ MPFR_ASSERTN ((inex1 > 0 && inex2 > 0) || (inex1 < 0 && inex2 < 0)); -+ mpfr_set4 (y, t1, MPFR_RNDN, sign); /* exact */ -+ if (sign < 0) -+ inex1 = - inex1; -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (*pexpo, flags1); -+ } -+ else -+ inex1 = 0; /* couldn't determine the result */ -+ MPFR_GROUP_CLEAR (group); -+ -+ return inex1; -+} -+ -+#else -+ -+static int -+unit_bit (mpfr_srcptr x) - { - mpfr_exp_t expo; - mpfr_prec_t prec; -@@ -75,6 +138,7 @@ - - return (x0 >> (prec % GMP_NUMB_BITS)) & 1; - } -+ - #endif - - /* lngamma(x) = log(gamma(x)). -@@ -99,12 +163,14 @@ - mpfr_t s, t, u, v, z; - unsigned long m, k, maxm; - mpz_t *INITIALIZED(B); /* variable B declared as initialized */ -- int inexact, compared; -+ int compared; -+ int inexact = 0; /* 0 means: result y not set yet */ - mpfr_exp_t err_s, err_t; - unsigned long Bm = 0; /* number of allocated B[] */ - unsigned long oldBm; - double d; - MPFR_SAVE_EXPO_DECL (expo); -+ MPFR_ZIV_DECL (loop); - - compared = mpfr_cmp_ui (z0, 1); - -@@ -122,7 +188,7 @@ - if (MPFR_EXP(z0) <= - (mpfr_exp_t) MPFR_PREC(y)) - { - mpfr_t l, h, g; -- int ok, inex2; -+ int ok, inex1, inex2; - mpfr_prec_t prec = MPFR_PREC(y) + 14; - MPFR_ZIV_DECL (loop); - -@@ -157,14 +223,14 @@ - mpfr_sub (h, h, g, MPFR_RNDD); - mpfr_mul (g, z0, z0, MPFR_RNDU); - mpfr_add (h, h, g, MPFR_RNDU); -- inexact = mpfr_prec_round (l, MPFR_PREC(y), rnd); -+ inex1 = mpfr_prec_round (l, MPFR_PREC(y), rnd); - inex2 = mpfr_prec_round (h, MPFR_PREC(y), rnd); - /* Caution: we not only need l = h, but both inexact flags should - agree. Indeed, one of the inexact flags might be zero. In that - case if we assume lngamma(z0) cannot be exact, the other flag - should be correct. We are conservative here and request that both - inexact flags agree. */ -- ok = SAME_SIGN (inexact, inex2) && mpfr_cmp (l, h) == 0; -+ ok = SAME_SIGN (inex1, inex2) && mpfr_cmp (l, h) == 0; - if (ok) - mpfr_set (y, h, rnd); /* exact */ - mpfr_clear (l); -@@ -172,8 +238,9 @@ - mpfr_clear (g); - if (ok) - { -+ MPFR_ZIV_FREE (loop); - MPFR_SAVE_EXPO_FREE (expo); -- return mpfr_check_range (y, inexact, rnd); -+ return mpfr_check_range (y, inex1, rnd); - } - /* since we have log|gamma(x)| = - log|x| - gamma*x + O(x^2), - if x ~ 2^(-n), then we have a n-bit approximation, thus -@@ -205,9 +272,10 @@ - thus lngamma(x) = log(Pi*(x-1)/sin(Pi*(2-x))) - lngamma(2-x) */ - - w = precy + MPFR_INT_CEIL_LOG2 (precy); -+ w += MPFR_INT_CEIL_LOG2 (w) + 14; -+ MPFR_ZIV_INIT (loop, w); - while (1) - { -- w += MPFR_INT_CEIL_LOG2 (w) + 14; - MPFR_ASSERTD(w >= 3); - mpfr_set_prec (s, w); - mpfr_set_prec (t, w); -@@ -288,7 +356,9 @@ - + (rnd == MPFR_RNDN))) - goto end; - } -+ MPFR_ZIV_NEXT (loop, w); - } -+ MPFR_ZIV_FREE (loop); - } - - /* now z0 > 1 */ -@@ -298,10 +368,10 @@ - /* since k is O(w), the value of log(z0*...*(z0+k-1)) is about w*log(w), - so there is a cancellation of ~log(w) in the argument reconstruction */ - w = precy + MPFR_INT_CEIL_LOG2 (precy); -- -- do -+ w += MPFR_INT_CEIL_LOG2 (w) + 13; -+ MPFR_ZIV_INIT (loop, w); -+ while (1) - { -- w += MPFR_INT_CEIL_LOG2 (w) + 13; - MPFR_ASSERTD (w >= 3); - - /* argument reduction: we compute gamma(z0 + k), where the series -@@ -441,6 +511,15 @@ - #ifdef IS_GAMMA - err_s = MPFR_GET_EXP(s); - mpfr_exp (s, s, MPFR_RNDN); -+ /* If s is +Inf, we compute exp(lngamma(z0)). */ -+ if (mpfr_inf_p (s)) -+ { -+ inexact = mpfr_explgamma (y, z0, &expo, s, t, rnd); -+ if (inexact) -+ goto end0; -+ else -+ goto ziv_next; -+ } - /* before the exponential, we have s = s0 + h where - |h| <= (2m+48)*ulp(s), thus exp(s0) = exp(s) * exp(-h). - For |h| <= 1/4, we have |exp(h)-1| <= 1.2*|h| thus -@@ -480,16 +559,26 @@ - err_s = (err_t == err_s) ? 1 + err_s : ((err_t > err_s) ? err_t : err_s); - err_s += 1 - MPFR_GET_EXP(s); - #endif -+ if (MPFR_LIKELY (MPFR_CAN_ROUND (s, w - err_s, precy, rnd))) -+ break; -+#ifdef IS_GAMMA -+ ziv_next: -+#endif -+ MPFR_ZIV_NEXT (loop, w); - } -- while (MPFR_UNLIKELY (!MPFR_CAN_ROUND (s, w - err_s, precy, rnd))); - -+#ifdef IS_GAMMA -+ end0: -+#endif - oldBm = Bm; - while (Bm--) - mpz_clear (B[Bm]); - (*__gmp_free_func) (B, oldBm * sizeof (mpz_t)); - - end: -- inexact = mpfr_set (y, s, rnd); -+ if (inexact == 0) -+ inexact = mpfr_set (y, s, rnd); -+ MPFR_ZIV_FREE (loop); - - mpfr_clear (s); - mpfr_clear (t); -diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h ---- mpfr-3.1.0-a/src/mpfr.h 2012-04-27 01:13:15.000000000 +0000 -+++ mpfr-3.1.0-b/src/mpfr.h 2012-05-07 18:52:45.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.1.0-p9" -+#define MPFR_VERSION_STRING "3.1.0-p10" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c ---- mpfr-3.1.0-a/src/version.c 2012-04-27 01:13:15.000000000 +0000 -+++ mpfr-3.1.0-b/src/version.c 2012-05-07 18:52:45.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.0-p9"; -+ return "3.1.0-p10"; - } -diff -Naurd mpfr-3.1.0-a/tests/tgamma.c mpfr-3.1.0-b/tests/tgamma.c ---- mpfr-3.1.0-a/tests/tgamma.c 2012-04-27 01:13:15.000000000 +0000 -+++ mpfr-3.1.0-b/tests/tgamma.c 2012-05-07 18:52:45.000000000 +0000 -@@ -838,6 +838,175 @@ - exit (1); - } - -+/* Test mpfr_gamma in precision p1 by comparing it with exp(lgamma(x)) -+ computing with a working precision p2. Assume that x is not an -+ integer <= 2. */ -+static void -+exp_lgamma (mpfr_t x, mpfr_prec_t p1, mpfr_prec_t p2) -+{ -+ mpfr_t yd, yu, zd, zu; -+ int inexd, inexu, sign; -+ int underflow = -1, overflow = -1; /* -1: we don't know */ -+ int got_underflow, got_overflow; -+ -+ if (mpfr_integer_p (x) && mpfr_cmp_si (x, 2) <= 0) -+ { -+ printf ("Warning! x is an integer <= 2 in exp_lgamma: "); -+ mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); putchar ('\n'); -+ return; -+ } -+ mpfr_inits2 (p2, yd, yu, (mpfr_ptr) 0); -+ inexd = mpfr_lgamma (yd, &sign, x, MPFR_RNDD); -+ mpfr_set (yu, yd, MPFR_RNDN); /* exact */ -+ if (inexd) -+ mpfr_nextabove (yu); -+ mpfr_clear_flags (); -+ mpfr_exp (yd, yd, MPFR_RNDD); -+ if (! mpfr_underflow_p ()) -+ underflow = 0; -+ if (mpfr_overflow_p ()) -+ overflow = 1; -+ mpfr_clear_flags (); -+ mpfr_exp (yu, yu, MPFR_RNDU); -+ if (mpfr_underflow_p ()) -+ underflow = 1; -+ if (! mpfr_overflow_p ()) -+ overflow = 0; -+ if (sign < 0) -+ { -+ mpfr_neg (yd, yd, MPFR_RNDN); /* exact */ -+ mpfr_neg (yu, yu, MPFR_RNDN); /* exact */ -+ mpfr_swap (yd, yu); -+ } -+ /* yd < Gamma(x) < yu (strict inequalities since x != 1 and x != 2) */ -+ mpfr_inits2 (p1, zd, zu, (mpfr_ptr) 0); -+ mpfr_clear_flags (); -+ inexd = mpfr_gamma (zd, x, MPFR_RNDD); /* zd <= Gamma(x) < yu */ -+ got_underflow = underflow == -1 ? -1 : !! mpfr_underflow_p (); -+ got_overflow = overflow == -1 ? -1 : !! mpfr_overflow_p (); -+ if (! mpfr_less_p (zd, yu) || inexd > 0 || -+ got_underflow != underflow || -+ got_overflow != overflow) -+ { -+ printf ("Error in exp_lgamma on x = "); -+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n'); -+ printf ("yu = "); -+ mpfr_dump (yu); -+ printf ("zd = "); -+ mpfr_dump (zd); -+ printf ("got inexd = %d, expected <= 0\n", inexd); -+ printf ("got underflow = %d, expected %d\n", got_underflow, underflow); -+ printf ("got overflow = %d, expected %d\n", got_overflow, overflow); -+ exit (1); -+ } -+ mpfr_clear_flags (); -+ inexu = mpfr_gamma (zu, x, MPFR_RNDU); /* zu >= Gamma(x) > yd */ -+ got_underflow = underflow == -1 ? -1 : !! mpfr_underflow_p (); -+ got_overflow = overflow == -1 ? -1 : !! mpfr_overflow_p (); -+ if (! mpfr_greater_p (zu, yd) || inexu < 0 || -+ got_underflow != underflow || -+ got_overflow != overflow) -+ { -+ printf ("Error in exp_lgamma on x = "); -+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n'); -+ printf ("yd = "); -+ mpfr_dump (yd); -+ printf ("zu = "); -+ mpfr_dump (zu); -+ printf ("got inexu = %d, expected >= 0\n", inexu); -+ printf ("got underflow = %d, expected %d\n", got_underflow, underflow); -+ printf ("got overflow = %d, expected %d\n", got_overflow, overflow); -+ exit (1); -+ } -+ if (mpfr_equal_p (zd, zu)) -+ { -+ if (inexd != 0 || inexu != 0) -+ { -+ printf ("Error in exp_lgamma on x = "); -+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n'); -+ printf ("zd = zu, thus exact, but inexd = %d and inexu = %d\n", -+ inexd, inexu); -+ exit (1); -+ } -+ MPFR_ASSERTN (got_underflow == 0); -+ MPFR_ASSERTN (got_overflow == 0); -+ } -+ else if (inexd == 0 || inexu == 0) -+ { -+ printf ("Error in exp_lgamma on x = "); -+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n'); -+ printf ("zd != zu, thus inexact, but inexd = %d and inexu = %d\n", -+ inexd, inexu); -+ exit (1); -+ } -+ mpfr_clears (yd, yu, zd, zu, (mpfr_ptr) 0); -+} -+ -+static void -+exp_lgamma_tests (void) -+{ -+ mpfr_t x; -+ mpfr_exp_t emin, emax; -+ int i; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ -+ mpfr_init2 (x, 96); -+ for (i = 3; i <= 8; i++) -+ { -+ mpfr_set_ui (x, i, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ mpfr_nextbelow (x); -+ exp_lgamma (x, 53, 64); -+ mpfr_nextabove (x); -+ mpfr_nextabove (x); -+ exp_lgamma (x, 53, 64); -+ } -+ mpfr_set_str (x, "1.7", 10, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ mpfr_set_str (x, "-90.6308260837372266e+15", 10, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ /* The following test gives a large positive result < +Inf */ -+ mpfr_set_str (x, "1.2b13fc45a92dea1@14", 16, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ /* Idem for a large negative result > -Inf */ -+ mpfr_set_str (x, "-1.2b13fc45a92de81@14", 16, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ /* The following two tests trigger an endless loop in r8186 -+ on 64-bit machines (64-bit exponent). The second one (due -+ to undetected overflow) is a direct consequence of the -+ first one, due to the call of Gamma(2-x) if x < 1. */ -+ mpfr_set_str (x, "1.2b13fc45a92dec8@14", 16, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ mpfr_set_str (x, "-1.2b13fc45a92dea8@14", 16, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ /* Similar tests (overflow threshold) for 32-bit machines. */ -+ mpfr_set_str (x, "2ab68d8.657542f855111c61", 16, MPFR_RNDN); -+ exp_lgamma (x, 12, 64); -+ mpfr_set_str (x, "-2ab68d6.657542f855111c61", 16, MPFR_RNDN); -+ exp_lgamma (x, 12, 64); -+ /* The following test is an overflow on 32-bit and 64-bit machines. -+ Revision r8189 fails on 64-bit machines as the flag is unset. */ -+ mpfr_set_str (x, "1.2b13fc45a92ded8@14", 16, MPFR_RNDN); -+ exp_lgamma (x, 53, 64); -+ /* On the following tests, with r8196, one gets an underflow on -+ 32-bit machines, while a normal result is expected (see FIXME -+ in gamma.c:382). */ -+ mpfr_set_str (x, "-2ab68d6.657542f855111c6104", 16, MPFR_RNDN); -+ exp_lgamma (x, 12, 64); /* failure on 32-bit machines */ -+ mpfr_set_str (x, "-12b13fc45a92deb.1c6c5bc964", 16, MPFR_RNDN); -+ exp_lgamma (x, 12, 64); /* failure on 64-bit machines */ -+ mpfr_clear (x); -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -852,6 +1021,7 @@ - test20071231 (); - test20100709 (); - test20120426 (); -+ exp_lgamma_tests (); - - data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); - diff --git a/patches/mpfr/3.1.1/110-get_decimal64.patch b/patches/mpfr/3.1.1/110-get_decimal64.patch deleted file mode 100644 index d73a3d7..0000000 --- a/patches/mpfr/3.1.1/110-get_decimal64.patch +++ /dev/null @@ -1,235 +0,0 @@ -diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES ---- mpfr-3.1.1-a/PATCHES 2012-08-30 09:28:51.000000000 +0000 -+++ mpfr-3.1.1-b/PATCHES 2012-08-30 09:28:51.000000000 +0000 -@@ -0,0 +1 @@ -+get_decimal64 -diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION ---- mpfr-3.1.1-a/VERSION 2012-07-03 15:01:13.000000000 +0000 -+++ mpfr-3.1.1-b/VERSION 2012-08-30 09:28:51.000000000 +0000 -@@ -1 +1 @@ --3.1.1 -+3.1.1-p1 -diff -Naurd mpfr-3.1.1-a/src/get_d64.c mpfr-3.1.1-b/src/get_d64.c ---- mpfr-3.1.1-a/src/get_d64.c 2012-07-03 15:01:18.000000000 +0000 -+++ mpfr-3.1.1-b/src/get_d64.c 2012-08-30 09:28:51.000000000 +0000 -@@ -32,6 +32,10 @@ - - #ifdef MPFR_WANT_DECIMAL_FLOATS - -+#ifndef DEC64_MAX -+# define DEC64_MAX 9.999999999999999E384dd -+#endif -+ - #ifdef DPD_FORMAT - static int T[1000] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, -@@ -142,26 +146,14 @@ - static _Decimal64 - get_decimal64_min (int negative) - { -- union ieee_double_extract x; -- -- x.s.sig = (negative) ? 1 : 0; -- x.s.exp = 0; -- x.s.manh = 0; -- x.s.manl = 1; -- return x.d; -+ return negative ? - 1E-398dd : 1E-398dd; - } - - /* construct the decimal64 largest finite number with given sign */ - static _Decimal64 - get_decimal64_max (int negative) - { -- union ieee_double_extract x; -- -- x.s.sig = (negative) ? 1 : 0; -- x.s.exp = 1919; -- x.s.manh = 1048575; /* 2^20-1 */ -- x.s.manl = ~0; -- return x.d; -+ return negative ? - DEC64_MAX : DEC64_MAX; - } - - /* one-to-one conversion: -@@ -334,7 +326,8 @@ - /* the largest decimal64 number is just below 10^(385) < 2^1279 */ - else if (MPFR_UNLIKELY (e > 1279)) /* then src >= 2^1279 */ - { -- if (MPFR_RNDZ || (rnd_mode == MPFR_RNDU && negative != 0) -+ if (rnd_mode == MPFR_RNDZ -+ || (rnd_mode == MPFR_RNDU && negative != 0) - || (rnd_mode == MPFR_RNDD && negative == 0)) - return get_decimal64_max (negative); - else -@@ -354,6 +347,15 @@ - which corresponds to s=[0.]1000...000 and e=-397 */ - if (e < -397) - { -+ if (rnd_mode == MPFR_RNDN && e == -398) -+ { -+ /* If 0.5E-398 < |src| < 1E-398 (smallest subnormal), -+ src should round to +/- 1E-398 in MPFR_RNDN. */ -+ mpfr_get_str (s, &e, 10, 1, src, MPFR_RNDA); -+ return e == -398 && s[negative] <= '5' ? -+ get_decimal64_zero (negative) : -+ get_decimal64_min (negative); -+ } - if (rnd_mode == MPFR_RNDZ || rnd_mode == MPFR_RNDN - || (rnd_mode == MPFR_RNDD && negative == 0) - || (rnd_mode == MPFR_RNDU && negative != 0)) -@@ -379,7 +381,8 @@ - which corresponds to s=[0.]9999...999 and e=385 */ - else if (e > 385) - { -- if (MPFR_RNDZ || (rnd_mode == MPFR_RNDU && negative != 0) -+ if (rnd_mode == MPFR_RNDZ -+ || (rnd_mode == MPFR_RNDU && negative != 0) - || (rnd_mode == MPFR_RNDD && negative == 0)) - return get_decimal64_max (negative); - else -diff -Naurd mpfr-3.1.1-a/src/mpfr.h mpfr-3.1.1-b/src/mpfr.h ---- mpfr-3.1.1-a/src/mpfr.h 2012-07-03 15:01:19.000000000 +0000 -+++ mpfr-3.1.1-b/src/mpfr.h 2012-08-30 09:28:51.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.1.1" -+#define MPFR_VERSION_STRING "3.1.1-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.1-a/src/version.c mpfr-3.1.1-b/src/version.c ---- mpfr-3.1.1-a/src/version.c 2012-07-03 15:01:18.000000000 +0000 -+++ mpfr-3.1.1-b/src/version.c 2012-08-30 09:28:51.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.1"; -+ return "3.1.1-p1"; - } -diff -Naurd mpfr-3.1.1-a/tests/tget_set_d64.c mpfr-3.1.1-b/tests/tget_set_d64.c ---- mpfr-3.1.1-a/tests/tget_set_d64.c 2012-07-03 15:01:24.000000000 +0000 -+++ mpfr-3.1.1-b/tests/tget_set_d64.c 2012-08-30 09:28:51.000000000 +0000 -@@ -25,6 +25,10 @@ - #include <stdlib.h> /* for exit */ - #include "mpfr-test.h" - -+#ifndef DEC64_MAX -+# define DEC64_MAX 9.999999999999999E384dd -+#endif -+ - /* #define DEBUG */ - - static void -@@ -149,6 +153,15 @@ - mpfr_set_str (x, "9.999999999999999E384", 10, MPFR_RNDZ); - mpfr_set (y, x, MPFR_RNDZ); - d = mpfr_get_decimal64 (x, MPFR_RNDU); -+ ASSERT_ALWAYS (d == DEC64_MAX); -+ mpfr_set_ui (x, 0, MPFR_RNDZ); -+ mpfr_set_decimal64 (x, d, MPFR_RNDZ); -+ ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); -+ -+ mpfr_set_str (x, "-9.999999999999999E384", 10, MPFR_RNDZ); -+ mpfr_set (y, x, MPFR_RNDZ); -+ d = mpfr_get_decimal64 (x, MPFR_RNDA); -+ ASSERT_ALWAYS (d == -DEC64_MAX); - mpfr_set_ui (x, 0, MPFR_RNDZ); - mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); -@@ -225,6 +238,83 @@ - mpfr_clear (x); - } - -+static void -+check_overflow (void) -+{ -+ mpfr_t x; -+ int err = 0, neg, rnd; -+ -+ mpfr_init2 (x, 96); -+ for (neg = 0; neg < 2; neg++) -+ RND_LOOP (rnd) -+ { -+ _Decimal64 d, e; -+ mpfr_rnd_t r = (mpfr_rnd_t) rnd; -+ int sign = neg ? -1 : 1; -+ -+ e = sign * (MPFR_IS_LIKE_RNDZ (r, neg) ? 1 : 2) * DEC64_MAX; -+ /* This tests the binary exponent e > 1279 case of get_d64.c */ -+ mpfr_set_si_2exp (x, sign, 9999, MPFR_RNDN); -+ d = mpfr_get_decimal64 (x, r); -+ if (d != e) -+ { -+ printf ("Error 1 in check_overflow for %s, %s\n", -+ neg ? "negative" : "positive", -+ mpfr_print_rnd_mode (r)); -+ err = 1; -+ } -+ /* This tests the decimal exponent e > 385 case of get_d64.c */ -+ mpfr_set_si_2exp (x, sign * 31, 1274, MPFR_RNDN); -+ d = mpfr_get_decimal64 (x, r); -+ if (d != e) -+ { -+ printf ("Error 2 in check_overflow for %s, %s\n", -+ neg ? "negative" : "positive", -+ mpfr_print_rnd_mode (r)); -+ err = 1; -+ } -+ /* This tests the last else (-382 <= e <= 385) of get_d64.c */ -+ mpfr_set_decimal64 (x, e, MPFR_RNDA); -+ d = mpfr_get_decimal64 (x, r); -+ if (d != e) -+ { -+ printf ("Error 3 in check_overflow for %s, %s\n", -+ neg ? "negative" : "positive", -+ mpfr_print_rnd_mode (r)); -+ err = 1; -+ } -+ } -+ mpfr_clear (x); -+ if (err) -+ exit (1); -+} -+ -+static void -+check_tiny (void) -+{ -+ mpfr_t x; -+ _Decimal64 d; -+ -+ /* If 0.5E-398 < |x| < 1E-398 (smallest subnormal), x should round -+ to +/- 1E-398 in MPFR_RNDN. Note: the midpoint 0.5E-398 between -+ 0 and 1E-398 is not a representable binary number, so that there -+ are no tests for it. */ -+ mpfr_init2 (x, 128); -+ mpfr_set_str (x, "1E-398", 10, MPFR_RNDZ); -+ d = mpfr_get_decimal64 (x, MPFR_RNDN); -+ MPFR_ASSERTN (d == 1.0E-398dd); -+ mpfr_neg (x, x, MPFR_RNDN); -+ d = mpfr_get_decimal64 (x, MPFR_RNDN); -+ MPFR_ASSERTN (d == -1.0E-398dd); -+ mpfr_set_str (x, "0.5E-398", 10, MPFR_RNDU); -+ d = mpfr_get_decimal64 (x, MPFR_RNDN); -+ MPFR_ASSERTN (d == 1.0E-398dd); -+ mpfr_neg (x, x, MPFR_RNDN); -+ d = mpfr_get_decimal64 (x, MPFR_RNDN); -+ MPFR_ASSERTN (d == -1.0E-398dd); -+ mpfr_clear (x); -+} -+ - int - main (void) - { -@@ -241,6 +331,8 @@ - check_inf_nan (); - check_random (); - check_native (); -+ check_overflow (); -+ check_tiny (); - - tests_end_mpfr (); - return 0; diff --git a/patches/mpfr/3.1.1/120-strtofr-ternary-value.patch b/patches/mpfr/3.1.1/120-strtofr-ternary-value.patch deleted file mode 100644 index 76dbc45..0000000 --- a/patches/mpfr/3.1.1/120-strtofr-ternary-value.patch +++ /dev/null @@ -1,170 +0,0 @@ -diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES ---- mpfr-3.1.1-a/PATCHES 2012-08-30 09:35:12.000000000 +0000 -+++ mpfr-3.1.1-b/PATCHES 2012-08-30 09:35:12.000000000 +0000 -@@ -0,0 +1 @@ -+strtofr-ternary-value -diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION ---- mpfr-3.1.1-a/VERSION 2012-08-30 09:28:51.000000000 +0000 -+++ mpfr-3.1.1-b/VERSION 2012-08-30 09:35:12.000000000 +0000 -@@ -1 +1 @@ --3.1.1-p1 -+3.1.1-p2 -diff -Naurd mpfr-3.1.1-a/src/mpfr.h mpfr-3.1.1-b/src/mpfr.h ---- mpfr-3.1.1-a/src/mpfr.h 2012-08-30 09:28:51.000000000 +0000 -+++ mpfr-3.1.1-b/src/mpfr.h 2012-08-30 09:35:12.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.1.1-p1" -+#define MPFR_VERSION_STRING "3.1.1-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.1-a/src/strtofr.c mpfr-3.1.1-b/src/strtofr.c ---- mpfr-3.1.1-a/src/strtofr.c 2012-07-03 15:01:16.000000000 +0000 -+++ mpfr-3.1.1-b/src/strtofr.c 2012-08-30 09:35:12.000000000 +0000 -@@ -667,6 +667,20 @@ - /* (z, exp_z) = base^(exp_base-pstr_size) */ - z = result + 2*ysize + 1; - err = mpfr_mpn_exp (z, &exp_z, pstr->base, exp_z, ysize); -+ /* Since we want y/z rounded toward zero, we must get an upper -+ bound of z. If err >= 0, the error on z is bounded by 2^err. */ -+ if (err >= 0) -+ { -+ mp_limb_t cy; -+ unsigned long h = err / GMP_NUMB_BITS; -+ unsigned long l = err - h * GMP_NUMB_BITS; -+ -+ if (h >= ysize) /* not enough precision in z */ -+ goto next_loop; -+ cy = mpn_add_1 (z, z, ysize - h, MPFR_LIMB_ONE << l); -+ if (cy != 0) /* the code below requires z on ysize limbs */ -+ goto next_loop; -+ } - exact = exact && (err == -1); - if (err == -2) - goto underflow; /* FIXME: Sure? */ -@@ -730,6 +744,7 @@ - MPFR_RNDN, rnd, MPFR_PREC(x))) - break; - -+ next_loop: - /* update the prec for next loop */ - MPFR_ZIV_NEXT (loop, prec); - } /* loop */ -diff -Naurd mpfr-3.1.1-a/src/version.c mpfr-3.1.1-b/src/version.c ---- mpfr-3.1.1-a/src/version.c 2012-08-30 09:28:51.000000000 +0000 -+++ mpfr-3.1.1-b/src/version.c 2012-08-30 09:35:12.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.1-p1"; -+ return "3.1.1-p2"; - } -diff -Naurd mpfr-3.1.1-a/tests/tstrtofr.c mpfr-3.1.1-b/tests/tstrtofr.c ---- mpfr-3.1.1-a/tests/tstrtofr.c 2012-07-03 15:01:24.000000000 +0000 -+++ mpfr-3.1.1-b/tests/tstrtofr.c 2012-08-30 09:35:12.000000000 +0000 -@@ -1105,6 +1105,92 @@ - mpfr_clear (y); - } - -+/* From a bug reported by Joseph S. Myers -+ https://sympa.inria.fr/sympa/arc/mpfr/2012-08/msg00005.html */ -+static void -+bug20120814 (void) -+{ -+ mpfr_exp_t emin = -30, e; -+ mpfr_t x, y; -+ int r; -+ char s[64], *p; -+ -+ mpfr_init2 (x, 2); -+ mpfr_set_ui_2exp (x, 3, emin - 2, MPFR_RNDN); -+ mpfr_get_str (s + 1, &e, 10, 19, x, MPFR_RNDD); -+ s[0] = s[1]; -+ s[1] = '.'; -+ for (p = s; *p != 0; p++) ; -+ *p = 'e'; -+ sprintf (p + 1, "%d", (int) e - 1); -+ -+ mpfr_init2 (y, 4); -+ r = mpfr_strtofr (y, s, NULL, 0, MPFR_RNDN); -+ if (r <= 0 || ! mpfr_equal_p (x, y)) -+ { -+ printf ("Error in bug20120814\n"); -+ printf ("mpfr_strtofr failed on string \"%s\"\n", s); -+ printf ("Expected inex > 0 and y = 0.1100E%d\n", (int) emin); -+ printf ("Got inex = %-6d and y = ", r); -+ mpfr_dump (y); -+ exit (1); -+ } -+ -+ mpfr_clear (x); -+ mpfr_clear (y); -+} -+ -+static void -+bug20120829 (void) -+{ -+ mpfr_t x1, x2, e; -+ int inex1, inex2, i, r; -+ char s[48] = "1e-1"; -+ -+ mpfr_init2 (e, 128); -+ mpfr_inits2 (4, x1, x2, (mpfr_ptr) 0); -+ -+ inex1 = mpfr_set_si (e, -1, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); -+ -+ for (i = 1; i <= sizeof(s) - 5; i++) -+ { -+ s[3+i] = '0'; -+ s[4+i] = 0; -+ inex1 = mpfr_mul_ui (e, e, 10, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); -+ RND_LOOP(r) -+ { -+ mpfr_rnd_t rnd = (mpfr_rnd_t) r; -+ -+ inex1 = mpfr_exp10 (x1, e, rnd); -+ inex1 = SIGN (inex1); -+ inex2 = mpfr_strtofr (x2, s, NULL, 0, rnd); -+ inex2 = SIGN (inex2); -+ /* On 32-bit machines, for i = 7, r8389, r8391 and r8394 do: -+ strtofr.c:...: MPFR assertion failed: cy == 0 -+ r8396 is OK. -+ On 64-bit machines, for i = 15, -+ r8389 does: strtofr.c:678: MPFR assertion failed: err < (64 - 0) -+ r8391 does: strtofr.c:680: MPFR assertion failed: h < ysize -+ r8394 and r8396 are OK. -+ */ -+ if (! mpfr_equal_p (x1, x2) || inex1 != inex2) -+ { -+ printf ("Error in bug20120829 for i = %d, rnd = %s\n", -+ i, mpfr_print_rnd_mode (rnd)); -+ printf ("Expected inex = %d, x = ", inex1); -+ mpfr_dump (x1); -+ printf ("Got inex = %d, x = ", inex2); -+ mpfr_dump (x2); -+ exit (1); -+ } -+ } -+ } -+ -+ mpfr_clears (e, x1, x2, (mpfr_ptr) 0); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -1117,6 +1203,8 @@ - check_retval (); - bug20081028 (); - test20100310 (); -+ bug20120814 (); -+ bug20120829 (); - - tests_end_mpfr (); - return 0; diff --git a/patches/mpfr/3.1.1/130-gmp51-compat.patch b/patches/mpfr/3.1.1/130-gmp51-compat.patch deleted file mode 100644 index ecf7537..0000000 --- a/patches/mpfr/3.1.1/130-gmp51-compat.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES ---- mpfr-3.1.1-a/PATCHES 2013-02-22 12:17:27.000000000 +0000 -+++ mpfr-3.1.1-b/PATCHES 2013-02-22 12:18:34.000000000 +0000 -@@ -0,0 +1 @@ -+gmp51-compat -diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION ---- mpfr-3.1.1-a/VERSION 2012-08-30 09:35:12.000000000 +0000 -+++ mpfr-3.1.1-b/VERSION 2013-02-22 12:18:20.000000000 +0000 -@@ -1 +1 @@ --3.1.1-p2 -+3.1.1-p3 -diff -Naurd mpfr-3.1.1-a/src/get_f.c mpfr-3.1.1-b/src/get_f.c ---- mpfr-3.1.1-a/src/get_f.c 2012-07-03 15:01:19.000000000 +0000 -+++ mpfr-3.1.1-b/src/get_f.c 2013-02-22 12:18:06.000000000 +0000 -@@ -61,7 +61,7 @@ - - sx = PREC (x); - SIZ (x) = sx; -- xp = LIMBS (x); -+ xp = PTR (x); - for (i = 0; i < sx; i++) - xp[i] = MP_LIMB_T_MAX; - -diff -Naurd mpfr-3.1.1-a/src/mpfr-gmp.h mpfr-3.1.1-b/src/mpfr-gmp.h ---- mpfr-3.1.1-a/src/mpfr-gmp.h 2012-07-03 15:01:16.000000000 +0000 -+++ mpfr-3.1.1-b/src/mpfr-gmp.h 2013-02-22 12:18:06.000000000 +0000 -@@ -163,7 +163,6 @@ - #define SIZ(x) ((x)->_mp_size) - #define ABSIZ(x) ABS (SIZ (x)) - #define PTR(x) ((x)->_mp_d) --#define LIMBS(x) ((x)->_mp_d) - #define EXP(x) ((x)->_mp_exp) - #define PREC(x) ((x)->_mp_prec) - #define ALLOC(x) ((x)->_mp_alloc) -diff -Naurd mpfr-3.1.1-a/src/mpfr.h mpfr-3.1.1-b/src/mpfr.h ---- mpfr-3.1.1-a/src/mpfr.h 2012-08-30 09:35:12.000000000 +0000 -+++ mpfr-3.1.1-b/src/mpfr.h 2013-02-22 12:18:20.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 1 --#define MPFR_VERSION_STRING "3.1.1-p2" -+#define MPFR_VERSION_STRING "3.1.1-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.1-a/src/version.c mpfr-3.1.1-b/src/version.c ---- mpfr-3.1.1-a/src/version.c 2012-08-30 09:35:12.000000000 +0000 -+++ mpfr-3.1.1-b/src/version.c 2013-02-22 12:18:20.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.1-p2"; -+ return "3.1.1-p3"; - } -diff -Naurd mpfr-3.1.1-a/tests/tadd.c mpfr-3.1.1-b/tests/tadd.c ---- mpfr-3.1.1-a/tests/tadd.c 2012-07-03 15:01:24.000000000 +0000 -+++ mpfr-3.1.1-b/tests/tadd.c 2013-02-22 12:18:06.000000000 +0000 -@@ -20,7 +20,7 @@ - http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ - --#define NUM 30000 -+#define N 30000 - - #include <stdio.h> - #include <stdlib.h> -@@ -674,7 +674,7 @@ - - mpfr_init2 (one, MPFR_PREC_MIN); - mpfr_set_ui (one, 1, MPFR_RNDN); -- for (n = 0; n < NUM; n++) -+ for (n = 0; n < N; n++) - { - mpfr_prec_t prec_a, prec_b, prec_c; - mpfr_exp_t tb=0, tc, diff; -diff -Naurd mpfr-3.1.1-a/tests/tgeneric.c mpfr-3.1.1-b/tests/tgeneric.c ---- mpfr-3.1.1-a/tests/tgeneric.c 2012-07-03 15:01:24.000000000 +0000 -+++ mpfr-3.1.1-b/tests/tgeneric.c 2013-02-22 12:18:06.000000000 +0000 -@@ -121,7 +121,7 @@ - #endif - - static void --test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N) -+test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax) - { - mpfr_prec_t prec, xprec, yprec; - mpfr_t x, y, z, t, w; -@@ -155,7 +155,7 @@ - mpfr_set_prec (w, yprec); - - /* Note: in precision p1, we test 4 special cases. */ -- for (n = 0; n < (prec == p1 ? N + 4 : N); n++) -+ for (n = 0; n < (prec == p1 ? nmax + 4 : nmax); n++) - { - int infinite_input = 0; - diff --git a/patches/mpfr/3.1.2/110-exp_2.patch b/patches/mpfr/3.1.2/110-exp_2.patch deleted file mode 100644 index 731ea92..0000000 --- a/patches/mpfr/3.1.2/110-exp_2.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:52:52.000000000 +0000 -@@ -0,0 +1 @@ -+exp_2 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-03-13 15:37:28.000000000 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-09-26 10:52:52.000000000 +0000 -@@ -1 +1 @@ --3.1.2 -+3.1.2-p1 -diff -Naurd mpfr-3.1.2-a/src/exp_2.c mpfr-3.1.2-b/src/exp_2.c ---- mpfr-3.1.2-a/src/exp_2.c 2013-03-13 15:37:28.000000000 +0000 -+++ mpfr-3.1.2-b/src/exp_2.c 2013-09-26 10:52:52.000000000 +0000 -@@ -204,7 +204,7 @@ - for (k = 0; k < K; k++) - { - mpz_mul (ss, ss, ss); -- exps <<= 1; -+ exps *= 2; - exps += mpz_normalize (ss, ss, q); - } - mpfr_set_z (s, ss, MPFR_RNDN); -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-03-13 15:37:37.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2" -+#define MPFR_VERSION_STRING "3.1.2-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-03-13 15:37:34.000000000 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:52:52.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2"; -+ return "3.1.2-p1"; - } diff --git a/patches/mpfr/3.1.2/120-fits-smallneg.patch b/patches/mpfr/3.1.2/120-fits-smallneg.patch deleted file mode 100644 index b229c18..0000000 --- a/patches/mpfr/3.1.2/120-fits-smallneg.patch +++ /dev/null @@ -1,605 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-09-26 10:56:55.000000000 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:56:55.000000000 +0000 -@@ -0,0 +1 @@ -+fits-smallneg -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-09-26 10:56:55.000000000 +0000 -@@ -1 +1 @@ --3.1.2-p1 -+3.1.2-p2 -diff -Naurd mpfr-3.1.2-a/src/fits_u.h mpfr-3.1.2-b/src/fits_u.h ---- mpfr-3.1.2-a/src/fits_u.h 2013-03-13 15:37:35.000000000 +0000 -+++ mpfr-3.1.2-b/src/fits_u.h 2013-09-26 10:56:55.000000000 +0000 -@@ -32,17 +32,20 @@ - int res; - - if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) -- /* Zero always fit */ -- return MPFR_IS_ZERO (f) ? 1 : 0; -- else if (MPFR_IS_NEG (f)) -- /* Negative numbers don't fit */ -- return 0; -- /* now it fits if -- (a) f <= MAXIMUM -- (b) round(f, prec(slong), rnd) <= MAXIMUM */ -+ return MPFR_IS_ZERO (f) ? 1 : 0; /* Zero always fits */ - - e = MPFR_GET_EXP (f); - -+ if (MPFR_IS_NEG (f)) -+ return e >= 1 ? 0 /* f <= -1 does not fit */ -+ : rnd != MPFR_RNDN ? MPFR_IS_LIKE_RNDU (rnd, -1) /* directed mode */ -+ : e < 0 ? 1 /* f > -1/2 fits in MPFR_RNDN */ -+ : mpfr_powerof2_raw(f); /* -1/2 fits, -1 < f < -1/2 don't */ -+ -+ /* Now it fits if -+ (a) f <= MAXIMUM -+ (b) round(f, prec(slong), rnd) <= MAXIMUM */ -+ - /* first compute prec(MAXIMUM); fits in an int */ - for (s = MAXIMUM, prec = 0; s != 0; s /= 2, prec ++); - -diff -Naurd mpfr-3.1.2-a/src/fits_uintmax.c mpfr-3.1.2-b/src/fits_uintmax.c ---- mpfr-3.1.2-a/src/fits_uintmax.c 2013-03-13 15:37:33.000000000 +0000 -+++ mpfr-3.1.2-b/src/fits_uintmax.c 2013-09-26 10:56:55.000000000 +0000 -@@ -27,51 +27,19 @@ - #include "mpfr-intmax.h" - #include "mpfr-impl.h" - --#ifdef _MPFR_H_HAVE_INTMAX_T -- --/* We can't use fits_u.h <= mpfr_cmp_ui */ --int --mpfr_fits_uintmax_p (mpfr_srcptr f, mpfr_rnd_t rnd) --{ -- mpfr_exp_t e; -- int prec; -- uintmax_t s; -- mpfr_t x; -- int res; -- -- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) -- /* Zero always fit */ -- return MPFR_IS_ZERO (f) ? 1 : 0; -- else if (MPFR_IS_NEG (f)) -- /* Negative numbers don't fit */ -- return 0; -- /* now it fits if -- (a) f <= MAXIMUM -- (b) round(f, prec(slong), rnd) <= MAXIMUM */ -- -- e = MPFR_GET_EXP (f); -- -- /* first compute prec(MAXIMUM); fits in an int */ -- for (s = MPFR_UINTMAX_MAX, prec = 0; s != 0; s /= 2, prec ++); -- -- /* MAXIMUM needs prec bits, i.e. MAXIMUM = 2^prec - 1 */ -- -- /* if e <= prec - 1, then f < 2^(prec-1) < MAXIMUM */ -- if (e <= prec - 1) -- return 1; -+/* Note: though mpfr-impl.h is included in fits_u.h, we also include it -+ above so that it gets included even when _MPFR_H_HAVE_INTMAX_T is not -+ defined; this is necessary to avoid an empty translation unit, which -+ is forbidden by ISO C. Without this, a failing test can be reproduced -+ by creating an invalid stdint.h somewhere in the default include path -+ and by compiling MPFR with "gcc -ansi -pedantic-errors". */ - -- /* if e >= prec + 1, then f >= 2^prec > MAXIMUM */ -- if (e >= prec + 1) -- return 0; -+#ifdef _MPFR_H_HAVE_INTMAX_T - -- MPFR_ASSERTD (e == prec); -+#define FUNCTION mpfr_fits_uintmax_p -+#define MAXIMUM MPFR_UINTMAX_MAX -+#define TYPE uintmax_t - -- /* hard case: first round to prec bits, then check */ -- mpfr_init2 (x, prec); -- mpfr_set (x, f, rnd); -- res = MPFR_GET_EXP (x) == e; -- mpfr_clear (x); -- return res; --} -+#include "fits_u.h" - - #endif -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:56:55.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p1" -+#define MPFR_VERSION_STRING "3.1.2-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:56:55.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p1"; -+ return "3.1.2-p2"; - } -diff -Naurd mpfr-3.1.2-a/tests/tfits.c mpfr-3.1.2-b/tests/tfits.c ---- mpfr-3.1.2-a/tests/tfits.c 2013-03-13 15:37:45.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tfits.c 2013-09-26 10:56:55.000000000 +0000 -@@ -33,155 +33,176 @@ - #include "mpfr-intmax.h" - #include "mpfr-test.h" - --#define ERROR1 { printf("Initial error for x="); mpfr_dump(x); exit(1); } --#define ERROR2 { printf("Error for x="); mpfr_dump(x); exit(1); } -+#define ERROR1(N) \ -+ do \ -+ { \ -+ printf("Error %d for rnd = %s and x = ", N, \ -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \ -+ mpfr_dump(x); \ -+ exit(1); \ -+ } \ -+ while (0) - - static void check_intmax (void); - - int - main (void) - { -- mpfr_t x; -+ mpfr_t x, y; -+ int i, r; - - tests_start_mpfr (); - - mpfr_init2 (x, 256); -+ mpfr_init2 (y, 8); - -- /* Check NAN */ -- mpfr_set_nan (x); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR1; -+ RND_LOOP (r) -+ { - -- /* Check INF */ -- mpfr_set_inf (x, 1); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check NAN */ -+ mpfr_set_nan (x); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (1); -+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (2); -+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (3); -+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (4); -+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (5); -+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (6); - -- /* Check Zero */ -- MPFR_SET_ZERO (x); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check INF */ -+ mpfr_set_inf (x, 1); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (7); -+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (8); -+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (9); -+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (10); -+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (11); -+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (12); - -- /* Check small op */ -- mpfr_set_str1 (x, "1@-1"); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check Zero */ -+ MPFR_SET_ZERO (x); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (13); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (14); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (15); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (16); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (17); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (18); - -- /* Check 17 */ -- mpfr_set_ui (x, 17, MPFR_RNDN); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check small positive op */ -+ mpfr_set_str1 (x, "1@-1"); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (19); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (20); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (21); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (22); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (23); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (24); - -- /* Check all other values */ -- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -- mpfr_mul_2exp (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR1; -- mpfr_mul_2exp (x, x, 40, MPFR_RNDN); -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check 17 */ -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (25); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (26); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (27); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (28); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (29); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (30); - -- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, LONG_MAX, MPFR_RNDN); -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, UINT_MAX, MPFR_RNDN); -- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, INT_MAX, MPFR_RNDN); -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN); -- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN); -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check all other values */ -+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -+ mpfr_mul_2exp (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (31); -+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (32); -+ mpfr_mul_2exp (x, x, 40, MPFR_RNDN); -+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (33); -+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (34); -+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (35); -+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (36); -+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (37); - -- mpfr_set_si (x, 1, MPFR_RNDN); -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (38); -+ mpfr_set_ui (x, LONG_MAX, MPFR_RNDN); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (39); -+ mpfr_set_ui (x, UINT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (40); -+ mpfr_set_ui (x, INT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (41); -+ mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (42); -+ mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (43); - -- /* Check negative value */ -- mpfr_set_si (x, -1, MPFR_RNDN); -- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) -- ERROR2; -- if (mpfr_fits_uint_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) -- ERROR1; -+ mpfr_set_si (x, 1, MPFR_RNDN); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (44); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (45); -+ -+ /* Check negative op */ -+ for (i = 1; i <= 4; i++) -+ { -+ int inv; -+ -+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); -+ mpfr_rint (y, x, (mpfr_rnd_t) r); -+ inv = MPFR_NOTZERO (y); -+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (46); -+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (47); -+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (48); -+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (49); -+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (50); -+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (51); -+ } -+ } - - mpfr_clear (x); -+ mpfr_clear (y); - - check_intmax (); - -@@ -189,85 +210,98 @@ - return 0; - } - --static void check_intmax (void) -+static void -+check_intmax (void) - { - #ifdef _MPFR_H_HAVE_INTMAX_T -- mpfr_t x; -+ mpfr_t x, y; -+ int i, r; - -- mpfr_init2 (x, sizeof (uintmax_t)*CHAR_BIT); -+ mpfr_init2 (x, sizeof (uintmax_t) * CHAR_BIT); -+ mpfr_init2 (y, 8); - -- /* Check NAN */ -- mpfr_set_nan (x); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ RND_LOOP (r) -+ { -+ /* Check NAN */ -+ mpfr_set_nan (x); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (52); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (53); - -- /* Check INF */ -- mpfr_set_inf (x, 1); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check INF */ -+ mpfr_set_inf (x, 1); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (54); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (55); - -- /* Check Zero */ -- MPFR_SET_ZERO (x); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check Zero */ -+ MPFR_SET_ZERO (x); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (56); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (57); - -- /* Check small op */ -- mpfr_set_str1 (x, "1@-1"); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check positive small op */ -+ mpfr_set_str1 (x, "1@-1"); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (58); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (59); - -- /* Check 17 */ -- mpfr_set_ui (x, 17, MPFR_RNDN); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -+ /* Check 17 */ -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (60); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (61); - -- /* Check hugest */ -- mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check hugest */ -+ mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (62); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (63); - -- /* Check all other values */ -- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -- mpfr_add_ui (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -- mpfr_add_ui (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN); -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -- mpfr_sub_ui (x, x, 1, MPFR_RNDN); -- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check all other values */ -+ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -+ mpfr_add_ui (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (64); -+ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (65); -+ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -+ mpfr_add_ui (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (66); -+ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (67); -+ mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (68); -+ mpfr_sub_ui (x, x, 1, MPFR_RNDN); -+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (69); - -- /* Check negative value */ -- mpfr_set_si (x, -1, MPFR_RNDN); -- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) -- ERROR2; -- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) -- ERROR1; -+ /* Check negative op */ -+ for (i = 1; i <= 4; i++) -+ { -+ int inv; -+ -+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); -+ mpfr_rint (y, x, (mpfr_rnd_t) r); -+ inv = MPFR_NOTZERO (y); -+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r) ^ inv) -+ ERROR1 (70); -+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) -+ ERROR1 (71); -+ } -+ } - - mpfr_clear (x); -+ mpfr_clear (y); - #endif - } -- diff --git a/patches/mpfr/3.1.2/130-clang-divby0.patch b/patches/mpfr/3.1.2/130-clang-divby0.patch deleted file mode 100644 index 8e0cd8e..0000000 --- a/patches/mpfr/3.1.2/130-clang-divby0.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-10-09 13:34:21.000000000 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-10-09 13:34:21.000000000 +0000 -@@ -0,0 +1 @@ -+clang-divby0 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-10-09 13:34:21.000000000 +0000 -@@ -1 +1 @@ --3.1.2-p2 -+3.1.2-p3 -diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h ---- mpfr-3.1.2-a/src/mpfr-impl.h 2013-03-13 15:37:36.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000 -@@ -468,8 +468,16 @@ - #define MPFR_LIMBS_PER_FLT ((IEEE_FLT_MANT_DIG-1)/GMP_NUMB_BITS+1) - - /* Visual C++ doesn't support +1.0/0.0, -1.0/0.0 and 0.0/0.0 -- at compile time. */ --#if defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200) -+ at compile time. -+ Clang with -fsanitize=undefined is a bit similar due to a bug: -+ http://llvm.org/bugs/show_bug.cgi?id=17381 -+ but even without its sanitizer, it may be better to use the -+ double_zero version until IEEE 754 division by zero is properly -+ supported: -+ http://llvm.org/bugs/show_bug.cgi?id=17000 -+*/ -+#if (defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)) || \ -+ defined(__clang__) - static double double_zero = 0.0; - # define DBL_NAN (double_zero/double_zero) - # define DBL_POS_INF ((double) 1.0/double_zero) -@@ -501,6 +509,8 @@ - (with Xcode 2.4.1, i.e. the latest one). */ - #define LVALUE(x) (&(x) == &(x) || &(x) != &(x)) - #define DOUBLE_ISINF(x) (LVALUE(x) && ((x) > DBL_MAX || (x) < -DBL_MAX)) -+/* The DOUBLE_ISNAN(x) macro is also valid on long double x -+ (assuming that the compiler isn't too broken). */ - #ifdef MPFR_NANISNAN - /* Avoid MIPSpro / IRIX64 / gcc -ffast-math (incorrect) optimizations. - The + must not be replaced by a ||. With gcc -ffast-math, NaN is -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-10-09 13:34:21.000000000 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p2" -+#define MPFR_VERSION_STRING "3.1.2-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-10-09 13:34:21.000000000 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p2"; -+ return "3.1.2-p3"; - } -diff -Naurd mpfr-3.1.2-a/tests/tget_flt.c mpfr-3.1.2-b/tests/tget_flt.c ---- mpfr-3.1.2-a/tests/tget_flt.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tget_flt.c 2013-10-09 13:34:21.000000000 +0000 -@@ -28,9 +28,17 @@ - main (void) - { - mpfr_t x, y; -- float f, g, infp; -+ float f, g; - int i; -+#if !defined(MPFR_ERRDIVZERO) -+ float infp; -+#endif -+ -+ tests_start_mpfr (); - -+#if !defined(MPFR_ERRDIVZERO) -+ /* The definition of DBL_POS_INF involves a division by 0. This makes -+ "clang -O2 -fsanitize=undefined -fno-sanitize-recover" fail. */ - infp = (float) DBL_POS_INF; - if (infp * 0.5 != infp) - { -@@ -38,8 +46,7 @@ - fprintf (stderr, "(this is probably a compiler bug, please report)\n"); - exit (1); - } -- -- tests_start_mpfr (); -+#endif - - mpfr_init2 (x, 24); - mpfr_init2 (y, 24); -@@ -353,6 +360,7 @@ - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } -+#if !defined(MPFR_ERRDIVZERO) - f = mpfr_get_flt (x, MPFR_RNDN); /* first round to 2^128 (even rule), - thus we should get +Inf */ - g = infp; -@@ -376,6 +384,7 @@ - printf ("expected %.8e, got %.8e\n", g, f); - exit (1); - } -+#endif - - mpfr_clear (x); - mpfr_clear (y); -diff -Naurd mpfr-3.1.2-a/tests/tset_ld.c mpfr-3.1.2-b/tests/tset_ld.c ---- mpfr-3.1.2-a/tests/tset_ld.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tset_ld.c 2013-10-09 13:34:21.000000000 +0000 -@@ -47,8 +47,11 @@ - static int - Isnan_ld (long double d) - { -- double e = (double) d; -- if (DOUBLE_ISNAN (e)) -+ /* Do not convert d to double as this can give an overflow, which -+ may confuse compilers without IEEE 754 support (such as clang -+ -fsanitize=undefined), or trigger a trap if enabled. -+ The DOUBLE_ISNAN macro should work fine on long double. */ -+ if (DOUBLE_ISNAN (d)) - return 1; - LONGDOUBLE_NAN_ACTION (d, goto yes); - return 0; diff --git a/patches/mpfr/3.1.2/140-printf-alt0.patch b/patches/mpfr/3.1.2/140-printf-alt0.patch deleted file mode 100644 index 2451f36..0000000 --- a/patches/mpfr/3.1.2/140-printf-alt0.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-11-15 00:51:49.323334999 +0000 -@@ -0,0 +1 @@ -+printf-alt0 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-11-15 00:51:49.323334999 +0000 -@@ -1 +1 @@ --3.1.2-p3 -+3.1.2-p4 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-11-15 00:51:49.323334999 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p3" -+#define MPFR_VERSION_STRING "3.1.2-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c ---- mpfr-3.1.2-a/src/vasprintf.c 2013-03-13 15:37:37.000000000 +0000 -+++ mpfr-3.1.2-b/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 -@@ -1040,7 +1040,7 @@ - } - - /* Determine the different parts of the string representation of the regular -- number P when SPEC.SPEC is 'e', 'E', 'g', or 'G'. -+ number P when spec.spec is 'e', 'E', 'g', or 'G'. - DEC_INFO contains the previously computed exponent and string or is NULL. - - return -1 if some field > INT_MAX */ -@@ -1167,7 +1167,7 @@ - } - - /* Determine the different parts of the string representation of the regular -- number P when SPEC.SPEC is 'f', 'F', 'g', or 'G'. -+ number P when spec.spec is 'f', 'F', 'g', or 'G'. - DEC_INFO contains the previously computed exponent and string or is NULL. - - return -1 if some field of number_parts is greater than INT_MAX */ -@@ -1559,7 +1559,7 @@ - /* fractional part */ - { - np->point = MPFR_DECIMAL_POINT; -- np->fp_trailing_zeros = (spec.spec == 'g' && spec.spec == 'G') ? -+ np->fp_trailing_zeros = (spec.spec == 'g' || spec.spec == 'G') ? - spec.prec - 1 : spec.prec; - } - else if (spec.alt) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-11-15 00:51:49.211333830 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-11-15 00:51:49.323334999 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p3"; -+ return "3.1.2-p4"; - } -diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c ---- mpfr-3.1.2-a/tests/tsprintf.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 -@@ -456,10 +456,16 @@ - check_sprintf ("1.999900 ", "%-#10.7RG", x); - check_sprintf ("1.9999 ", "%-10.7RG", x); - mpfr_set_ui (x, 1, MPFR_RNDN); -+ check_sprintf ("1.", "%#.1Rg", x); -+ check_sprintf ("1. ", "%-#5.1Rg", x); -+ check_sprintf (" 1.0", "%#5.2Rg", x); - check_sprintf ("1.00000000000000000000000000000", "%#.30Rg", x); - check_sprintf ("1", "%.30Rg", x); - mpfr_set_ui (x, 0, MPFR_RNDN); -- check_sprintf ("0.000000000000000000000000000000", "%#.30Rg", x); -+ check_sprintf ("0.", "%#.1Rg", x); -+ check_sprintf ("0. ", "%-#5.1Rg", x); -+ check_sprintf (" 0.0", "%#5.2Rg", x); -+ check_sprintf ("0.00000000000000000000000000000", "%#.30Rg", x); - check_sprintf ("0", "%.30Rg", x); - - /* following tests with precision 53 bits */ diff --git a/patches/mpfr/3.1.2/150-custom_init_set.patch b/patches/mpfr/3.1.2/150-custom_init_set.patch deleted file mode 100644 index 669b91d..0000000 --- a/patches/mpfr/3.1.2/150-custom_init_set.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2013-12-01 11:07:49.575329762 +0000 -+++ mpfr-3.1.2-b/PATCHES 2013-12-01 11:07:49.751331625 +0000 -@@ -0,0 +1 @@ -+custom_init_set -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2013-12-01 11:07:49.571329714 +0000 -+++ mpfr-3.1.2-b/VERSION 2013-12-01 11:07:49.747331585 +0000 -@@ -1 +1 @@ --3.1.2-p4 -+3.1.2-p5 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2013-12-01 11:07:49.571329714 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2013-12-01 11:07:49.747331585 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p4" -+#define MPFR_VERSION_STRING "3.1.2-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -@@ -861,7 +861,7 @@ - _t = (mpfr_kind_t) _k; \ - _s = 1; \ - } else { \ -- _t = (mpfr_kind_t) -k; \ -+ _t = (mpfr_kind_t) - _k; \ - _s = -1; \ - } \ - _e = _t == MPFR_REGULAR_KIND ? (e) : \ -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2013-12-01 11:07:49.575329762 +0000 -+++ mpfr-3.1.2-b/src/version.c 2013-12-01 11:07:49.747331585 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p4"; -+ return "3.1.2-p5"; - } diff --git a/patches/mpfr/3.1.2/160-li2-return.patch b/patches/mpfr/3.1.2/160-li2-return.patch deleted file mode 100644 index 50cd04d..0000000 --- a/patches/mpfr/3.1.2/160-li2-return.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-04-15 21:56:49.697059857 +0000 -@@ -0,0 +1 @@ -+li2-return -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-04-15 21:56:49.697059857 +0000 -@@ -1 +1 @@ --3.1.2-p5 -+3.1.2-p6 -diff -Naurd mpfr-3.1.2-a/src/li2.c mpfr-3.1.2-b/src/li2.c ---- mpfr-3.1.2-a/src/li2.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/li2.c 2014-04-15 21:56:49.653058661 +0000 -@@ -630,5 +630,5 @@ - return mpfr_check_range (y, inexact, rnd_mode); - } - -- MPFR_ASSERTN (0); /* should never reach this point */ -+ MPFR_RET_NEVER_GO_HERE (); - } -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 21:56:49.697059857 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p5" -+#define MPFR_VERSION_STRING "3.1.2-p6" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-04-15 21:56:49.609057464 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-04-15 21:56:49.697059857 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p5"; -+ return "3.1.2-p6"; - } diff --git a/patches/mpfr/3.1.2/170-exp3.patch b/patches/mpfr/3.1.2/170-exp3.patch deleted file mode 100644 index 378c3bf..0000000 --- a/patches/mpfr/3.1.2/170-exp3.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-04-15 22:04:57.090286262 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:04:57.162288198 +0000 -@@ -0,0 +1 @@ -+exp3 -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-04-15 22:04:57.086286154 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:04:57.162288198 +0000 -@@ -1 +1 @@ --3.1.2-p6 -+3.1.2-p7 -diff -Naurd mpfr-3.1.2-a/src/exp3.c mpfr-3.1.2-b/src/exp3.c ---- mpfr-3.1.2-a/src/exp3.c 2013-03-13 15:37:34.000000000 +0000 -+++ mpfr-3.1.2-b/src/exp3.c 2014-04-15 22:04:57.126287230 +0000 -@@ -283,7 +283,7 @@ - } - } - -- if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDD, MPFR_RNDZ, -+ if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDN, MPFR_RNDZ, - MPFR_PREC(y) + (rnd_mode == MPFR_RNDN))) - { - inexact = mpfr_set (y, shift_x > 0 ? t : tmp, rnd_mode); -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:04:57.086286154 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:04:57.162288198 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p6" -+#define MPFR_VERSION_STRING "3.1.2-p7" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-04-15 22:04:57.090286262 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:04:57.162288198 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p6"; -+ return "3.1.2-p7"; - } -diff -Naurd mpfr-3.1.2-a/tests/texp.c mpfr-3.1.2-b/tests/texp.c ---- mpfr-3.1.2-a/tests/texp.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/texp.c 2014-04-15 22:04:57.126287230 +0000 -@@ -150,6 +150,22 @@ - exit (1); - } - -+ mpfr_set_prec (x, 118); -+ mpfr_set_str_binary (x, "0.1110010100011101010000111110011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E-86"); -+ mpfr_set_prec (y, 118); -+ mpfr_exp_2 (y, x, MPFR_RNDU); -+ mpfr_exp_3 (x, x, MPFR_RNDU); -+ if (mpfr_cmp (x, y)) -+ { -+ printf ("mpfr_exp_2 and mpfr_exp_3 differ for prec=118\n"); -+ printf ("mpfr_exp_2 gives "); -+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN); -+ printf ("\nmpfr_exp_3 gives "); -+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ - mpfr_clear (x); - mpfr_clear (y); - return 0; diff --git a/patches/mpfr/3.1.2/180-gmp6-compat.patch b/patches/mpfr/3.1.2/180-gmp6-compat.patch deleted file mode 100644 index 2245c7c..0000000 --- a/patches/mpfr/3.1.2/180-gmp6-compat.patch +++ /dev/null @@ -1,254 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-04-15 22:20:32.243481506 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:22:32.418722707 +0000 -@@ -0,0 +1 @@ -+gmp6-compat -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-04-15 22:20:20.755171478 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:21:45.225450147 +0000 -@@ -1 +1 @@ --3.1.2-p7 -+3.1.2-p8 -diff -Naurd mpfr-3.1.2-a/configure mpfr-3.1.2-b/configure ---- mpfr-3.1.2-a/configure 2013-03-13 15:38:20.000000000 +0000 -+++ mpfr-3.1.2-b/configure 2014-04-15 22:21:38.821277476 +0000 -@@ -14545,26 +14545,30 @@ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --if test "$use_gmp_build" = yes ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid GMP_NUMB_BITS" >&5 --$as_echo_n "checking for valid GMP_NUMB_BITS... " >&6; } -- if test "$cross_compiling" = yes; then : -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency" >&5 -+$as_echo_n "checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... " >&6; } -+if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't test" >&5 - $as_echo "can't test" >&6; } - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+#include <stdio.h> - #include <limits.h> - #include "gmp.h" --#include "gmp-impl.h" - - int - main () - { - -- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT -- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; -+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT) -+ return 0; -+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS); -+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t)); -+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n", -+ (long) (sizeof(mp_limb_t) * CHAR_BIT)); -+ return 1; - - ; - return 0; -@@ -14577,14 +14581,14 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- as_fn_error $? "GMP_NUMB_BITS is incorrect. --You probably need to change some of the GMP or MPFR compile options." "$LINENO" 5 -+ as_fn_error $? "GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. -+You probably need to change some of the GMP or MPFR compile options. -+See 'config.log' for details (search for GMP_NUMB_BITS)." "$LINENO" 5 - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - --fi - - - if test "$dont_link_with_gmp" = yes ; then -diff -Naurd mpfr-3.1.2-a/configure.ac mpfr-3.1.2-b/configure.ac ---- mpfr-3.1.2-a/configure.ac 2013-03-13 15:37:46.000000000 +0000 -+++ mpfr-3.1.2-b/configure.ac 2013-03-13 15:37:46.000000000 +0000 -@@ -435,23 +435,29 @@ - ]) - fi - --dnl Check for valid GMP_NUMB_BITS and BYTES_PER_MP_LIMB -+dnl Check for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency. -+dnl Problems may occur if gmp.h was generated with some ABI -+dnl and is used with another ABI (or if nails are used). - dnl This test doesn't need to link with libgmp (at least it shouldn't). --if test "$use_gmp_build" = yes ; then -- AC_MSG_CHECKING(for valid GMP_NUMB_BITS) -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+AC_MSG_CHECKING(for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency) -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+#include <stdio.h> - #include <limits.h> - #include "gmp.h" --#include "gmp-impl.h" - ]], [[ -- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT -- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1; -+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT) -+ return 0; -+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS); -+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t)); -+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n", -+ (long) (sizeof(mp_limb_t) * CHAR_BIT)); -+ return 1; - ]])], [AC_MSG_RESULT(yes)], [ - AC_MSG_RESULT(no) -- AC_MSG_ERROR([GMP_NUMB_BITS is incorrect. --You probably need to change some of the GMP or MPFR compile options.])], -+ AC_MSG_ERROR([GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. -+You probably need to change some of the GMP or MPFR compile options. -+See 'config.log' for details (search for GMP_NUMB_BITS).])], - [AC_MSG_RESULT([can't test])]) --fi - - - dnl We really need to link using libtool. But it is impossible with the current -diff -Naurd mpfr-3.1.2-a/src/init2.c mpfr-3.1.2-b/src/init2.c ---- mpfr-3.1.2-a/src/init2.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/init2.c 2014-04-15 22:21:06.220398489 +0000 -@@ -30,11 +30,11 @@ - - /* Check if we can represent the number of limbs - * associated to the maximum of mpfr_prec_t*/ -- MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/BYTES_PER_MP_LIMB) ); -+ MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/MPFR_BYTES_PER_MP_LIMB) ); - -- /* Check for correct GMP_NUMB_BITS and BYTES_PER_MP_LIMB */ -- MPFR_ASSERTN( GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT -- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ); -+ /* Check for correct GMP_NUMB_BITS and MPFR_BYTES_PER_MP_LIMB */ -+ MPFR_ASSERTN( GMP_NUMB_BITS == MPFR_BYTES_PER_MP_LIMB * CHAR_BIT -+ && sizeof(mp_limb_t) == MPFR_BYTES_PER_MP_LIMB ); - - MPFR_ASSERTN (mp_bits_per_limb == GMP_NUMB_BITS); - -diff -Naurd mpfr-3.1.2-a/src/mpfr-gmp.h mpfr-3.1.2-b/src/mpfr-gmp.h ---- mpfr-3.1.2-a/src/mpfr-gmp.h 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr-gmp.h 2014-04-15 22:21:06.220398489 +0000 -@@ -72,7 +72,6 @@ - #endif - - /* Define some macros */ --#define BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT) - - #define MP_LIMB_T_MAX (~(mp_limb_t)0) - -@@ -96,19 +95,19 @@ - #define SHRT_HIGHBIT SHRT_MIN - - /* MP_LIMB macros */ --#define MPN_ZERO(dst, n) memset((dst), 0, (n)*BYTES_PER_MP_LIMB) --#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB) --#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB) -+#define MPN_ZERO(dst, n) memset((dst), 0, (n)*MPFR_BYTES_PER_MP_LIMB) -+#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB) -+#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB) - #define MPN_COPY(dst,src,n) \ - do \ - { \ - if ((dst) != (src)) \ - { \ - MPFR_ASSERTD ((char *) (dst) >= (char *) (src) + \ -- (n) * BYTES_PER_MP_LIMB || \ -+ (n) * MPFR_BYTES_PER_MP_LIMB || \ - (char *) (src) >= (char *) (dst) + \ -- (n) * BYTES_PER_MP_LIMB); \ -- memcpy ((dst), (src), (n) * BYTES_PER_MP_LIMB); \ -+ (n) * MPFR_BYTES_PER_MP_LIMB); \ -+ memcpy ((dst), (src), (n) * MPFR_BYTES_PER_MP_LIMB); \ - } \ - } \ - while (0) -diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h ---- mpfr-3.1.2-a/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000 -+++ mpfr-3.1.2-b/src/mpfr-impl.h 2014-04-15 22:21:06.220398489 +0000 -@@ -191,7 +191,7 @@ - # endif - #endif - -- -+#define MPFR_BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT) - - /****************************************************** - ******************** Check GMP *********************** -@@ -930,7 +930,7 @@ - #define MPFR_SET_ALLOC_SIZE(x, n) \ - ( ((mp_size_t*) MPFR_MANT(x))[-1] = n) - #define MPFR_MALLOC_SIZE(s) \ -- ( sizeof(mpfr_size_limb_t) + BYTES_PER_MP_LIMB * ((size_t) s) ) -+ ( sizeof(mpfr_size_limb_t) + MPFR_BYTES_PER_MP_LIMB * ((size_t) s) ) - #define MPFR_SET_MANT_PTR(x,p) \ - (MPFR_MANT(x) = (mp_limb_t*) ((mpfr_size_limb_t*) p + 1)) - #define MPFR_GET_REAL_PTR(x) \ -@@ -964,7 +964,7 @@ - #endif - - #define MPFR_TMP_LIMBS_ALLOC(N) \ -- ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * BYTES_PER_MP_LIMB)) -+ ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * MPFR_BYTES_PER_MP_LIMB)) - - /* temporary allocate 1 limb at xp, and initialize mpfr variable x */ - /* The temporary var doesn't have any size field, but it doesn't matter -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:20:20.755171478 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:21:45.225450147 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p7" -+#define MPFR_VERSION_STRING "3.1.2-p8" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/mul.c mpfr-3.1.2-b/src/mul.c ---- mpfr-3.1.2-a/src/mul.c 2013-03-13 15:37:37.000000000 +0000 -+++ mpfr-3.1.2-b/src/mul.c 2014-04-15 22:21:06.224398597 +0000 -@@ -106,7 +106,7 @@ - MPFR_ASSERTD(tn <= k); - - /* Check for no size_t overflow*/ -- MPFR_ASSERTD((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB); -+ MPFR_ASSERTD((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB); - MPFR_TMP_MARK(marker); - tmp = MPFR_TMP_LIMBS_ALLOC (k); - -@@ -301,7 +301,7 @@ - MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */ - - /* Check for no size_t overflow*/ -- MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB); -+ MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB); - MPFR_TMP_MARK (marker); - tmp = MPFR_TMP_LIMBS_ALLOC (k); - -diff -Naurd mpfr-3.1.2-a/src/stack_interface.c mpfr-3.1.2-b/src/stack_interface.c ---- mpfr-3.1.2-a/src/stack_interface.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/stack_interface.c 2014-04-15 22:21:06.220398489 +0000 -@@ -26,7 +26,7 @@ - size_t - mpfr_custom_get_size (mpfr_prec_t prec) - { -- return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB; -+ return MPFR_PREC2LIMBS (prec) * MPFR_BYTES_PER_MP_LIMB; - } - - #undef mpfr_custom_init -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-04-15 22:20:20.755171478 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:21:45.225450147 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p7"; -+ return "3.1.2-p8"; - } diff --git a/patches/mpfr/3.1.2/190-div-overflow.patch b/patches/mpfr/3.1.2/190-div-overflow.patch deleted file mode 100644 index 6ff7c4a..0000000 --- a/patches/mpfr/3.1.2/190-div-overflow.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-06-30 15:15:25.533266905 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:15:25.617269178 +0000 -@@ -0,0 +1 @@ -+div-overflow -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-06-30 15:15:25.529266797 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:15:25.617269178 +0000 -@@ -1 +1 @@ --3.1.2-p8 -+3.1.2-p9 -diff -Naurd mpfr-3.1.2-a/src/div.c mpfr-3.1.2-b/src/div.c ---- mpfr-3.1.2-a/src/div.c 2013-03-13 15:37:33.000000000 +0000 -+++ mpfr-3.1.2-b/src/div.c 2014-06-30 15:15:25.585268312 +0000 -@@ -750,7 +750,9 @@ - truncate_check_qh: - if (qh) - { -- qexp ++; -+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) -+ qexp ++; -+ /* else qexp is now incorrect, but one will still get an overflow */ - q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; - } - goto truncate; -@@ -765,7 +767,9 @@ - inex = 1; /* always here */ - if (mpn_add_1 (q0p, q0p, q0size, MPFR_LIMB_ONE << sh)) - { -- qexp ++; -+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) -+ qexp ++; -+ /* else qexp is now incorrect, but one will still get an overflow */ - q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; - } - -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:15:25.533266905 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:15:25.613269070 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p8" -+#define MPFR_VERSION_STRING "3.1.2-p9" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-06-30 15:15:25.533266905 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:15:25.613269070 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p8"; -+ return "3.1.2-p9"; - } -diff -Naurd mpfr-3.1.2-a/tests/tdiv.c mpfr-3.1.2-b/tests/tdiv.c ---- mpfr-3.1.2-a/tests/tdiv.c 2013-03-13 15:37:44.000000000 +0000 -+++ mpfr-3.1.2-b/tests/tdiv.c 2014-06-30 15:15:25.585268312 +0000 -@@ -1104,6 +1104,96 @@ - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) - #include "tgeneric.c" - -+static void -+test_extreme (void) -+{ -+ mpfr_t x, y, z; -+ mpfr_exp_t emin, emax; -+ mpfr_prec_t p[4] = { 8, 32, 64, 256 }; -+ int xi, yi, zi, j, r; -+ unsigned int flags, ex_flags; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ mpfr_set_emin (MPFR_EMIN_MIN); -+ mpfr_set_emax (MPFR_EMAX_MAX); -+ -+ for (xi = 0; xi < 4; xi++) -+ { -+ mpfr_init2 (x, p[xi]); -+ mpfr_setmax (x, MPFR_EMAX_MAX); -+ MPFR_ASSERTN (mpfr_check (x)); -+ for (yi = 0; yi < 4; yi++) -+ { -+ mpfr_init2 (y, p[yi]); -+ mpfr_setmin (y, MPFR_EMIN_MIN); -+ for (j = 0; j < 2; j++) -+ { -+ MPFR_ASSERTN (mpfr_check (y)); -+ for (zi = 0; zi < 4; zi++) -+ { -+ mpfr_init2 (z, p[zi]); -+ RND_LOOP (r) -+ { -+ mpfr_clear_flags (); -+ mpfr_div (z, x, y, (mpfr_rnd_t) r); -+ flags = __gmpfr_flags; -+ MPFR_ASSERTN (mpfr_check (z)); -+ ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; -+ if (flags != ex_flags) -+ { -+ printf ("Bad flags in test_extreme on z = a/b" -+ " with %s and\n", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); -+ printf ("a = "); -+ mpfr_dump (x); -+ printf ("b = "); -+ mpfr_dump (y); -+ printf ("Expected flags:"); -+ flags_out (ex_flags); -+ printf ("Got flags: "); -+ flags_out (flags); -+ printf ("z = "); -+ mpfr_dump (z); -+ exit (1); -+ } -+ mpfr_clear_flags (); -+ mpfr_div (z, y, x, (mpfr_rnd_t) r); -+ flags = __gmpfr_flags; -+ MPFR_ASSERTN (mpfr_check (z)); -+ ex_flags = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; -+ if (flags != ex_flags) -+ { -+ printf ("Bad flags in test_extreme on z = a/b" -+ " with %s and\n", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); -+ printf ("a = "); -+ mpfr_dump (y); -+ printf ("b = "); -+ mpfr_dump (x); -+ printf ("Expected flags:"); -+ flags_out (ex_flags); -+ printf ("Got flags: "); -+ flags_out (flags); -+ printf ("z = "); -+ mpfr_dump (z); -+ exit (1); -+ } -+ } -+ mpfr_clear (z); -+ } /* zi */ -+ mpfr_nextabove (y); -+ } /* j */ -+ mpfr_clear (y); -+ } /* yi */ -+ mpfr_clear (x); -+ } /* xi */ -+ -+ set_emin (emin); -+ set_emax (emax); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -1130,6 +1220,7 @@ - test_20070603 (); - test_20070628 (); - test_generic (2, 800, 50); -+ test_extreme (); - - tests_end_mpfr (); - return 0; diff --git a/patches/mpfr/3.1.2/200-vasprintf.patch b/patches/mpfr/3.1.2/200-vasprintf.patch deleted file mode 100644 index 43848f7..0000000 --- a/patches/mpfr/3.1.2/200-vasprintf.patch +++ /dev/null @@ -1,138 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:17:53.417270314 +0000 -@@ -0,0 +1 @@ -+vasprintf -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:17:53.413270206 +0000 -@@ -1 +1 @@ --3.1.2-p9 -+3.1.2-p10 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:17:53.413270206 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p9" -+#define MPFR_VERSION_STRING "3.1.2-p10" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c ---- mpfr-3.1.2-a/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 -+++ mpfr-3.1.2-b/src/vasprintf.c 2014-06-30 15:17:53.377269231 +0000 -@@ -884,14 +884,18 @@ - first digit, we want the exponent for radix two and the decimal - point AFTER the first digit. */ - { -- MPFR_ASSERTN (exp > MPFR_EMIN_MIN /4); /* possible overflow */ -+ /* An integer overflow is normally not possible since MPFR_EXP_MIN -+ is twice as large as MPFR_EMIN_MIN. */ -+ MPFR_ASSERTN (exp > (MPFR_EXP_MIN + 3) / 4); - exp = (exp - 1) * 4; - } - else - /* EXP is the exponent for decimal point BEFORE the first digit, we - want the exponent for decimal point AFTER the first digit. */ - { -- MPFR_ASSERTN (exp > MPFR_EMIN_MIN); /* possible overflow */ -+ /* An integer overflow is normally not possible since MPFR_EXP_MIN -+ is twice as large as MPFR_EMIN_MIN. */ -+ MPFR_ASSERTN (exp > MPFR_EXP_MIN); - --exp; - } - } -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-06-30 15:17:53.337268149 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:17:53.413270206 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p9"; -+ return "3.1.2-p10"; - } -diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c ---- mpfr-3.1.2-a/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 -+++ mpfr-3.1.2-b/tests/tsprintf.c 2014-06-30 15:17:53.377269231 +0000 -@@ -1184,6 +1184,69 @@ - check_emax_aux (MPFR_EMAX_MAX); - } - -+static void -+check_emin_aux (mpfr_exp_t e) -+{ -+ mpfr_t x; -+ char *s1, s2[256]; -+ int i; -+ mpfr_exp_t emin; -+ mpz_t ee; -+ -+ MPFR_ASSERTN (e >= LONG_MIN); -+ emin = mpfr_get_emin (); -+ set_emin (e); -+ -+ mpfr_init2 (x, 16); -+ mpz_init (ee); -+ -+ mpfr_setmin (x, e); -+ mpz_set_si (ee, e); -+ mpz_sub_ui (ee, ee, 1); -+ -+ i = mpfr_asprintf (&s1, "%Ra", x); -+ MPFR_ASSERTN (i > 0); -+ -+ gmp_snprintf (s2, 256, "0x1p%Zd", ee); -+ -+ if (strcmp (s1, s2) != 0) -+ { -+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e); -+ printf ("Expected %s\n", s2); -+ printf ("Got %s\n", s1); -+ exit (1); -+ } -+ -+ mpfr_free_str (s1); -+ -+ i = mpfr_asprintf (&s1, "%Rb", x); -+ MPFR_ASSERTN (i > 0); -+ -+ gmp_snprintf (s2, 256, "1p%Zd", ee); -+ -+ if (strcmp (s1, s2) != 0) -+ { -+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e); -+ printf ("Expected %s\n", s2); -+ printf ("Got %s\n", s1); -+ exit (1); -+ } -+ -+ mpfr_free_str (s1); -+ -+ mpfr_clear (x); -+ mpz_clear (ee); -+ set_emin (emin); -+} -+ -+static void -+check_emin (void) -+{ -+ check_emin_aux (-15); -+ check_emin_aux (mpfr_get_emin ()); -+ check_emin_aux (MPFR_EMIN_MIN); -+} -+ - int - main (int argc, char **argv) - { -@@ -1203,6 +1266,7 @@ - decimal (); - mixed (); - check_emax (); -+ check_emin (); - - #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) - locale_da_DK (); diff --git a/patches/mpfr/3.1.2/210-strtofr.patch b/patches/mpfr/3.1.2/210-strtofr.patch deleted file mode 100644 index 462162e..0000000 --- a/patches/mpfr/3.1.2/210-strtofr.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES ---- mpfr-3.1.2-a/PATCHES 2014-12-04 01:41:57.131789485 +0000 -+++ mpfr-3.1.2-b/PATCHES 2014-12-04 01:41:57.339791833 +0000 -@@ -0,0 +1 @@ -+strtofr -diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION ---- mpfr-3.1.2-a/VERSION 2014-12-04 01:41:57.127789443 +0000 -+++ mpfr-3.1.2-b/VERSION 2014-12-04 01:41:57.339791833 +0000 -@@ -1 +1 @@ --3.1.2-p10 -+3.1.2-p11 -diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h ---- mpfr-3.1.2-a/src/mpfr.h 2014-12-04 01:41:57.127789443 +0000 -+++ mpfr-3.1.2-b/src/mpfr.h 2014-12-04 01:41:57.335791790 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 2 --#define MPFR_VERSION_STRING "3.1.2-p10" -+#define MPFR_VERSION_STRING "3.1.2-p11" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.2-a/src/strtofr.c mpfr-3.1.2-b/src/strtofr.c ---- mpfr-3.1.2-a/src/strtofr.c 2013-03-13 15:37:32.000000000 +0000 -+++ mpfr-3.1.2-b/src/strtofr.c 2014-12-04 01:41:57.287791246 +0000 -@@ -473,8 +473,10 @@ - /* prec bits corresponds to ysize limbs */ - ysize_bits = ysize * GMP_NUMB_BITS; - /* and to ysize_bits >= prec > MPFR_PREC (x) bits */ -- y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 1); -- y += ysize; /* y has (ysize+1) allocated limbs */ -+ /* we need to allocate one more limb to work around bug -+ https://gmplib.org/list-archives/gmp-bugs/2013-December/003267.html */ -+ y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 2); -+ y += ysize; /* y has (ysize+2) allocated limbs */ - - /* pstr_size is the number of characters we read in pstr->mant - to have at least ysize full limbs. -diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c ---- mpfr-3.1.2-a/src/version.c 2014-12-04 01:41:57.131789485 +0000 -+++ mpfr-3.1.2-b/src/version.c 2014-12-04 01:41:57.339791833 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.2-p10"; -+ return "3.1.2-p11"; - } diff --git a/patches/mpfr/3.1.3/110-lngamma-and-doc.patch b/patches/mpfr/3.1.3/110-lngamma-and-doc.patch deleted file mode 100644 index d7e1cbf..0000000 --- a/patches/mpfr/3.1.3/110-lngamma-and-doc.patch +++ /dev/null @@ -1,1117 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2015-07-02 10:49:23.950112879 +0000 -+++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:49:24.042113845 +0000 -@@ -0,0 +1 @@ -+lngamma-and-doc -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/VERSION 2015-07-02 10:49:24.042113845 +0000 -@@ -1 +1 @@ --3.1.3 -+3.1.3-p1 -diff -Naurd mpfr-3.1.3-a/doc/mpfr.texi mpfr-3.1.3-b/doc/mpfr.texi ---- mpfr-3.1.3-a/doc/mpfr.texi 2015-06-19 19:55:11.000000000 +0000 -+++ mpfr-3.1.3-b/doc/mpfr.texi 2015-07-02 10:49:24.018113593 +0000 -@@ -810,13 +810,17 @@ - When the input point is in the closure of the domain of the mathematical - function and an input argument is +0 (resp.@: @minus{}0), one considers - the limit when the corresponding argument approaches 0 from above --(resp.@: below). If the limit is not defined (e.g., @code{mpfr_log} on --@minus{}0), the behavior is specified in the description of the MPFR function. -+(resp.@: below), if possible. If the limit is not defined (e.g., -+@code{mpfr_sqrt} and @code{mpfr_log} on @minus{}0), the behavior is -+specified in the description of the MPFR function, but must be consistent -+with the rule from the above paragraph (e.g., @code{mpfr_log} on @pom{}0 -+gives @minus{}Inf). - - When the result is equal to 0, its sign is determined by considering the - limit as if the input point were not in the domain: If one approaches 0 - from above (resp.@: below), the result is +0 (resp.@: @minus{}0); --for example, @code{mpfr_sin} on +0 gives +0. -+for example, @code{mpfr_sin} on @minus{}0 gives @minus{}0 and -+@code{mpfr_acos} on 1 gives +0 (in all rounding modes). - In the other cases, the sign is specified in the description of the MPFR - function; for example @code{mpfr_max} on @minus{}0 and +0 gives +0. - -@@ -832,8 +836,8 @@ - @c that advantages in practice), like for any bug fix. - Example: @code{mpfr_hypot} on (NaN,0) gives NaN, but @code{mpfr_hypot} - on (NaN,+Inf) gives +Inf (as specified in @ref{Special Functions}), --since for any finite input @var{x}, @code{mpfr_hypot} on (@var{x},+Inf) --gives +Inf. -+since for any finite or infinite input @var{x}, @code{mpfr_hypot} on -+(@var{x},+Inf) gives +Inf. - - @node Exceptions, Memory Handling, Floating-Point Values on Special Numbers, MPFR Basics - @comment node-name, next, previous, up -@@ -1581,7 +1585,8 @@ - @deftypefunx int mpfr_add_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd}) - @deftypefunx int mpfr_add_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to @math{@var{op1} + @var{op2}} rounded in the direction --@var{rnd}. For types having no signed zero, it is considered unsigned -+@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros. -+But for types having no signed zeros, 0 is considered unsigned - (i.e., (+0) + 0 = (+0) and (@minus{}0) + 0 = (@minus{}0)). - The @code{mpfr_add_d} function assumes that the radix of the @code{double} type - is a power of 2, with a precision at most that declared by the C implementation -@@ -1599,7 +1604,8 @@ - @deftypefunx int mpfr_sub_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd}) - @deftypefunx int mpfr_sub_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to @math{@var{op1} - @var{op2}} rounded in the direction --@var{rnd}. For types having no signed zero, it is considered unsigned -+@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros. -+But for types having no signed zeros, 0 is considered unsigned - (i.e., (+0) @minus{} 0 = (+0), (@minus{}0) @minus{} 0 = (@minus{}0), - 0 @minus{} (+0) = (@minus{}0) and 0 @minus{} (@minus{}0) = (+0)). - The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_sub} -@@ -1615,7 +1621,7 @@ - Set @var{rop} to @math{@var{op1} @GMPtimes{} @var{op2}} rounded in the - direction @var{rnd}. - When a result is zero, its sign is the product of the signs of the operands --(for types having no signed zero, it is considered positive). -+(for types having no signed zeros, 0 is considered positive). - The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_mul_d}. - @end deftypefun - -@@ -1635,7 +1641,7 @@ - @deftypefunx int mpfr_div_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to @math{@var{op1}/@var{op2}} rounded in the direction @var{rnd}. - When a result is zero, its sign is the product of the signs of the operands --(for types having no signed zero, it is considered positive). -+(for types having no signed zeros, 0 is considered positive). - The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_div} - and @code{mpfr_div_d}. - @end deftypefun -@@ -1643,15 +1649,18 @@ - @deftypefun int mpfr_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) - @deftypefunx int mpfr_sqrt_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to @m{\sqrt{@var{op}}, the square root of @var{op}} --rounded in the direction @var{rnd} (set @var{rop} to @minus{}0 if @var{op} is --@minus{}0, to be consistent with the IEEE 754 standard). -+rounded in the direction @var{rnd}. Set @var{rop} to @minus{}0 if -+@var{op} is @minus{}0, to be consistent with the IEEE 754 standard. - Set @var{rop} to NaN if @var{op} is negative. - @end deftypefun - - @deftypefun int mpfr_rec_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to @m{1/\sqrt{@var{op}}, the reciprocal square root of @var{op}} --rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is --@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative. -+rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is -+@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative. Warning! -+Therefore the result on @minus{}0 is different from the one of the rSqrt -+function recommended by the IEEE 754-2008 standard (Section 9.2.1), which -+is @minus{}Inf instead of +Inf. - @end deftypefun - - @deftypefun int mpfr_cbrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) -@@ -1832,7 +1841,9 @@ - @m{\log_2 @var{op}, log2(@var{op})} or - @m{\log_{10} @var{op}, log10(@var{op})}, respectively, - rounded in the direction @var{rnd}. --Set @var{rop} to @minus{}Inf if @var{op} is @minus{}0 -+Set @var{rop} to +0 if @var{op} is 1 (in all rounding modes), -+for consistency with the ISO C99 and IEEE 754-2008 standards. -+Set @var{rop} to @minus{}Inf if @var{op} is @pom{}0 - (i.e., the sign of the zero has no influence on the result). - @end deftypefun - -@@ -2003,8 +2014,11 @@ - @deftypefun int mpfr_lngamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to the value of the logarithm of the Gamma function on @var{op}, - rounded in the direction @var{rnd}. --When @math{@minus{}2@var{k}@minus{}1 @le{} @var{op} @le{} @minus{}2@var{k}}, --@var{k} being a non-negative integer, @var{rop} is set to NaN. -+When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes). -+When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf, -+following the general rules on special values. -+When @math{@minus{}2@var{k}@minus{}1 < @var{op} < @minus{}2@var{k}}, -+@var{k} being a nonnegative integer, set @var{rop} to NaN@. - See also @code{mpfr_lgamma}. - @end deftypefun - -@@ -2012,10 +2026,11 @@ - Set @var{rop} to the value of the logarithm of the absolute value of the - Gamma function on @var{op}, rounded in the direction @var{rnd}. The sign - (1 or @minus{}1) of Gamma(@var{op}) is returned in the object pointed to --by @var{signp}. When @var{op} is an infinity or a non-positive integer, set --@var{rop} to +Inf. When @var{op} is NaN, @minus{}Inf or a negative integer, --*@var{signp} is undefined, and when @var{op} is @pom{}0, *@var{signp} is --the sign of the zero. -+by @var{signp}. -+When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes). -+When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf. -+When @var{op} is NaN, @minus{}Inf or a negative integer, *@var{signp} is -+undefined, and when @var{op} is @pom{}0, *@var{signp} is the sign of the zero. - @end deftypefun - - @deftypefun int mpfr_digamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd}) -@@ -2064,7 +2079,10 @@ - @deftypefunx int mpfr_fms (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_t @var{op3}, mpfr_rnd_t @var{rnd}) - Set @var{rop} to @math{(@var{op1} @GMPtimes{} @var{op2}) + @var{op3}} - (resp.@: @math{(@var{op1} @GMPtimes{} @var{op2}) - @var{op3}}) --rounded in the direction @var{rnd}. -+rounded in the direction @var{rnd}. Concerning special values (signed zeros, -+infinities, NaN), these functions behave like a multiplication followed by a -+separate addition or subtraction. That is, the fused operation matters only -+for rounding. - @end deftypefun - - @deftypefun int mpfr_agm (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_rnd_t @var{rnd}) -@@ -2089,8 +2107,8 @@ - i.e., $\sqrt{x^2+y^2}$, - @end tex - rounded in the direction @var{rnd}. --Special values are handled as described in Section F.9.4.3 of --the ISO C99 and IEEE 754-2008 standards: -+Special values are handled as described in the ISO C99 (Section F.9.4.3) -+and IEEE 754-2008 (Section 9.2.1) standards: - If @var{x} or @var{y} is an infinity, then +Inf is returned in @var{rop}, - even if the other number is NaN. - @end deftypefun -diff -Naurd mpfr-3.1.3-a/doc/mpfr.info mpfr-3.1.3-b/doc/mpfr.info ---- mpfr-3.1.3-a/doc/mpfr.info 2015-06-19 19:55:53.000000000 +0000 -+++ mpfr-3.1.3-b/doc/mpfr.info 2015-07-02 10:49:38.718267817 +0000 -@@ -1,4 +1,4 @@ --This is mpfr.info, produced by makeinfo version 5.2 from mpfr.texi. -+This is mpfr.info, produced by makeinfo version 6.0 from mpfr.texi. - - This manual documents how to install and use the Multiple Precision - Floating-Point Reliable Library, version 3.1.3. -@@ -55,7 +55,7 @@ - MPFR Copying Conditions - *********************** - --The GNU MPFR library (or MPFR for short) is "free"; this means that -+The GNU MPFR library (or MPFR for short) is “free”; this means that - everyone is free to use it and free to redistribute it on a free basis. - The library is not in the public domain; it is copyrighted and there are - restrictions on its distribution, but these restrictions are designed to -@@ -418,7 +418,7 @@ - 4.2 Nomenclature and Types - ========================== - --A "floating-point number", or "float" for short, is an arbitrary -+A “floating-point number”, or “float” for short, is an arbitrary - precision significand (also called mantissa) with a limited precision - exponent. The C data type for such objects is ‘mpfr_t’ (internally - defined as a one-element array of a structure, and ‘mpfr_ptr’ is the C -@@ -432,7 +432,7 @@ - to the other functions supported by MPFR. Unless documented otherwise, - the sign bit of a NaN is unspecified. - --The "precision" is the number of bits used to represent the significand -+The “precision” is the number of bits used to represent the significand - of a floating-point number; the corresponding C data type is - ‘mpfr_prec_t’. The precision can be any integer between ‘MPFR_PREC_MIN’ - and ‘MPFR_PREC_MAX’. In the current implementation, ‘MPFR_PREC_MIN’ is -@@ -446,7 +446,7 @@ - may abort, crash or have undefined behavior (depending on your C - implementation). - --The "rounding mode" specifies the way to round the result of a -+The “rounding mode” specifies the way to round the result of a - floating-point operation, in case the exact result can not be - represented exactly in the destination significand; the corresponding C - data type is ‘mpfr_rnd_t’. -@@ -499,14 +499,14 @@ - representable numbers, it is rounded to the one with the least - significant bit set to zero. For example, the number 2.5, which is - represented by (10.1) in binary, is rounded to (10.0)=2 with a precision --of two bits, and not to (11.0)=3. This rule avoids the "drift" -+of two bits, and not to (11.0)=3. This rule avoids the “drift” - phenomenon mentioned by Knuth in volume 2 of The Art of Computer - Programming (Section 4.2.2). - - Most MPFR functions take as first argument the destination variable, - as second and following arguments the input variables, as last argument - a rounding mode, and have a return value of type ‘int’, called the --"ternary value". The value stored in the destination variable is -+“ternary value”. The value stored in the destination variable is - correctly rounded, i.e., MPFR behaves as if it computed the result with - an infinite precision, then rounded it to the precision of this - variable. The input variables are regarded as exact (in particular, -@@ -572,15 +572,18 @@ - When the input point is in the closure of the domain of the - mathematical function and an input argument is +0 (resp. −0), one - considers the limit when the corresponding argument approaches 0 from --above (resp. below). If the limit is not defined (e.g., ‘mpfr_log’ on --−0), the behavior is specified in the description of the MPFR function. -+above (resp. below), if possible. If the limit is not defined (e.g., -+‘mpfr_sqrt’ and ‘mpfr_log’ on −0), the behavior is specified in the -+description of the MPFR function, but must be consistent with the rule -+from the above paragraph (e.g., ‘mpfr_log’ on ±0 gives −Inf). - - When the result is equal to 0, its sign is determined by considering - the limit as if the input point were not in the domain: If one - approaches 0 from above (resp. below), the result is +0 (resp. −0); for --example, ‘mpfr_sin’ on +0 gives +0. In the other cases, the sign is --specified in the description of the MPFR function; for example --‘mpfr_max’ on −0 and +0 gives +0. -+example, ‘mpfr_sin’ on −0 gives −0 and ‘mpfr_acos’ on 1 gives +0 (in all -+rounding modes). In the other cases, the sign is specified in the -+description of the MPFR function; for example ‘mpfr_max’ on −0 and +0 -+gives +0. - - When the input point is not in the closure of the domain of the - function, the result is NaN. Example: ‘mpfr_sqrt’ on −17 gives NaN. -@@ -590,8 +593,8 @@ - numbers; such a case is always explicitly specified in *note MPFR - Interface::. Example: ‘mpfr_hypot’ on (NaN,0) gives NaN, but - ‘mpfr_hypot’ on (NaN,+Inf) gives +Inf (as specified in *note Special --Functions::), since for any finite input X, ‘mpfr_hypot’ on (X,+Inf) --gives +Inf. -+Functions::), since for any finite or infinite input X, ‘mpfr_hypot’ on -+(X,+Inf) gives +Inf. - - - File: mpfr.info, Node: Exceptions, Next: Memory Handling, Prev: Floating-Point Values on Special Numbers, Up: MPFR Basics -@@ -1253,8 +1256,9 @@ - mpfr_rnd_t RND) - -- Function: int mpfr_add_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2, - mpfr_rnd_t RND) -- Set ROP to OP1 + OP2 rounded in the direction RND. For types -- having no signed zero, it is considered unsigned (i.e., (+0) + 0 = -+ Set ROP to OP1 + OP2 rounded in the direction RND. The IEEE-754 -+ rules are used, in particular for signed zeros. But for types -+ having no signed zeros, 0 is considered unsigned (i.e., (+0) + 0 = - (+0) and (−0) + 0 = (−0)). The ‘mpfr_add_d’ function assumes that - the radix of the ‘double’ type is a power of 2, with a precision at - most that declared by the C implementation (macro -@@ -1280,8 +1284,9 @@ - mpfr_rnd_t RND) - -- Function: int mpfr_sub_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2, - mpfr_rnd_t RND) -- Set ROP to OP1 - OP2 rounded in the direction RND. For types -- having no signed zero, it is considered unsigned (i.e., (+0) − 0 = -+ Set ROP to OP1 - OP2 rounded in the direction RND. The IEEE-754 -+ rules are used, in particular for signed zeros. But for types -+ having no signed zeros, 0 is considered unsigned (i.e., (+0) − 0 = - (+0), (−0) − 0 = (−0), 0 − (+0) = (−0) and 0 − (−0) = (+0)). The - same restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_sub’ and - ‘mpfr_sub_d’. -@@ -1300,7 +1305,7 @@ - mpfr_rnd_t RND) - Set ROP to OP1 times OP2 rounded in the direction RND. When a - result is zero, its sign is the product of the signs of the -- operands (for types having no signed zero, it is considered -+ operands (for types having no signed zeros, 0 is considered - positive). The same restrictions than for ‘mpfr_add_d’ apply to - ‘mpfr_mul_d’. - -@@ -1327,21 +1332,24 @@ - mpfr_rnd_t RND) - Set ROP to OP1/OP2 rounded in the direction RND. When a result is - zero, its sign is the product of the signs of the operands (for -- types having no signed zero, it is considered positive). The same -+ types having no signed zeros, 0 is considered positive). The same - restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_div’ and - ‘mpfr_div_d’. - - -- Function: int mpfr_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - -- Function: int mpfr_sqrt_ui (mpfr_t ROP, unsigned long int OP, - mpfr_rnd_t RND) -- Set ROP to the square root of OP rounded in the direction RND (set -- ROP to −0 if OP is −0, to be consistent with the IEEE 754 -- standard). Set ROP to NaN if OP is negative. -+ Set ROP to the square root of OP rounded in the direction RND. Set -+ ROP to −0 if OP is −0, to be consistent with the IEEE 754 standard. -+ Set ROP to NaN if OP is negative. - - -- Function: int mpfr_rec_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - Set ROP to the reciprocal square root of OP rounded in the - direction RND. Set ROP to +Inf if OP is ±0, +0 if OP is +Inf, and -- NaN if OP is negative. -+ NaN if OP is negative. Warning! Therefore the result on −0 is -+ different from the one of the rSqrt function recommended by the -+ IEEE 754-2008 standard (Section 9.2.1), which is −Inf instead of -+ +Inf. - - -- Function: int mpfr_cbrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - -- Function: int mpfr_root (mpfr_t ROP, mpfr_t OP, unsigned long int K, -@@ -1515,8 +1523,10 @@ - -- Function: int mpfr_log2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - -- Function: int mpfr_log10 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - Set ROP to the natural logarithm of OP, log2(OP) or log10(OP), -- respectively, rounded in the direction RND. Set ROP to −Inf if OP -- is −0 (i.e., the sign of the zero has no influence on the result). -+ respectively, rounded in the direction RND. Set ROP to +0 if OP is -+ 1 (in all rounding modes), for consistency with the ISO C99 and -+ IEEE 754-2008 standards. Set ROP to −Inf if OP is ±0 (i.e., the -+ sign of the zero has no influence on the result). - - -- Function: int mpfr_exp (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - -- Function: int mpfr_exp2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) -@@ -1649,17 +1659,21 @@ - - -- Function: int mpfr_lngamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - Set ROP to the value of the logarithm of the Gamma function on OP, -- rounded in the direction RND. When −2K−1 <= OP <= −2K, K being a -- non-negative integer, ROP is set to NaN. See also ‘mpfr_lgamma’. -+ rounded in the direction RND. When OP is 1 or 2, set ROP to +0 (in -+ all rounding modes). When OP is an infinity or a nonpositive -+ integer, set ROP to +Inf, following the general rules on special -+ values. When −2K−1 < OP < −2K, K being a nonnegative integer, set -+ ROP to NaN. See also ‘mpfr_lgamma’. - - -- Function: int mpfr_lgamma (mpfr_t ROP, int *SIGNP, mpfr_t OP, - mpfr_rnd_t RND) - Set ROP to the value of the logarithm of the absolute value of the - Gamma function on OP, rounded in the direction RND. The sign (1 or - −1) of Gamma(OP) is returned in the object pointed to by SIGNP. -- When OP is an infinity or a non-positive integer, set ROP to +Inf. -- When OP is NaN, −Inf or a negative integer, *SIGNP is undefined, -- and when OP is ±0, *SIGNP is the sign of the zero. -+ When OP is 1 or 2, set ROP to +0 (in all rounding modes). When OP -+ is an infinity or a nonpositive integer, set ROP to +Inf. When OP -+ is NaN, −Inf or a negative integer, *SIGNP is undefined, and when -+ OP is ±0, *SIGNP is the sign of the zero. - - -- Function: int mpfr_digamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND) - Set ROP to the value of the Digamma (sometimes also called Psi) -@@ -1703,7 +1717,10 @@ - -- Function: int mpfr_fms (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2, mpfr_t - OP3, mpfr_rnd_t RND) - Set ROP to (OP1 times OP2) + OP3 (resp. (OP1 times OP2) - OP3) -- rounded in the direction RND. -+ rounded in the direction RND. Concerning special values (signed -+ zeros, infinities, NaN), these functions behave like a -+ multiplication followed by a separate addition or subtraction. -+ That is, the fused operation matters only for rounding. - - -- Function: int mpfr_agm (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2, - mpfr_rnd_t RND) -@@ -1717,9 +1734,10 @@ - RND) - Set ROP to the Euclidean norm of X and Y, i.e., the square root of - the sum of the squares of X and Y, rounded in the direction RND. -- Special values are handled as described in Section F.9.4.3 of the -- ISO C99 and IEEE 754-2008 standards: If X or Y is an infinity, then -- +Inf is returned in ROP, even if the other number is NaN. -+ Special values are handled as described in the ISO C99 (Section -+ F.9.4.3) and IEEE 754-2008 (Section 9.2.1) standards: If X or Y is -+ an infinity, then +Inf is returned in ROP, even if the other number -+ is NaN. - - -- Function: int mpfr_ai (mpfr_t ROP, mpfr_t X, mpfr_rnd_t RND) - Set ROP to the value of the Airy function Ai on X, rounded in the -@@ -2670,7 +2688,7 @@ - 5.16 Internals - ============== - --A "limb" means the part of a multi-precision number that fits in a -+A “limb” means the part of a multi-precision number that fits in a - single word. Usually a limb contains 32 or 64 bits. The C data type - for a limb is ‘mp_limb_t’. - -@@ -3140,7 +3158,7 @@ - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other -- functional and useful document "free" in the sense of freedom: to -+ functional and useful document “free” in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the -@@ -3655,9 +3673,9 @@ - * Menu: - - * mpfr_abs: Basic Arithmetic Functions. -- (line 160) --* mpfr_acos: Special Functions. (line 51) --* mpfr_acosh: Special Functions. (line 115) -+ (line 165) -+* mpfr_acos: Special Functions. (line 53) -+* mpfr_acosh: Special Functions. (line 117) - * mpfr_add: Basic Arithmetic Functions. - (line 6) - * mpfr_add_d: Basic Arithmetic Functions. -@@ -3670,15 +3688,15 @@ - (line 8) - * mpfr_add_z: Basic Arithmetic Functions. - (line 14) --* mpfr_agm: Special Functions. (line 210) --* mpfr_ai: Special Functions. (line 226) --* mpfr_asin: Special Functions. (line 52) --* mpfr_asinh: Special Functions. (line 116) -+* mpfr_agm: Special Functions. (line 219) -+* mpfr_ai: Special Functions. (line 236) -+* mpfr_asin: Special Functions. (line 54) -+* mpfr_asinh: Special Functions. (line 118) - * mpfr_asprintf: Formatted Output Functions. - (line 193) --* mpfr_atan: Special Functions. (line 53) --* mpfr_atan2: Special Functions. (line 63) --* mpfr_atanh: Special Functions. (line 117) -+* mpfr_atan: Special Functions. (line 55) -+* mpfr_atan2: Special Functions. (line 65) -+* mpfr_atanh: Special Functions. (line 119) - * mpfr_buildopt_decimal_p: Miscellaneous Functions. - (line 162) - * mpfr_buildopt_gmpinternals_p: Miscellaneous Functions. -@@ -3690,7 +3708,7 @@ - * mpfr_can_round: Rounding Related Functions. - (line 39) - * mpfr_cbrt: Basic Arithmetic Functions. -- (line 108) -+ (line 113) - * mpfr_ceil: Integer Related Functions. - (line 7) - * mpfr_check_range: Exception Related Functions. -@@ -3735,18 +3753,18 @@ - (line 27) - * mpfr_cmp_z: Comparison Functions. - (line 11) --* mpfr_const_catalan: Special Functions. (line 237) --* mpfr_const_euler: Special Functions. (line 236) --* mpfr_const_log2: Special Functions. (line 234) --* mpfr_const_pi: Special Functions. (line 235) -+* mpfr_const_catalan: Special Functions. (line 247) -+* mpfr_const_euler: Special Functions. (line 246) -+* mpfr_const_log2: Special Functions. (line 244) -+* mpfr_const_pi: Special Functions. (line 245) - * mpfr_copysign: Miscellaneous Functions. - (line 109) --* mpfr_cos: Special Functions. (line 29) --* mpfr_cosh: Special Functions. (line 95) --* mpfr_cot: Special Functions. (line 47) --* mpfr_coth: Special Functions. (line 111) --* mpfr_csc: Special Functions. (line 46) --* mpfr_csch: Special Functions. (line 110) -+* mpfr_cos: Special Functions. (line 31) -+* mpfr_cosh: Special Functions. (line 97) -+* mpfr_cot: Special Functions. (line 49) -+* mpfr_coth: Special Functions. (line 113) -+* mpfr_csc: Special Functions. (line 48) -+* mpfr_csch: Special Functions. (line 112) - * mpfr_custom_get_exp: Custom Interface. (line 75) - * mpfr_custom_get_kind: Custom Interface. (line 65) - * mpfr_custom_get_significand: Custom Interface. (line 70) -@@ -3756,47 +3774,47 @@ - * mpfr_custom_move: Custom Interface. (line 82) - * MPFR_DECL_INIT: Initialization Functions. - (line 74) --* mpfr_digamma: Special Functions. (line 166) -+* mpfr_digamma: Special Functions. (line 172) - * mpfr_dim: Basic Arithmetic Functions. -- (line 166) -+ (line 171) - * mpfr_div: Basic Arithmetic Functions. -- (line 72) -+ (line 74) - * mpfr_divby0_p: Exception Related Functions. - (line 134) - * mpfr_div_2exp: Compatibility with MPF. - (line 49) - * mpfr_div_2si: Basic Arithmetic Functions. -- (line 181) -+ (line 186) - * mpfr_div_2ui: Basic Arithmetic Functions. -- (line 179) -+ (line 184) - * mpfr_div_d: Basic Arithmetic Functions. -- (line 84) -+ (line 86) - * mpfr_div_q: Basic Arithmetic Functions. -- (line 88) -+ (line 90) - * mpfr_div_si: Basic Arithmetic Functions. -- (line 80) -+ (line 82) - * mpfr_div_ui: Basic Arithmetic Functions. -- (line 76) -+ (line 78) - * mpfr_div_z: Basic Arithmetic Functions. -- (line 86) -+ (line 88) - * mpfr_d_div: Basic Arithmetic Functions. -- (line 82) -+ (line 84) - * mpfr_d_sub: Basic Arithmetic Functions. -- (line 35) --* mpfr_eint: Special Functions. (line 133) -+ (line 36) -+* mpfr_eint: Special Functions. (line 135) - * mpfr_eq: Compatibility with MPF. - (line 28) - * mpfr_equal_p: Comparison Functions. - (line 59) - * mpfr_erangeflag_p: Exception Related Functions. - (line 137) --* mpfr_erf: Special Functions. (line 177) --* mpfr_erfc: Special Functions. (line 178) --* mpfr_exp: Special Functions. (line 23) --* mpfr_exp10: Special Functions. (line 25) --* mpfr_exp2: Special Functions. (line 24) --* mpfr_expm1: Special Functions. (line 129) --* mpfr_fac_ui: Special Functions. (line 121) -+* mpfr_erf: Special Functions. (line 183) -+* mpfr_erfc: Special Functions. (line 184) -+* mpfr_exp: Special Functions. (line 25) -+* mpfr_exp10: Special Functions. (line 27) -+* mpfr_exp2: Special Functions. (line 26) -+* mpfr_expm1: Special Functions. (line 131) -+* mpfr_fac_ui: Special Functions. (line 123) - * mpfr_fits_intmax_p: Conversion Functions. - (line 150) - * mpfr_fits_sint_p: Conversion Functions. -@@ -3815,20 +3833,20 @@ - (line 147) - * mpfr_floor: Integer Related Functions. - (line 8) --* mpfr_fma: Special Functions. (line 203) -+* mpfr_fma: Special Functions. (line 209) - * mpfr_fmod: Integer Related Functions. - (line 92) --* mpfr_fms: Special Functions. (line 205) -+* mpfr_fms: Special Functions. (line 211) - * mpfr_fprintf: Formatted Output Functions. - (line 157) - * mpfr_frac: Integer Related Functions. - (line 76) --* mpfr_free_cache: Special Functions. (line 244) -+* mpfr_free_cache: Special Functions. (line 254) - * mpfr_free_str: Conversion Functions. - (line 137) - * mpfr_frexp: Conversion Functions. - (line 45) --* mpfr_gamma: Special Functions. (line 148) -+* mpfr_gamma: Special Functions. (line 150) - * mpfr_get_d: Conversion Functions. - (line 7) - * mpfr_get_decimal64: Conversion Functions. -@@ -3887,7 +3905,7 @@ - (line 56) - * mpfr_greater_p: Comparison Functions. - (line 55) --* mpfr_hypot: Special Functions. (line 218) -+* mpfr_hypot: Special Functions. (line 227) - * mpfr_inexflag_p: Exception Related Functions. - (line 136) - * mpfr_inf_p: Comparison Functions. -@@ -3922,21 +3940,21 @@ - (line 31) - * mpfr_integer_p: Integer Related Functions. - (line 119) --* mpfr_j0: Special Functions. (line 182) --* mpfr_j1: Special Functions. (line 183) --* mpfr_jn: Special Functions. (line 184) -+* mpfr_j0: Special Functions. (line 188) -+* mpfr_j1: Special Functions. (line 189) -+* mpfr_jn: Special Functions. (line 190) - * mpfr_lessequal_p: Comparison Functions. - (line 58) - * mpfr_lessgreater_p: Comparison Functions. - (line 64) - * mpfr_less_p: Comparison Functions. - (line 57) --* mpfr_lgamma: Special Functions. (line 157) --* mpfr_li2: Special Functions. (line 143) --* mpfr_lngamma: Special Functions. (line 152) -+* mpfr_lgamma: Special Functions. (line 162) -+* mpfr_li2: Special Functions. (line 145) -+* mpfr_lngamma: Special Functions. (line 154) - * mpfr_log: Special Functions. (line 16) - * mpfr_log10: Special Functions. (line 18) --* mpfr_log1p: Special Functions. (line 125) -+* mpfr_log1p: Special Functions. (line 127) - * mpfr_log2: Special Functions. (line 17) - * mpfr_max: Miscellaneous Functions. - (line 22) -@@ -3947,29 +3965,29 @@ - * mpfr_modf: Integer Related Functions. - (line 82) - * mpfr_mul: Basic Arithmetic Functions. -- (line 51) -+ (line 53) - * mpfr_mul_2exp: Compatibility with MPF. - (line 47) - * mpfr_mul_2si: Basic Arithmetic Functions. -- (line 174) -+ (line 179) - * mpfr_mul_2ui: Basic Arithmetic Functions. -- (line 172) -+ (line 177) - * mpfr_mul_d: Basic Arithmetic Functions. -- (line 57) -+ (line 59) - * mpfr_mul_q: Basic Arithmetic Functions. -- (line 61) -+ (line 63) - * mpfr_mul_si: Basic Arithmetic Functions. -- (line 55) -+ (line 57) - * mpfr_mul_ui: Basic Arithmetic Functions. -- (line 53) -+ (line 55) - * mpfr_mul_z: Basic Arithmetic Functions. -- (line 59) -+ (line 61) - * mpfr_nanflag_p: Exception Related Functions. - (line 135) - * mpfr_nan_p: Comparison Functions. - (line 39) - * mpfr_neg: Basic Arithmetic Functions. -- (line 159) -+ (line 164) - * mpfr_nextabove: Miscellaneous Functions. - (line 15) - * mpfr_nextbelow: Miscellaneous Functions. -@@ -3983,13 +4001,13 @@ - * mpfr_overflow_p: Exception Related Functions. - (line 133) - * mpfr_pow: Basic Arithmetic Functions. -- (line 116) -+ (line 121) - * mpfr_pow_si: Basic Arithmetic Functions. -- (line 120) -+ (line 125) - * mpfr_pow_ui: Basic Arithmetic Functions. -- (line 118) -+ (line 123) - * mpfr_pow_z: Basic Arithmetic Functions. -- (line 122) -+ (line 127) - * mpfr_prec_round: Rounding Related Functions. - (line 13) - * ‘mpfr_prec_t’: Nomenclature and Types. -@@ -3999,7 +4017,7 @@ - * mpfr_print_rnd_mode: Rounding Related Functions. - (line 71) - * mpfr_rec_sqrt: Basic Arithmetic Functions. -- (line 103) -+ (line 105) - * mpfr_regular_p: Comparison Functions. - (line 43) - * mpfr_reldiff: Compatibility with MPF. -@@ -4021,11 +4039,11 @@ - * ‘mpfr_rnd_t’: Nomenclature and Types. - (line 34) - * mpfr_root: Basic Arithmetic Functions. -- (line 109) -+ (line 114) - * mpfr_round: Integer Related Functions. - (line 9) --* mpfr_sec: Special Functions. (line 45) --* mpfr_sech: Special Functions. (line 109) -+* mpfr_sec: Special Functions. (line 47) -+* mpfr_sech: Special Functions. (line 111) - * mpfr_set: Assignment Functions. - (line 9) - * mpfr_setsign: Miscellaneous Functions. -@@ -4100,57 +4118,57 @@ - (line 49) - * mpfr_signbit: Miscellaneous Functions. - (line 99) --* mpfr_sin: Special Functions. (line 30) --* mpfr_sinh: Special Functions. (line 96) --* mpfr_sinh_cosh: Special Functions. (line 101) --* mpfr_sin_cos: Special Functions. (line 35) -+* mpfr_sin: Special Functions. (line 32) -+* mpfr_sinh: Special Functions. (line 98) -+* mpfr_sinh_cosh: Special Functions. (line 103) -+* mpfr_sin_cos: Special Functions. (line 37) - * mpfr_si_div: Basic Arithmetic Functions. -- (line 78) -+ (line 80) - * mpfr_si_sub: Basic Arithmetic Functions. -- (line 31) -+ (line 32) - * mpfr_snprintf: Formatted Output Functions. - (line 180) - * mpfr_sprintf: Formatted Output Functions. - (line 170) - * mpfr_sqr: Basic Arithmetic Functions. -- (line 69) -+ (line 71) - * mpfr_sqrt: Basic Arithmetic Functions. -- (line 96) -+ (line 98) - * mpfr_sqrt_ui: Basic Arithmetic Functions. -- (line 97) -+ (line 99) - * mpfr_strtofr: Assignment Functions. - (line 80) - * mpfr_sub: Basic Arithmetic Functions. -- (line 25) -+ (line 26) - * mpfr_subnormalize: Exception Related Functions. - (line 60) - * mpfr_sub_d: Basic Arithmetic Functions. -- (line 37) -+ (line 38) - * mpfr_sub_q: Basic Arithmetic Functions. -- (line 43) -+ (line 44) - * mpfr_sub_si: Basic Arithmetic Functions. -- (line 33) -+ (line 34) - * mpfr_sub_ui: Basic Arithmetic Functions. -- (line 29) -+ (line 30) - * mpfr_sub_z: Basic Arithmetic Functions. -- (line 41) --* mpfr_sum: Special Functions. (line 252) -+ (line 42) -+* mpfr_sum: Special Functions. (line 262) - * mpfr_swap: Assignment Functions. - (line 150) - * ‘mpfr_t’: Nomenclature and Types. - (line 6) --* mpfr_tan: Special Functions. (line 31) --* mpfr_tanh: Special Functions. (line 97) -+* mpfr_tan: Special Functions. (line 33) -+* mpfr_tanh: Special Functions. (line 99) - * mpfr_trunc: Integer Related Functions. - (line 10) - * mpfr_ui_div: Basic Arithmetic Functions. -- (line 74) -+ (line 76) - * mpfr_ui_pow: Basic Arithmetic Functions. -- (line 126) -+ (line 131) - * mpfr_ui_pow_ui: Basic Arithmetic Functions. -- (line 124) -+ (line 129) - * mpfr_ui_sub: Basic Arithmetic Functions. -- (line 27) -+ (line 28) - * mpfr_underflow_p: Exception Related Functions. - (line 132) - * mpfr_unordered_p: Comparison Functions. -@@ -4181,61 +4199,61 @@ - (line 182) - * mpfr_vsprintf: Formatted Output Functions. - (line 171) --* mpfr_y0: Special Functions. (line 193) --* mpfr_y1: Special Functions. (line 194) --* mpfr_yn: Special Functions. (line 195) -+* mpfr_y0: Special Functions. (line 199) -+* mpfr_y1: Special Functions. (line 200) -+* mpfr_yn: Special Functions. (line 201) - * mpfr_zero_p: Comparison Functions. - (line 42) --* mpfr_zeta: Special Functions. (line 171) --* mpfr_zeta_ui: Special Functions. (line 172) -+* mpfr_zeta: Special Functions. (line 177) -+* mpfr_zeta_ui: Special Functions. (line 178) - * mpfr_z_sub: Basic Arithmetic Functions. -- (line 39) -+ (line 40) - - - - Tag Table: - Node: Top775 - Node: Copying2007 --Node: Introduction to MPFR3766 --Node: Installing MPFR5880 --Node: Reporting Bugs11323 --Node: MPFR Basics13353 --Node: Headers and Libraries13669 --Node: Nomenclature and Types16828 --Node: MPFR Variable Conventions18874 --Node: Rounding Modes20418 --Ref: ternary value21544 --Node: Floating-Point Values on Special Numbers23526 --Node: Exceptions26572 --Node: Memory Handling29749 --Node: MPFR Interface30894 --Node: Initialization Functions33008 --Node: Assignment Functions40318 --Node: Combined Initialization and Assignment Functions49673 --Node: Conversion Functions50974 --Node: Basic Arithmetic Functions60035 --Node: Comparison Functions69200 --Node: Special Functions72687 --Node: Input and Output Functions86672 --Node: Formatted Output Functions88644 --Node: Integer Related Functions98431 --Node: Rounding Related Functions105051 --Node: Miscellaneous Functions108888 --Node: Exception Related Functions117568 --Node: Compatibility with MPF124386 --Node: Custom Interface127127 --Node: Internals131526 --Node: API Compatibility133066 --Node: Type and Macro Changes134995 --Node: Added Functions137844 --Node: Changed Functions141132 --Node: Removed Functions145545 --Node: Other Changes145973 --Node: Contributors147576 --Node: References150219 --Node: GNU Free Documentation License151973 --Node: Concept Index174562 --Node: Function and Type Index180659 -+Node: Introduction to MPFR3770 -+Node: Installing MPFR5884 -+Node: Reporting Bugs11327 -+Node: MPFR Basics13357 -+Node: Headers and Libraries13673 -+Node: Nomenclature and Types16832 -+Node: MPFR Variable Conventions18894 -+Node: Rounding Modes20438 -+Ref: ternary value21568 -+Node: Floating-Point Values on Special Numbers23554 -+Node: Exceptions26813 -+Node: Memory Handling29990 -+Node: MPFR Interface31135 -+Node: Initialization Functions33249 -+Node: Assignment Functions40559 -+Node: Combined Initialization and Assignment Functions49914 -+Node: Conversion Functions51215 -+Node: Basic Arithmetic Functions60276 -+Node: Comparison Functions69777 -+Node: Special Functions73264 -+Node: Input and Output Functions87862 -+Node: Formatted Output Functions89834 -+Node: Integer Related Functions99621 -+Node: Rounding Related Functions106241 -+Node: Miscellaneous Functions110078 -+Node: Exception Related Functions118758 -+Node: Compatibility with MPF125576 -+Node: Custom Interface128317 -+Node: Internals132716 -+Node: API Compatibility134260 -+Node: Type and Macro Changes136189 -+Node: Added Functions139038 -+Node: Changed Functions142326 -+Node: Removed Functions146739 -+Node: Other Changes147167 -+Node: Contributors148770 -+Node: References151413 -+Node: GNU Free Documentation License153167 -+Node: Concept Index175760 -+Node: Function and Type Index181857 - - End Tag Table - -diff -Naurd mpfr-3.1.3-a/src/lngamma.c mpfr-3.1.3-b/src/lngamma.c ---- mpfr-3.1.3-a/src/lngamma.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/lngamma.c 2015-07-02 10:49:24.018113593 +0000 -@@ -603,16 +603,17 @@ - mpfr_get_prec (y), mpfr_log_prec, y, inex)); - - /* special cases */ -- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x))) -+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x) || -+ (MPFR_IS_NEG (x) && mpfr_integer_p (x)))) - { -- if (MPFR_IS_NAN (x) || MPFR_IS_NEG (x)) -+ if (MPFR_IS_NAN (x)) - { - MPFR_SET_NAN (y); - MPFR_RET_NAN; - } -- else /* lngamma(+Inf) = lngamma(+0) = +Inf */ -+ else /* lngamma(+/-Inf) = lngamma(nonpositive integer) = +Inf */ - { -- if (MPFR_IS_ZERO (x)) -+ if (!MPFR_IS_INF (x)) - mpfr_set_divby0 (); - MPFR_SET_INF (y); - MPFR_SET_POS (y); -@@ -620,8 +621,8 @@ - } - } - -- /* if x < 0 and -2k-1 <= x <= -2k, then lngamma(x) = NaN */ -- if (MPFR_IS_NEG (x) && (unit_bit (x) == 0 || mpfr_integer_p (x))) -+ /* if -2k-1 < x < -2k <= 0, then lngamma(x) = NaN */ -+ if (MPFR_IS_NEG (x) && unit_bit (x) == 0) - { - MPFR_SET_NAN (y); - MPFR_RET_NAN; -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3" -+#define MPFR_VERSION_STRING "3.1.3-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:49:24.042113845 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3"; -+ return "3.1.3-p1"; - } -diff -Naurd mpfr-3.1.3-a/tests/tlngamma.c mpfr-3.1.3-b/tests/tlngamma.c ---- mpfr-3.1.3-a/tests/tlngamma.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tlngamma.c 2015-07-02 10:49:24.018113593 +0000 -@@ -33,7 +33,7 @@ - special (void) - { - mpfr_t x, y; -- int inex; -+ int i, inex; - - mpfr_init (x); - mpfr_init (y); -@@ -46,25 +46,29 @@ - exit (1); - } - -- mpfr_set_inf (x, -1); -+ mpfr_set_inf (x, 1); -+ mpfr_clear_flags (); - mpfr_lngamma (y, x, MPFR_RNDN); -- if (!mpfr_nan_p (y)) -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0) - { -- printf ("Error for lngamma(-Inf)\n"); -+ printf ("Error for lngamma(+Inf)\n"); - exit (1); - } - -- mpfr_set_inf (x, 1); -+ mpfr_set_inf (x, -1); -+ mpfr_clear_flags (); - mpfr_lngamma (y, x, MPFR_RNDN); -- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0) -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0) - { -- printf ("Error for lngamma(+Inf)\n"); -+ printf ("Error for lngamma(-Inf)\n"); - exit (1); - } - - mpfr_set_ui (x, 0, MPFR_RNDN); -+ mpfr_clear_flags (); - mpfr_lngamma (y, x, MPFR_RNDN); -- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0) -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || -+ __gmpfr_flags != MPFR_FLAGS_DIVBY0) - { - printf ("Error for lngamma(+0)\n"); - exit (1); -@@ -72,32 +76,58 @@ - - mpfr_set_ui (x, 0, MPFR_RNDN); - mpfr_neg (x, x, MPFR_RNDN); -+ mpfr_clear_flags (); - mpfr_lngamma (y, x, MPFR_RNDN); -- if (!mpfr_nan_p (y)) -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || -+ __gmpfr_flags != MPFR_FLAGS_DIVBY0) - { - printf ("Error for lngamma(-0)\n"); - exit (1); - } - - mpfr_set_ui (x, 1, MPFR_RNDN); -+ mpfr_clear_flags (); - mpfr_lngamma (y, x, MPFR_RNDN); -- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) -+ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y)) - { - printf ("Error for lngamma(1)\n"); - exit (1); - } - -- mpfr_set_si (x, -1, MPFR_RNDN); -- mpfr_lngamma (y, x, MPFR_RNDN); -- if (!mpfr_nan_p (y)) -+ for (i = 1; i <= 5; i++) - { -- printf ("Error for lngamma(-1)\n"); -- exit (1); -+ int c; -+ -+ mpfr_set_si (x, -i, MPFR_RNDN); -+ mpfr_clear_flags (); -+ mpfr_lngamma (y, x, MPFR_RNDN); -+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || -+ __gmpfr_flags != MPFR_FLAGS_DIVBY0) -+ { -+ printf ("Error for lngamma(-%d)\n", i); -+ exit (1); -+ } -+ if (i & 1) -+ { -+ mpfr_nextabove (x); -+ c = '+'; -+ } -+ else -+ { -+ mpfr_nextbelow (x); -+ c = '-'; -+ } -+ mpfr_lngamma (y, x, MPFR_RNDN); -+ if (!mpfr_nan_p (y)) -+ { -+ printf ("Error for lngamma(-%d%cepsilon)\n", i, c); -+ exit (1); -+ } - } - - mpfr_set_ui (x, 2, MPFR_RNDN); - mpfr_lngamma (y, x, MPFR_RNDN); -- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y)) -+ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y)) - { - printf ("Error for lngamma(2)\n"); - exit (1); -@@ -127,7 +157,7 @@ - mpfr_set_str (x, CHECK_X2, 10, MPFR_RNDN); - mpfr_lngamma (y, x, MPFR_RNDN); - mpfr_set_str (x, CHECK_Y2, 10, MPFR_RNDN); -- if (MPFR_IS_NAN (y) || mpfr_cmp (y, x)) -+ if (mpfr_cmp0 (y, x)) - { - printf ("mpfr_lngamma("CHECK_X2") is wrong:\n" - "expected "); -@@ -143,7 +173,7 @@ - mpfr_lngamma (y, x, MPFR_RNDU); - mpfr_set_prec (x, 175); - mpfr_set_str_binary (x, "0.1010001100011101101011001101110010100001000001000001110011000001101100001111001001000101011011100100010101011110100111110101010100010011010010000101010111001100011000101111E7"); -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y)) -+ if (mpfr_cmp0 (x, y)) - { - printf ("Error in mpfr_lngamma (1)\n"); - exit (1); -@@ -155,7 +185,7 @@ - mpfr_lngamma (x, y, MPFR_RNDZ); - mpfr_set_prec (y, 21); - mpfr_set_str_binary (y, "0.111000101000001100101E9"); -- if (MPFR_IS_NAN (x) || mpfr_cmp (x, y)) -+ if (mpfr_cmp0 (x, y)) - { - printf ("Error in mpfr_lngamma (120)\n"); - printf ("Expected "); mpfr_print_binary (y); puts (""); -@@ -169,7 +199,7 @@ - inex = mpfr_lngamma (y, x, MPFR_RNDN); - mpfr_set_prec (x, 206); - mpfr_set_str_binary (x, "0.10000111011000000011100010101001100110001110000111100011000100100110110010001011011110101001111011110110000001010100111011010000000011100110110101100111000111010011110010000100010111101010001101000110101001E13"); -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y)) -+ if (mpfr_cmp0 (x, y)) - { - printf ("Error in mpfr_lngamma (768)\n"); - exit (1); -@@ -185,7 +215,7 @@ - mpfr_set_str_binary (x, "0.1100E-66"); - mpfr_lngamma (y, x, MPFR_RNDN); - mpfr_set_str_binary (x, "0.1100E6"); -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y)) -+ if (mpfr_cmp0 (x, y)) - { - printf ("Error for lngamma(0.1100E-66)\n"); - exit (1); -@@ -199,7 +229,7 @@ - mpfr_lngamma (y, x, MPFR_RNDN); - mpfr_set_prec (x, 32); - mpfr_set_str_binary (x, "-0.10001000111011111011000010100010E207"); -- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y)) -+ if (mpfr_cmp0 (x, y)) - { - printf ("Error for lngamma(-2^199+0.5)\n"); - printf ("Got "); diff --git a/patches/mpfr/3.1.3/120-muldiv-2exp-overflow.patch b/patches/mpfr/3.1.3/120-muldiv-2exp-overflow.patch deleted file mode 100644 index df711fd..0000000 --- a/patches/mpfr/3.1.3/120-muldiv-2exp-overflow.patch +++ /dev/null @@ -1,161 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2015-07-02 10:50:08.046573308 +0000 -+++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:50:08.126574142 +0000 -@@ -0,0 +1 @@ -+muldiv-2exp-overflow -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2015-07-02 10:49:24.042113845 +0000 -+++ mpfr-3.1.3-b/VERSION 2015-07-02 10:50:08.126574142 +0000 -@@ -1 +1 @@ --3.1.3-p1 -+3.1.3-p2 -diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c ---- mpfr-3.1.3-a/src/div_2si.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000 -@@ -49,7 +49,7 @@ - rnd_mode = MPFR_RNDZ; - return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y)); - } -- else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n || -+ else if (MPFR_UNLIKELY(n <= 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n || - exp > __gmpfr_emax + n)) ) - return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y)); - -diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c ---- mpfr-3.1.3-a/src/div_2ui.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000 -@@ -32,7 +32,7 @@ - rnd_mode), - ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inexact)); - -- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x))) -+ if (MPFR_UNLIKELY (n == 0 || MPFR_IS_SINGULAR (x))) - return mpfr_set (y, x, rnd_mode); - else - { -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p1" -+#define MPFR_VERSION_STRING "3.1.3-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c ---- mpfr-3.1.3-a/src/mul_2si.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000 -@@ -39,7 +39,7 @@ - { - mpfr_exp_t exp = MPFR_GET_EXP (x); - MPFR_SETRAW (inexact, y, x, exp, rnd_mode); -- if (MPFR_UNLIKELY( n > 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n || -+ if (MPFR_UNLIKELY(n >= 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n || - exp > __gmpfr_emax - n))) - return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y)); - else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emin > MPFR_EMAX_MAX + n || -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2015-07-02 10:49:24.042113845 +0000 -+++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:50:08.126574142 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p1"; -+ return "3.1.3-p2"; - } -diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c ---- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000 -@@ -242,6 +242,76 @@ - large (MPFR_EMAX_MAX); - } - -+/* Cases where the function overflows on n = 0 when rounding is like -+ away from zero. */ -+static void -+overflow0 (mpfr_exp_t emax) -+{ -+ mpfr_exp_t old_emax; -+ mpfr_t x, y1, y2; -+ int neg, r, op; -+ static char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" }; -+ -+ old_emax = mpfr_get_emax (); -+ set_emax (emax); -+ -+ mpfr_init2 (x, 8); -+ mpfr_inits2 (6, y1, y2, (mpfr_ptr) 0); -+ -+ mpfr_set_inf (x, 1); -+ mpfr_nextbelow (x); -+ -+ for (neg = 0; neg <= 1; neg++) -+ { -+ RND_LOOP (r) -+ { -+ int inex1, inex2; -+ unsigned int flags1, flags2; -+ -+ /* Even if there isn't an overflow (rounding ~ toward zero), -+ the result is the same as the one of an overflow. */ -+ inex1 = mpfr_overflow (y1, (mpfr_rnd_t) r, neg ? -1 : 1); -+ flags1 = MPFR_FLAGS_INEXACT; -+ if (mpfr_inf_p (y1)) -+ flags1 |= MPFR_FLAGS_OVERFLOW; -+ for (op = 0; op < 4; op++) -+ { -+ mpfr_clear_flags (); -+ inex2 = -+ op == 0 ? mpfr_mul_2ui (y2, x, 0, (mpfr_rnd_t) r) : -+ op == 1 ? mpfr_mul_2si (y2, x, 0, (mpfr_rnd_t) r) : -+ op == 2 ? mpfr_div_2ui (y2, x, 0, (mpfr_rnd_t) r) : -+ op == 3 ? mpfr_div_2si (y2, x, 0, (mpfr_rnd_t) r) : -+ (MPFR_ASSERTN (0), 0); -+ flags2 = __gmpfr_flags; -+ if (!(mpfr_equal_p (y1, y2) && -+ SAME_SIGN (inex1, inex2) && -+ flags1 == flags2)) -+ { -+ printf ("Error in overflow0 for %s, mpfr_%s, emax = %" -+ MPFR_EXP_FSPEC "d,\nx = ", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), sop[op], -+ (mpfr_eexp_t) emax); -+ mpfr_dump (x); -+ printf ("Expected "); -+ mpfr_dump (y1); -+ printf (" with inex = %d, flags =", inex1); -+ flags_out (flags1); -+ printf ("Got "); -+ mpfr_dump (y2); -+ printf (" with inex = %d, flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ } -+ mpfr_neg (x, x, MPFR_RNDN); -+ } -+ -+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0); -+ set_emax (old_emax); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -334,6 +404,11 @@ - underflow0 (); - large0 (); - -+ if (mpfr_get_emax () != MPFR_EMAX_MAX) -+ overflow0 (mpfr_get_emax ()); -+ overflow0 (MPFR_EMAX_MAX); -+ overflow0 (-1); -+ - tests_end_mpfr (); - return 0; - } diff --git a/patches/mpfr/3.1.3/130-muldiv-2exp-underflow.patch b/patches/mpfr/3.1.3/130-muldiv-2exp-underflow.patch deleted file mode 100644 index c7be09f..0000000 --- a/patches/mpfr/3.1.3/130-muldiv-2exp-underflow.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2015-07-17 08:54:48.592799981 +0000 -+++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:54:48.616811495 +0000 -@@ -0,0 +1 @@ -+muldiv-2exp-underflow -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2015-07-02 10:50:08.126574142 +0000 -+++ mpfr-3.1.3-b/VERSION 2015-07-17 08:54:48.616811495 +0000 -@@ -1 +1 @@ --3.1.3-p2 -+3.1.3-p3 -diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c ---- mpfr-3.1.3-a/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000 -+++ mpfr-3.1.3-b/src/div_2si.c 2015-07-17 08:54:48.608807656 +0000 -@@ -45,7 +45,8 @@ - if (rnd_mode == MPFR_RNDN && - (__gmpfr_emin > MPFR_EMAX_MAX - (n - 1) || - exp < __gmpfr_emin + (n - 1) || -- (inexact >= 0 && mpfr_powerof2_raw (y)))) -+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) && -+ mpfr_powerof2_raw (y)))) - rnd_mode = MPFR_RNDZ; - return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y)); - } -diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c ---- mpfr-3.1.3-a/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000 -+++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-17 08:54:48.608807656 +0000 -@@ -44,7 +44,9 @@ - if (MPFR_UNLIKELY (n >= diffexp)) /* exp - n <= emin - 1 */ - { - if (rnd_mode == MPFR_RNDN && -- (n > diffexp || (inexact >= 0 && mpfr_powerof2_raw (y)))) -+ (n > diffexp || -+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) && -+ mpfr_powerof2_raw (y)))) - rnd_mode = MPFR_RNDZ; - return mpfr_underflow (y, rnd_mode, MPFR_SIGN (y)); - } -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p2" -+#define MPFR_VERSION_STRING "3.1.3-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c ---- mpfr-3.1.3-a/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000 -+++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-17 08:54:48.608807656 +0000 -@@ -48,7 +48,8 @@ - if (rnd_mode == MPFR_RNDN && - (__gmpfr_emin > MPFR_EMAX_MAX + (n + 1) || - exp < __gmpfr_emin - (n + 1) || -- (inexact >= 0 && mpfr_powerof2_raw (y)))) -+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) && -+ mpfr_powerof2_raw (y)))) - rnd_mode = MPFR_RNDZ; - return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y)); - } -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2015-07-02 10:50:08.126574142 +0000 -+++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:54:48.616811495 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p2"; -+ return "3.1.3-p3"; - } -diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c ---- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000 -+++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-17 08:54:48.608807656 +0000 -@@ -50,77 +50,82 @@ - { - mpfr_t x, y, z1, z2; - mpfr_exp_t emin; -- int i, k; -+ int i, k, s; - int prec; - int rnd; - int div; - int inex1, inex2; - unsigned int flags1, flags2; - -- /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e) -- * with emin = e, x = 1 + i/16, i in { -1, 0, 1 }, and k = 1 to 4, -- * by comparing the result with the one of a simple division. -+ /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e) with -+ * emin = e, x = s * (1 + i/16), i in { -1, 0, 1 }, s in { -1, 1 }, and -+ * k = 1 to 4, by comparing the result with the one of a simple division. - */ - emin = mpfr_get_emin (); - set_emin (e); - mpfr_inits2 (8, x, y, (mpfr_ptr) 0); - for (i = 15; i <= 17; i++) -- { -- inex1 = mpfr_set_ui_2exp (x, i, -4, MPFR_RNDN); -- MPFR_ASSERTN (inex1 == 0); -- for (prec = 6; prec >= 3; prec -= 3) -- { -- mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0); -- RND_LOOP (rnd) -- for (k = 1; k <= 4; k++) -- { -- /* The following one is assumed to be correct. */ -- inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN); -- MPFR_ASSERTN (inex1 == 0); -- inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN); -- MPFR_ASSERTN (inex1 == 0); -- mpfr_clear_flags (); -- /* Do not use mpfr_div_ui to avoid the optimization -- by mpfr_div_2si. */ -- inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd); -- flags1 = __gmpfr_flags; -- -- for (div = 0; div <= 2; div++) -+ for (s = 1; s >= -1; s -= 2) -+ { -+ inex1 = mpfr_set_si_2exp (x, s * i, -4, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); -+ for (prec = 6; prec >= 3; prec -= 3) -+ { -+ mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0); -+ RND_LOOP (rnd) -+ for (k = 1; k <= 4; k++) - { -+ /* The following one is assumed to be correct. */ -+ inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); -+ inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN); -+ MPFR_ASSERTN (inex1 == 0); - mpfr_clear_flags (); -- inex2 = div == 0 ? -- mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) : div == 1 ? -- mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) : -- mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd); -- flags2 = __gmpfr_flags; -- if (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -- mpfr_equal_p (z1, z2)) -- continue; -- printf ("Error in underflow("); -- if (e == MPFR_EMIN_MIN) -- printf ("MPFR_EMIN_MIN"); -- else if (e == emin) -- printf ("default emin"); -- else if (e >= LONG_MIN) -- printf ("%ld", (long) e); -- else -- printf ("<LONG_MIN"); -- printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d, " -- "%s\n", div == 0 ? "mul_2si" : div == 1 ? -- "div_2si" : "div_2ui", i, prec, k, -- mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -- printf ("Expected "); -- mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN); -- printf (", inex = %d, flags = %u\n", SIGN (inex1), flags1); -- printf ("Got "); -- mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN); -- printf (", inex = %d, flags = %u\n", SIGN (inex2), flags2); -- exit (1); -- } /* div */ -- } /* k */ -- mpfr_clears (z1, z2, (mpfr_ptr) 0); -- } /* prec */ -- } /* i */ -+ /* Do not use mpfr_div_ui to avoid the optimization -+ by mpfr_div_2si. */ -+ inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd); -+ flags1 = __gmpfr_flags; -+ -+ for (div = 0; div <= 2; div++) -+ { -+ mpfr_clear_flags (); -+ inex2 = -+ div == 0 ? -+ mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) : -+ div == 1 ? -+ mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) : -+ mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ if (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (z1, z2)) -+ continue; -+ printf ("Error in underflow("); -+ if (e == MPFR_EMIN_MIN) -+ printf ("MPFR_EMIN_MIN"); -+ else if (e == emin) -+ printf ("default emin"); -+ else if (e >= LONG_MIN) -+ printf ("%ld", (long) e); -+ else -+ printf ("<LONG_MIN"); -+ printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d," -+ " %s\n", div == 0 ? "mul_2si" : div == 1 ? -+ "div_2si" : "div_2ui", s * i, prec, k, -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ printf ("Expected "); -+ mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN); -+ printf (", inex = %d, flags = %u\n", -+ SIGN (inex1), flags1); -+ printf ("Got "); -+ mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN); -+ printf (", inex = %d, flags = %u\n", -+ SIGN (inex2), flags2); -+ exit (1); -+ } /* div */ -+ } /* k */ -+ mpfr_clears (z1, z2, (mpfr_ptr) 0); -+ } /* prec */ -+ } /* i */ - mpfr_clears (x, y, (mpfr_ptr) 0); - set_emin (emin); - } diff --git a/patches/mpfr/3.1.3/140-frexp.patch b/patches/mpfr/3.1.3/140-frexp.patch deleted file mode 100644 index e0d5e09..0000000 --- a/patches/mpfr/3.1.3/140-frexp.patch +++ /dev/null @@ -1,204 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2015-07-17 08:58:21.094987384 +0000 -+++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:58:21.118986898 +0000 -@@ -0,0 +1 @@ -+frexp -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2015-07-17 08:54:48.616811495 +0000 -+++ mpfr-3.1.3-b/VERSION 2015-07-17 08:58:21.118986898 +0000 -@@ -1 +1 @@ --3.1.3-p3 -+3.1.3-p4 -diff -Naurd mpfr-3.1.3-a/src/frexp.c mpfr-3.1.3-b/src/frexp.c ---- mpfr-3.1.3-a/src/frexp.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/frexp.c 2015-07-17 08:58:21.106987142 +0000 -@@ -26,6 +26,13 @@ - mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd) - { - int inex; -+ unsigned int saved_flags = __gmpfr_flags; -+ MPFR_BLOCK_DECL (flags); -+ -+ MPFR_LOG_FUNC -+ (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec (x), mpfr_log_prec, x, rnd), -+ ("y[%Pu]=%.*Rg exp=%" MPFR_EXP_FSPEC "d inex=%d", mpfr_get_prec (y), -+ mpfr_log_prec, y, (mpfr_eexp_t) *exp, inex)); - - if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x))) - { -@@ -49,8 +56,32 @@ - } - } - -- inex = mpfr_set (y, x, rnd); -+ MPFR_BLOCK (flags, inex = mpfr_set (y, x, rnd)); -+ __gmpfr_flags = saved_flags; -+ -+ /* Possible overflow due to the rounding, no possible underflow. */ -+ -+ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags))) -+ { -+ int inex2; -+ -+ /* An overflow here means that the exponent of y would be larger than -+ the one of x, thus x would be rounded to the next power of 2, and -+ the returned y should be 1/2 in absolute value, rounded (i.e. with -+ possible underflow or overflow). This also implies that x and y are -+ different objects, so that the exponent of x has not been lost. */ -+ MPFR_LOG_MSG (("Internal overflow\n", 0)); -+ MPFR_ASSERTD (x != y); -+ *exp = MPFR_GET_EXP (x) + 1; -+ inex2 = mpfr_set_si_2exp (y, MPFR_INT_SIGN (x), -1, rnd); -+ MPFR_LOG_MSG (("inex=%d inex2=%d\n", inex, inex2)); -+ if (inex2 != 0) -+ inex = inex2; -+ MPFR_RET (inex); -+ } -+ - *exp = MPFR_GET_EXP (y); -- MPFR_SET_EXP (y, 0); -+ /* Do not use MPFR_SET_EXP because the range has not been checked yet. */ -+ MPFR_EXP (y) = 0; - return mpfr_check_range (y, inex, rnd); - } -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:58:21.114986979 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p3" -+#define MPFR_VERSION_STRING "3.1.3-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2015-07-17 08:54:48.616811495 +0000 -+++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:58:21.118986898 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p3"; -+ return "3.1.3-p4"; - } -diff -Naurd mpfr-3.1.3-a/tests/tfrexp.c mpfr-3.1.3-b/tests/tfrexp.c ---- mpfr-3.1.3-a/tests/tfrexp.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tfrexp.c 2015-07-17 08:58:21.106987142 +0000 -@@ -129,12 +129,115 @@ - mpfr_clear (x); - } - -+static void check1 (void) -+{ -+ mpfr_exp_t emin, emax, e; -+ mpfr_t x, y1, y2; -+ int r, neg, red; -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ -+ mpfr_init2 (x, 7); -+ mpfr_inits2 (4, y1, y2, (mpfr_ptr) 0); -+ -+ mpfr_set_ui_2exp (x, 1, -2, MPFR_RNDN); -+ while (mpfr_regular_p (x)) -+ { -+ /* Test the exponents up to 3 and with the maximum exponent -+ (to check potential intermediate overflow). */ -+ if (MPFR_GET_EXP (x) == 4) -+ mpfr_set_exp (x, MPFR_EMAX_MAX); -+ e = MPFR_GET_EXP (x); -+ for (neg = 0; neg < 2; neg++) -+ { -+ RND_LOOP (r) -+ { -+ int inex1, inex2; -+ mpfr_exp_t e1, e2; -+ unsigned int flags1, flags2; -+ -+ for (red = 0; red < 2; red++) -+ { -+ if (red) -+ { -+ /* e1: exponent of the rounded value of x. */ -+ MPFR_ASSERTN (e1 == e || e1 == e + 1); -+ set_emin (e); -+ set_emax (e); -+ mpfr_clear_flags (); -+ inex1 = e1 < 0 ? -+ mpfr_mul_2ui (y1, x, -e1, (mpfr_rnd_t) r) : -+ mpfr_div_2ui (y1, x, e1, (mpfr_rnd_t) r); -+ flags1 = __gmpfr_flags; -+ } -+ else -+ { -+ inex1 = mpfr_set (y1, x, (mpfr_rnd_t) r); -+ e1 = MPFR_IS_INF (y1) ? e + 1 : MPFR_GET_EXP (y1); -+ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0; -+ } -+ mpfr_clear_flags (); -+ inex2 = mpfr_frexp (&e2, y2, x, (mpfr_rnd_t) r); -+ flags2 = __gmpfr_flags; -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ if ((!red || e == 0) && -+ (! mpfr_regular_p (y2) || MPFR_GET_EXP (y2) != 0)) -+ { -+ printf ("Error in check1 for %s, red = %d, x = ", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red); -+ mpfr_dump (x); -+ printf ("Expected 1/2 <= |y| < 1, got y = "); -+ mpfr_dump (y2); -+ exit (1); -+ } -+ if (!red) -+ { -+ if (e2 > 0) -+ mpfr_mul_2ui (y2, y2, e2, MPFR_RNDN); -+ else if (e2 < 0) -+ mpfr_div_2ui (y2, y2, -e2, MPFR_RNDN); -+ } -+ if (! (SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (y1, y2) && -+ flags1 == flags2)) -+ { -+ printf ("Error in check1 for %s, red = %d, x = ", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red); -+ mpfr_dump (x); -+ printf ("Expected y1 = "); -+ mpfr_dump (y1); -+ printf ("Got y2 = "); -+ mpfr_dump (y2); -+ printf ("Expected inex ~= %d, got %d\n", inex1, inex2); -+ printf ("Expected flags:"); -+ flags_out (flags1); -+ printf ("Got flags: "); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ } -+ mpfr_neg (x, x, MPFR_RNDN); -+ } -+ mpfr_nextabove (x); -+ } -+ -+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0); -+ set_emin (emin); -+ set_emax (emax); -+} -+ - int - main (int argc, char *argv[]) - { - tests_start_mpfr (); - - check_special (); -+ check1 (); - - tests_end_mpfr (); - return 0; diff --git a/patches/mpfr/3.1.3/150-divhigh-basecase.patch b/patches/mpfr/3.1.3/150-divhigh-basecase.patch deleted file mode 100644 index ef8d891..0000000 --- a/patches/mpfr/3.1.3/150-divhigh-basecase.patch +++ /dev/null @@ -1,131 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2015-10-29 13:47:46.735901185 +0000 -+++ mpfr-3.1.3-b/PATCHES 2015-10-29 13:47:46.763900609 +0000 -@@ -0,0 +1 @@ -+divhigh-basecase -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2015-07-17 08:58:21.118986898 +0000 -+++ mpfr-3.1.3-b/VERSION 2015-10-29 13:47:46.763900609 +0000 -@@ -1 +1 @@ --3.1.3-p4 -+3.1.3-p5 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2015-07-17 08:58:21.114986979 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2015-10-29 13:47:46.759900692 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p4" -+#define MPFR_VERSION_STRING "3.1.3-p5" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/mulders.c mpfr-3.1.3-b/src/mulders.c ---- mpfr-3.1.3-a/src/mulders.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/mulders.c 2015-10-29 13:47:46.751900855 +0000 -@@ -236,9 +236,10 @@ - that in addition to the limb np[n-1] to reduce, we have at least 2 - extra limbs, thus accessing np[n-3] is valid. */ - -- /* warning: we can have np[n-1]=d1 and np[n-2]=d0, but since {np,n} < D, -- the largest possible partial quotient is B-1 */ -- if (MPFR_UNLIKELY(np[n - 1] == d1 && np[n - 2] == d0)) -+ /* Warning: we can have np[n-1]>d1 or (np[n-1]=d1 and np[n-2]>=d0) here, -+ since we truncate the divisor at each step, but since {np,n} < D -+ originally, the largest possible partial quotient is B-1. */ -+ if (MPFR_UNLIKELY(np[n-1] > d1 || (np[n-1] == d1 && np[n-2] >= d0))) - q2 = ~ (mp_limb_t) 0; - else - udiv_qr_3by2 (q2, q1, q0, np[n - 1], np[n - 2], np[n - 3], -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2015-07-17 08:58:21.118986898 +0000 -+++ mpfr-3.1.3-b/src/version.c 2015-10-29 13:47:46.763900609 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p4"; -+ return "3.1.3-p5"; - } -diff -Naurd mpfr-3.1.3-a/tests/tdiv.c mpfr-3.1.3-b/tests/tdiv.c ---- mpfr-3.1.3-a/tests/tdiv.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tdiv.c 2015-10-29 13:47:46.751900855 +0000 -@@ -1099,6 +1099,69 @@ - mpfr_set_emax (old_emax); - } - -+/* Bug in mpfr_divhigh_n_basecase when all limbs of q (except the most -+ significant one) are B-1 where B=2^GMP_NUMB_BITS. Since we truncate -+ the divisor at each step, it might happen at some point that -+ (np[n-1],np[n-2]) > (d1,d0), and not only the equality. -+ Reported by Ricky Farr -+ <https://sympa.inria.fr/sympa/arc/mpfr/2015-10/msg00023.html> -+ To get a failure, a MPFR_DIVHIGH_TAB entry below the MPFR_DIV_THRESHOLD -+ limit must have a value 0. With most mparam.h files, this cannot occur. */ -+static void -+test_20151023 (void) -+{ -+ mpfr_prec_t p; -+ mpfr_t n, d, q, q0; -+ int inex, i; -+ -+ for (p = GMP_NUMB_BITS; p <= 2000; p++) -+ { -+ mpfr_init2 (n, 2*p); -+ mpfr_init2 (d, p); -+ mpfr_init2 (q, p); -+ mpfr_init2 (q0, GMP_NUMB_BITS); -+ -+ /* generate a random divisor of p bits */ -+ mpfr_urandomb (d, RANDS); -+ /* generate a random quotient of GMP_NUMB_BITS bits */ -+ mpfr_urandomb (q0, RANDS); -+ /* zero-pad the quotient to p bits */ -+ inex = mpfr_prec_round (q0, p, MPFR_RNDN); -+ MPFR_ASSERTN(inex == 0); -+ -+ for (i = 0; i < 3; i++) -+ { -+ /* i=0: try with the original quotient xxx000...000 -+ i=1: try with the original quotient minus one ulp -+ i=2: try with the original quotient plus one ulp */ -+ if (i == 1) -+ mpfr_nextbelow (q0); -+ else if (i == 2) -+ { -+ mpfr_nextabove (q0); -+ mpfr_nextabove (q0); -+ } -+ -+ inex = mpfr_mul (n, d, q0, MPFR_RNDN); -+ MPFR_ASSERTN(inex == 0); -+ mpfr_nextabove (n); -+ mpfr_div (q, n, d, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_cmp (q, q0) == 0); -+ -+ inex = mpfr_mul (n, d, q0, MPFR_RNDN); -+ MPFR_ASSERTN(inex == 0); -+ mpfr_nextbelow (n); -+ mpfr_div (q, n, d, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_cmp (q, q0) == 0); -+ } -+ -+ mpfr_clear (n); -+ mpfr_clear (d); -+ mpfr_clear (q); -+ mpfr_clear (q0); -+ } -+} -+ - #define TEST_FUNCTION test_div - #define TWO_ARGS - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) -@@ -1219,6 +1282,7 @@ - consistency (); - test_20070603 (); - test_20070628 (); -+ test_20151023 (); - test_generic (2, 800, 50); - test_extreme (); - diff --git a/patches/mpfr/3.1.3/160-jn.patch b/patches/mpfr/3.1.3/160-jn.patch deleted file mode 100644 index e7d04fa..0000000 --- a/patches/mpfr/3.1.3/160-jn.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:10:03.358066124 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:10:03.414066216 +0000 -@@ -0,0 +1 @@ -+jn -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2015-10-29 13:47:46.763900609 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:10:03.414066216 +0000 -@@ -1 +1 @@ --3.1.3-p5 -+3.1.3-p6 -diff -Naurd mpfr-3.1.3-a/src/jyn_asympt.c mpfr-3.1.3-b/src/jyn_asympt.c ---- mpfr-3.1.3-a/src/jyn_asympt.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/jyn_asympt.c 2016-02-15 15:10:03.394066183 +0000 -@@ -253,9 +253,9 @@ - break; - if (diverge != 0) - { -- mpfr_set (c, z, r); /* will force inex=0 below, which means the -- asymptotic expansion failed */ -- break; -+ MPFR_ZIV_FREE (loop); -+ mpfr_clear (c); -+ return 0; /* means that the asymptotic expansion failed */ - } - MPFR_ZIV_NEXT (loop, w); - } -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2015-10-29 13:47:46.759900692 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:10:03.410066210 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p5" -+#define MPFR_VERSION_STRING "3.1.3-p6" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2015-10-29 13:47:46.763900609 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:10:03.414066216 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p5"; -+ return "3.1.3-p6"; - } -diff -Naurd mpfr-3.1.3-a/tests/tj0.c mpfr-3.1.3-b/tests/tj0.c ---- mpfr-3.1.3-a/tests/tj0.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tj0.c 2016-02-15 15:10:03.394066183 +0000 -@@ -99,6 +99,18 @@ - mpfr_j0 (y, x, MPFR_RNDN); - MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_ui_2exp (y, 41, -11) == 0); - -+ /* Bug reported by Fredrik Johansson on 19 Jan 2016 */ -+ mpfr_set_prec (x, 53); -+ mpfr_set_str (x, "0x4.3328p+0", 0, MPFR_RNDN); -+ mpfr_set_prec (y, 2); -+ mpfr_j0 (y, x, MPFR_RNDD); -+ /* y should be -0.5 */ -+ MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_si_2exp (y, -1, -1) == 0); -+ mpfr_set_prec (y, 3); -+ mpfr_j0 (y, x, MPFR_RNDD); -+ /* y should be -0.4375 */ -+ MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_si_2exp (y, -7, -4) == 0); -+ - /* Case for which s = 0 in mpfr_jn */ - mpfr_set_prec (x, 44); - mpfr_set_prec (y, 44); diff --git a/patches/mpfr/3.1.3/170-zeta.patch b/patches/mpfr/3.1.3/170-zeta.patch deleted file mode 100644 index 12faf1d..0000000 --- a/patches/mpfr/3.1.3/170-zeta.patch +++ /dev/null @@ -1,125 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:11:00.898156344 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:11:00.966156445 +0000 -@@ -0,0 +1 @@ -+zeta -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:10:03.414066216 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:11:00.966156445 +0000 -@@ -1 +1 @@ --3.1.3-p6 -+3.1.3-p7 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:10:03.410066210 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:11:00.962156439 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p6" -+#define MPFR_VERSION_STRING "3.1.3-p7" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:10:03.414066216 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:11:00.966156445 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p6"; -+ return "3.1.3-p7"; - } -diff -Naurd mpfr-3.1.3-a/src/zeta.c mpfr-3.1.3-b/src/zeta.c ---- mpfr-3.1.3-a/src/zeta.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/zeta.c 2016-02-15 15:11:00.942156410 +0000 -@@ -377,8 +377,8 @@ - } - } - -- /* Check for case s= 1 before changing the exponent range */ -- if (mpfr_cmp (s, __gmpfr_one) ==0) -+ /* Check for case s=1 before changing the exponent range */ -+ if (mpfr_cmp (s, __gmpfr_one) == 0) - { - MPFR_SET_INF (z); - MPFR_SET_POS (z); -@@ -420,7 +420,7 @@ - MPFR_ZIV_INIT (loop, prec1); - for (;;) - { -- mpfr_sub (s1, __gmpfr_one, s, MPFR_RNDN);/* s1 = 1-s */ -+ mpfr_sub (s1, __gmpfr_one, s, MPFR_RNDN); /* s1 = 1-s */ - mpfr_zeta_pos (z_pre, s1, MPFR_RNDN); /* zeta(1-s) */ - mpfr_gamma (y, s1, MPFR_RNDN); /* gamma(1-s) */ - if (MPFR_IS_INF (y)) /* Zeta(s) < 0 for -4k-2 < s < -4k, -@@ -432,17 +432,32 @@ - break; - } - mpfr_mul (z_pre, z_pre, y, MPFR_RNDN); /* gamma(1-s)*zeta(1-s) */ -- mpfr_const_pi (p, MPFR_RNDD); -- mpfr_mul (y, s, p, MPFR_RNDN); -- mpfr_div_2ui (y, y, 1, MPFR_RNDN); /* s*Pi/2 */ -- mpfr_sin (y, y, MPFR_RNDN); /* sin(Pi*s/2) */ -- mpfr_mul (z_pre, z_pre, y, MPFR_RNDN); -+ -+ mpfr_const_pi (p, MPFR_RNDD); /* p is Pi */ -+ -+ /* multiply z_pre by 2^s*Pi^(s-1) where p=Pi, s1=1-s */ - mpfr_mul_2ui (y, p, 1, MPFR_RNDN); /* 2*Pi */ - mpfr_neg (s1, s1, MPFR_RNDN); /* s-1 */ - mpfr_pow (y, y, s1, MPFR_RNDN); /* (2*Pi)^(s-1) */ - mpfr_mul (z_pre, z_pre, y, MPFR_RNDN); - mpfr_mul_2ui (z_pre, z_pre, 1, MPFR_RNDN); - -+ /* multiply z_pre by sin(Pi*s/2) */ -+ mpfr_mul (y, s, p, MPFR_RNDN); -+ mpfr_div_2ui (p, y, 1, MPFR_RNDN); /* p = s*Pi/2 */ -+ mpfr_sin (y, p, MPFR_RNDN); /* y = sin(Pi*s/2) */ -+ if (MPFR_GET_EXP(y) < 0) /* take account of cancellation in sin(p) */ -+ { -+ mpfr_t t; -+ mpfr_init2 (t, prec1 - MPFR_GET_EXP(y)); -+ mpfr_const_pi (t, MPFR_RNDD); -+ mpfr_mul (t, s, t, MPFR_RNDN); -+ mpfr_div_2ui (t, t, 1, MPFR_RNDN); -+ mpfr_sin (y, t, MPFR_RNDN); -+ mpfr_clear (t); -+ } -+ mpfr_mul (z_pre, z_pre, y, MPFR_RNDN); -+ - if (MPFR_LIKELY (MPFR_CAN_ROUND (z_pre, prec1 - add, precz, - rnd_mode))) - break; -diff -Naurd mpfr-3.1.3-a/tests/tzeta.c mpfr-3.1.3-b/tests/tzeta.c ---- mpfr-3.1.3-a/tests/tzeta.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tzeta.c 2016-02-15 15:11:00.942156410 +0000 -@@ -394,6 +394,27 @@ - mpfr_nextabove (s); - MPFR_ASSERTN (mpfr_equal_p (z, s) && inex > 0); - -+ /* bug reported by Fredrik Johansson on 19 Jan 2016 */ -+ mpfr_set_prec (s, 536); -+ mpfr_set_ui_2exp (s, 1, -424, MPFR_RNDN); -+ mpfr_sub_ui (s, s, 128, MPFR_RNDN); /* -128 + 2^(-424) */ -+ for (prec = 6; prec <= 536; prec += 8) /* should go through 318 */ -+ { -+ mpfr_set_prec (z, prec); -+ mpfr_zeta (z, s, MPFR_RNDD); -+ mpfr_set_prec (y, prec + 10); -+ mpfr_zeta (y, s, MPFR_RNDD); -+ mpfr_prec_round (y, prec, MPFR_RNDD); -+ if (! mpfr_equal_p (z, y)) -+ { -+ printf ("mpfr_zeta fails near -128 for inprec=%lu outprec=%lu\n", -+ (unsigned long) mpfr_get_prec (s), (unsigned long) prec); -+ printf ("expected "); mpfr_dump (y); -+ printf ("got "); mpfr_dump (z); -+ exit (1); -+ } -+ } -+ - mpfr_clear (s); - mpfr_clear (y); - mpfr_clear (z); diff --git a/patches/mpfr/3.1.3/180-sqrt.patch b/patches/mpfr/3.1.3/180-sqrt.patch deleted file mode 100644 index 4887009..0000000 --- a/patches/mpfr/3.1.3/180-sqrt.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:12:59.450314624 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:12:59.510314695 +0000 -@@ -0,0 +1 @@ -+sqrt -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:11:00.966156445 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:12:59.510314695 +0000 -@@ -1 +1 @@ --3.1.3-p7 -+3.1.3-p8 -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:11:00.962156439 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:12:59.510314695 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p7" -+#define MPFR_VERSION_STRING "3.1.3-p8" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/sqrt.c mpfr-3.1.3-b/src/sqrt.c ---- mpfr-3.1.3-a/src/sqrt.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/sqrt.c 2016-02-15 15:12:59.490314671 +0000 -@@ -211,10 +211,11 @@ - rsize --; - sh = 0; - } -+ /* now rsize = MPFR_LIMB_SIZE(r) */ - if (mpn_add_1 (rp0, rp, rsize, MPFR_LIMB_ONE << sh)) - { - expr ++; -- rp[rsize - 1] = MPFR_LIMB_HIGHBIT; -+ rp0[rsize - 1] = MPFR_LIMB_HIGHBIT; - } - goto end; - -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:11:00.966156445 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:12:59.510314695 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p7"; -+ return "3.1.3-p8"; - } -diff -Naurd mpfr-3.1.3-a/tests/tsqrt.c mpfr-3.1.3-b/tests/tsqrt.c ---- mpfr-3.1.3-a/tests/tsqrt.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tsqrt.c 2016-02-15 15:12:59.490314671 +0000 -@@ -569,6 +569,35 @@ - mpfr_clear (y); - } - -+/* Bug reported by Fredrik Johansson, occurring when: -+ - the precision of the result is a multiple of the number of bits -+ per word (GMP_NUMB_BITS), -+ - the rounding mode is to nearest (MPFR_RNDN), -+ - internally, the result has to be rounded up to a power of 2. -+*/ -+static void -+bug20160120 (void) -+{ -+ mpfr_t x, y; -+ -+ mpfr_init2 (x, 4 * GMP_NUMB_BITS); -+ mpfr_init2 (y, GMP_NUMB_BITS); -+ -+ mpfr_set_ui (x, 1, MPFR_RNDN); -+ mpfr_nextbelow (x); -+ mpfr_sqrt (y, x, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_check (y)); -+ MPFR_ASSERTN(mpfr_cmp_ui (y, 1) == 0); -+ -+ mpfr_set_prec (y, 2 * GMP_NUMB_BITS); -+ mpfr_sqrt (y, x, MPFR_RNDN); -+ MPFR_ASSERTN(mpfr_check (y)); -+ MPFR_ASSERTN(mpfr_cmp_ui (y, 1) == 0); -+ -+ mpfr_clear(x); -+ mpfr_clear(y); -+} -+ - #define TEST_FUNCTION test_sqrt - #define TEST_RANDOM_POS 8 - #include "tgeneric.c" -@@ -704,6 +733,8 @@ - data_check ("data/sqrt", mpfr_sqrt, "mpfr_sqrt"); - bad_cases (mpfr_sqrt, mpfr_sqr, "mpfr_sqrt", 8, -256, 255, 4, 128, 800, 50); - -+ bug20160120 (); -+ - tests_end_mpfr (); - return 0; - } diff --git a/patches/mpfr/3.1.3/190-si-ops.patch b/patches/mpfr/3.1.3/190-si-ops.patch deleted file mode 100644 index e4df233..0000000 --- a/patches/mpfr/3.1.3/190-si-ops.patch +++ /dev/null @@ -1,107 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:17:39.214577503 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:17:39.282577552 +0000 -@@ -0,0 +1 @@ -+si-ops -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:12:59.510314695 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:17:39.282577552 +0000 -@@ -1 +1 @@ --3.1.3-p8 -+3.1.3-p9 -diff -Naurd mpfr-3.1.3-a/src/div_ui.c mpfr-3.1.3-b/src/div_ui.c ---- mpfr-3.1.3-a/src/div_ui.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/div_ui.c 2016-02-15 15:17:39.258577534 +0000 -@@ -274,7 +274,8 @@ - res = mpfr_div_ui (y, x, u, rnd_mode); - else - { -- res = -mpfr_div_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode)); -+ res = - mpfr_div_ui (y, x, - (unsigned long) u, -+ MPFR_INVERT_RND (rnd_mode)); - MPFR_CHANGE_SIGN (y); - } - return res; -diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h ---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:12:59.510314695 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:17:39.282577552 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 3 --#define MPFR_VERSION_STRING "3.1.3-p8" -+#define MPFR_VERSION_STRING "3.1.3-p9" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.3-a/src/mul_ui.c mpfr-3.1.3-b/src/mul_ui.c ---- mpfr-3.1.3-a/src/mul_ui.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/mul_ui.c 2016-02-15 15:17:39.258577534 +0000 -@@ -126,7 +126,8 @@ - res = mpfr_mul_ui (y, x, u, rnd_mode); - else - { -- res = -mpfr_mul_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode)); -+ res = - mpfr_mul_ui (y, x, - (unsigned long) u, -+ MPFR_INVERT_RND (rnd_mode)); - MPFR_CHANGE_SIGN (y); - } - return res; -diff -Naurd mpfr-3.1.3-a/src/si_op.c mpfr-3.1.3-b/src/si_op.c ---- mpfr-3.1.3-a/src/si_op.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/si_op.c 2016-02-15 15:17:39.258577534 +0000 -@@ -30,7 +30,7 @@ - if (u >= 0) - return mpfr_add_ui (y, x, u, rnd_mode); - else -- return mpfr_sub_ui (y, x, -u, rnd_mode); -+ return mpfr_sub_ui (y, x, - (unsigned long) u, rnd_mode); - } - - int -@@ -39,7 +39,7 @@ - if (u >= 0) - return mpfr_sub_ui (y, x, u, rnd_mode); - else -- return mpfr_add_ui (y, x, -u, rnd_mode); -+ return mpfr_add_ui (y, x, - (unsigned long) u, rnd_mode); - } - - int -@@ -49,9 +49,9 @@ - return mpfr_ui_sub (y, u, x, rnd_mode); - else - { -- int res = -mpfr_add_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode)); -- MPFR_CHANGE_SIGN (y); -- return res; -+ int res = - mpfr_add_ui (y, x, - (unsigned long) u, -+ MPFR_INVERT_RND (rnd_mode)); -+ MPFR_CHANGE_SIGN (y); -+ return res; - } - } -- -diff -Naurd mpfr-3.1.3-a/src/ui_div.c mpfr-3.1.3-b/src/ui_div.c ---- mpfr-3.1.3-a/src/ui_div.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/ui_div.c 2016-02-15 15:17:39.258577534 +0000 -@@ -106,7 +106,8 @@ - res = mpfr_ui_div (y, u, x, rnd_mode); - else - { -- res = -mpfr_ui_div (y, -u, x, MPFR_INVERT_RND(rnd_mode)); -+ res = - mpfr_ui_div (y, - (unsigned long) u, x, -+ MPFR_INVERT_RND(rnd_mode)); - MPFR_CHANGE_SIGN (y); - } - return res; -diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c ---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:12:59.510314695 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:17:39.282577552 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p8"; -+ return "3.1.3-p9"; - } diff --git a/patches/mpfr/3.1.3/200-can_round.patch b/patches/mpfr/3.1.3/200-can_round.patch deleted file mode 100644 index 6c0f79a..0000000 --- a/patches/mpfr/3.1.3/200-can_round.patch +++ /dev/null @@ -1,413 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:19:24.210647274 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:19:24.274647313 +0000 -@@ -0,0 +1 @@ -+can_round -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:17:39.282577552 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:19:24.274647313 +0000 -@@ -1 +1 @@ --3.1.3-p9 -+3.1.3-p10 -diff -Naurd mpfr-3.1.3-a/src/div.c mpfr-3.1.3-b/src/div.c ---- mpfr-3.1.3-a/src/div.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/div.c 2016-02-15 15:19:24.250647299 +0000 -@@ -310,24 +310,23 @@ - - qp = MPFR_TMP_LIMBS_ALLOC (n); - qh = mpfr_divhigh_n (qp, ap, bp, n); -+ MPFR_ASSERTD (qh == 0 || qh == 1); - /* in all cases, the error is at most (2n+2) ulps on qh*B^n+{qp,n}, - cf algorithms.tex */ - - p = n * GMP_NUMB_BITS - MPFR_INT_CEIL_LOG2 (2 * n + 2); -- /* if qh is 1, then we need only PREC(q)-1 bits of {qp,n}, -- if rnd=RNDN, we need to be able to round with a directed rounding -- and one more bit */ -+ /* If rnd=RNDN, we need to be able to round with a directed rounding -+ and one more bit. */ -+ if (qh == 1) -+ { -+ mpn_rshift (qp, qp, n, 1); -+ qp[n - 1] |= MPFR_LIMB_HIGHBIT; -+ } - if (MPFR_LIKELY (mpfr_round_p (qp, n, p, -- MPFR_PREC(q) + (rnd_mode == MPFR_RNDN) - qh))) -+ MPFR_PREC(q) + (rnd_mode == MPFR_RNDN)))) - { - /* we can round correctly whatever the rounding mode */ -- if (qh == 0) -- MPN_COPY (q0p, qp + 1, q0size); -- else -- { -- mpn_rshift (q0p, qp + 1, q0size, 1); -- q0p[q0size - 1] ^= MPFR_LIMB_HIGHBIT; -- } -+ MPN_COPY (q0p, qp + 1, q0size); - q0p[0] &= ~MPFR_LIMB_MASK(sh); /* put to zero low sh bits */ - - if (rnd_mode == MPFR_RNDN) /* round to nearest */ -@@ -335,15 +334,10 @@ - /* we know we |