From 321990916bd5180b11c598279680794ce9b044e3 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 18 Aug 2017 16:17:53 -0700 Subject: Trim old versions Policy: - Only latest patchlevel for each branch release Exception: CLooG - ISL has dependencies on specific CLooG releases within a single branch - Where there are no patchlevel releases (uClibc, musl) - just retain two most recent releases Also, missed automake update: 1.14 -> 1.14.1 Signed-off-by: Alexey Neyman diff --git a/packages/automake/1.11.1/version.desc b/packages/automake/1.11.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/automake/1.11.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/automake/1.14.1/version.desc b/packages/automake/1.14.1/version.desc new file mode 100644 index 0000000..fcfe389 --- /dev/null +++ b/packages/automake/1.14.1/version.desc @@ -0,0 +1 @@ +obsolete='yes' diff --git a/packages/automake/1.14/version.desc b/packages/automake/1.14/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/automake/1.14/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/avr-libc/1.8.0/version.desc b/packages/avr-libc/1.8.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/avr-libc/1.8.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/binutils/2.26.1/120-sh-conf.patch b/packages/binutils/2.26.1/120-sh-conf.patch new file mode 100644 index 0000000..c12a023 --- /dev/null +++ b/packages/binutils/2.26.1/120-sh-conf.patch @@ -0,0 +1,33 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +diff --git a/configure b/configure +index 87677bc..2d916f1 100755 +--- a/configure ++++ b/configure +@@ -3812,7 +3812,7 @@ case "${target}" in + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +diff --git a/configure.ac b/configure.ac +index 8fe0eca..b10a99f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1140,7 +1140,7 @@ case "${target}" in + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000..2a1320c --- /dev/null +++ b/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch @@ -0,0 +1,26 @@ +diff --git a/ld/Makefile.am b/ld/Makefile.am +index 9575f1f..84df0bf 100644 +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -54,7 +54,7 @@ endif + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff --git a/ld/Makefile.in b/ld/Makefile.in +index 9f56ca1..272860f 100644 +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000..f1f31af --- /dev/null +++ b/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch @@ -0,0 +1,22 @@ +diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em +index 137446f..bb8391a 100644 +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1195,6 +1195,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch new file mode 100644 index 0000000..f2e6ff2 --- /dev/null +++ b/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch @@ -0,0 +1,14 @@ +--- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100 ++++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100 +@@ -102,9 +102,9 @@ + if (err != 0) + gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); + #ifdef PTHREAD_MUTEX_ADAPTIVE_NP +- err = pthread_mutextattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); ++ err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); + if (err != 0) +- gold_fatal(_("pthread_mutextattr_settype failed: %s"), strerror(err)); ++ gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err)); + #endif + + err = pthread_mutex_init(&this->mutex_, &attr); diff --git a/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch new file mode 100644 index 0000000..f9a8af6 --- /dev/null +++ b/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch @@ -0,0 +1,11 @@ +--- binutils-2.25.1/gold/gold-threads.cc.orig 2015-10-20 22:39:36.371169400 +0100 ++++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:39:38.182772700 +0100 +@@ -101,7 +101,7 @@ + int err = pthread_mutexattr_init(&attr); + if (err != 0) + gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); +-#ifdef PTHREAD_MUTEX_ADAPTIVE_NP ++#if defined(PTHREAD_MUTEX_ADAPTIVE_NP) && !defined(_WIN32) + err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); + if (err != 0) + gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err)); diff --git a/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch new file mode 100644 index 0000000..334ee3e --- /dev/null +++ b/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch @@ -0,0 +1,108 @@ +diff --git a/binutils/configure b/binutils/configure +index 6e1f21e..78bf4ae 100755 +--- a/binutils/configure ++++ b/binutils/configure +@@ -12069,6 +12069,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -12230,6 +12231,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" + # If we haven't got the data from the intl directory, +diff --git a/binutils/configure.ac b/binutils/configure.ac +index defe781..8fd236a 100644 +--- a/binutils/configure.ac ++++ b/binutils/configure.ac +@@ -87,7 +87,10 @@ if test -z "$host" ; then + fi + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="bg ca da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" + ZW_GNU_GETTEXT_SISTER_DIR +diff --git a/gas/configure b/gas/configure +index f959e95..9bb4043 100755 +--- a/gas/configure ++++ b/gas/configure +@@ -12819,6 +12819,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -12980,6 +12981,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN" + # If we haven't got the data from the intl directory, +diff --git a/gas/configure.ac b/gas/configure.ac +index 07f825d..c552b7e 100644 +--- a/gas/configure.ac ++++ b/gas/configure.ac +@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.]) + AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN" + ZW_GNU_GETTEXT_SISTER_DIR +diff --git a/ld/configure b/ld/configure +index a446283..1a6bf81 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -16087,6 +16087,7 @@ fi + done + test -n "$YACC" || YACC="yacc" + ++save_LIBS=$LIBS + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. +@@ -16248,6 +16249,8 @@ esac + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi ++LIBS=$save_LIBS ++LEXLIB= + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +diff --git a/ld/configure.ac b/ld/configure.ac +index 188172d..45eec53 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -186,7 +186,10 @@ AM_PO_SUBDIRS + AC_EXEEXT + + AC_PROG_YACC ++save_LIBS=$LIBS + AM_PROG_LEX ++LIBS=$save_LIBS ++LEXLIB= + + AM_MAINTAINER_MODE + AM_CONDITIONAL(GENINSRC_NEVER, false) diff --git a/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch new file mode 100644 index 0000000..e4f235b --- /dev/null +++ b/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch @@ -0,0 +1,13 @@ +diff --git a/gold/binary.cc b/gold/binary.cc +index 52df81a..03a8f20 100644 +--- a/gold/binary.cc ++++ b/gold/binary.cc +@@ -23,7 +23,7 @@ + #include "gold.h" + + #include +-#include ++#include + + #include "elfcpp.h" + #include "stringpool.h" diff --git a/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch new file mode 100644 index 0000000..6168b31 --- /dev/null +++ b/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch @@ -0,0 +1,77 @@ +From c39479f4ab4d372b518957871e1f205a03e7c3d6 Mon Sep 17 00:00:00 2001 +From: Andrew Hsieh +Date: Wed, 18 Mar 2015 10:57:24 +0800 +Subject: [PATCH] Fix darwin build + +1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 + doesn't support ended initializer list +2. wcsncasecmp doesn't exist in MacSDK10.6.x + +Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e +--- + binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++ + binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++--- + 2 files changed, 34 insertions(+), 3 deletions(-) + +diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c +index 13e39e4..7a98306 100644 +--- binutils-2.25.orig/bfd/peXXigen.c ++++ binutils-2.25/bfd/peXXigen.c +@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n) + } + #endif /* HAVE_WCHAR_H and not Cygwin/Mingw */ + ++#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L ++/* wcsncasecmp isn't always defined in Mac SDK */ ++static int ++wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) ++{ ++ wchar_t c1, c2; ++ ++ if (n == 0) ++ return (0); ++ for (; *s1; s1++, s2++) ++ { ++ c1 = towlower(*s1); ++ c2 = towlower(*s2); ++ if (c1 != c2) ++ return ((int)c1 - c2); ++ if (--n == 0) ++ return (0); ++ } ++ return (-*s2); ++} ++#endif ++ + /* Perform a comparison of two entries. */ + static signed int + rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) +diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc +index ff5a8ac..45140e0 100644 +--- binutils-2.25.orig/gold/gold-threads.cc ++++ binutils-2.25/gold/gold-threads.cc +@@ -284,9 +284,18 @@ Condvar::~Condvar() + class Once_initialize + { + public: +- Once_initialize() +- : once_(PTHREAD_ONCE_INIT) +- { } ++ Once_initialize() ++#if !defined(__APPLE__) ++ : once_(PTHREAD_ONCE_INIT) ++ { } ++#else ++// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support ++// extended initializer list as above */ ++ { ++ pthread_once_t once_2 = PTHREAD_ONCE_INIT; ++ once_ = once_2; ++ } ++#endif + + // Return a pointer to the pthread_once_t variable. + pthread_once_t* +-- +2.1.3 + diff --git a/packages/binutils/2.26.1/500-sysroot.patch b/packages/binutils/2.26.1/500-sysroot.patch new file mode 100644 index 0000000..e49c795 --- /dev/null +++ b/packages/binutils/2.26.1/500-sysroot.patch @@ -0,0 +1,37 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,25 @@ + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/packages/binutils/2.26.1/600-poison-system-directories.patch b/packages/binutils/2.26.1/600-poison-system-directories.patch new file mode 100644 index 0000000..aa04082 --- /dev/null +++ b/packages/binutils/2.26.1/600-poison-system-directories.patch @@ -0,0 +1,285 @@ +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman + +diff --git a/ld/config.in b/ld/config.in +index 276fb77..35c58eb 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -14,6 +14,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff --git a/ld/configure b/ld/configure +index a446283..d1f9504 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -786,6 +786,7 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1442,6 +1443,8 @@ Optional Features: + --disable-largefile omit support for large files + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15491,7 +15494,18 @@ else + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +diff --git a/ld/configure.ac b/ld/configure.ac +index 188172d..2cd8443 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff --git a/ld/ld.h b/ld/ld.h +index d84ec4e..3476b26 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -164,6 +164,14 @@ typedef struct { + /* If set, display the target memory usage (per memory region). */ + bfd_boolean print_memory_usage; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index 1dd7492..fb1438e 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2332,6 +2332,18 @@ string identifying the original linked file does not change. + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 96f9ecc..af231c0 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 6f11e7b..0ca3110 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -144,6 +144,8 @@ enum option_values + OPTION_PRINT_MEMORY_USAGE, + OPTION_REQUIRE_DEFINED_SYMBOL, + OPTION_ORPHAN_HANDLING, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index bb0b9cc..a23c56c 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -257,6 +257,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = TRUE; + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff --git a/ld/lexsup.c b/ld/lexsup.c +index 4cad209..be7d584 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] = + { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING}, + '\0', N_("=MODE"), N_("Control how orphan sections are handled."), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv) + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv) + } + break; + ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; ++ + case OPTION_PUSH_STATE: + input_flags.pushed = xmemdup (&input_flags, + sizeof (input_flags), +@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv) + command_line.soname = NULL; + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = TRUE; ++ + while (ingroup) + { + lang_leave_group (); diff --git a/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch new file mode 100644 index 0000000..cea92f3 --- /dev/null +++ b/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch @@ -0,0 +1,42 @@ +From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Sat, 11 Mar 2017 17:27:09 -0800 +Subject: [PATCH] Fix library paths on PowerPC + +First, need to match against just the CPU name, not the whole triplet. +Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin +triplet. + +Second, it should be testing for $target, not $host. Host may be +little endian by default, and the sysroot directory layout shouldn't +depend on whether it is built on LE or BE machine. + +Signed-off-by: Alexey Neyman +--- + ld/emulparams/elf32ppccommon.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh +index 1f54ef8..d00cf68 100644 +--- a/ld/emulparams/elf32ppccommon.sh ++++ b/ld/emulparams/elf32ppccommon.sh +@@ -44,11 +44,11 @@ fi + + # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. + # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc. +-case "$host":"$EMULATION_NAME" in +- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;; +- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;; +- *le-*:*64*) LIBPATH_SUFFIX=64be ;; +- *le-*:*32*) LIBPATH_SUFFIX=32be ;; ++case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in ++ *le:*64lppc*) LIBPATH_SUFFIX=64 ;; ++ *le:*32lppc*) LIBPATH_SUFFIX=32 ;; ++ *le:*64*) LIBPATH_SUFFIX=64be ;; ++ *le:*32*) LIBPATH_SUFFIX=32be ;; + *:*64lppc*) LIBPATH_SUFFIX=64le ;; + *:*32lppc*) LIBPATH_SUFFIX=32le ;; + *:*64*) LIBPATH_SUFFIX=64 ;; +-- +2.9.3 + diff --git a/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch new file mode 100644 index 0000000..66d4e60 --- /dev/null +++ b/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch @@ -0,0 +1,98 @@ +From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 2 Feb 2016 17:11:38 +0300 +Subject: [PATCH] xtensa: fix signedness of gas relocations + +Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation +offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations +substituted for BFD_RELOC_*. This made it impossible to encode arbitrary +8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc +directive. Revert this part and add test. + +gas/ +2016-02-03 Max Filippov + * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF* + substitutions for BFD_RELOC_* as unsigned. + * gas/testsuite/gas/xtensa/all.exp: Add loc to list of xtensa + tests. + * gas/testsuite/gas/xtensa/loc.d: New file: loc test result + patterns. + * gas/testsuite/gas/xtensa/loc.s: New file: loc test. + +Signed-off-by: Max Filippov +--- + gas/config/tc-xtensa.c | 6 +++--- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ + gas/testsuite/gas/xtensa/loc.s | 7 +++++++ + 4 files changed, 21 insertions(+), 3 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/loc.d + create mode 100644 gas/testsuite/gas/xtensa/loc.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index a119871..36a06cc 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + default: + break; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 31b725b..7ff7bd7 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "trampoline" + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" ++ run_dump_test "loc" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d +new file mode 100644 +index 0000000..71983cc +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.d +@@ -0,0 +1,10 @@ ++#as: ++#objdump: -r ++#name: .loc directive relocs ++ ++.*: +file format .*xtensa.* ++ ++RELOCATION RECORDS FOR \[\.debug_line\]: ++#... ++.*R_XTENSA_DIFF16.*\.text\+0x00009c42 ++#... +diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s +new file mode 100644 +index 0000000..029e14e +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.s +@@ -0,0 +1,7 @@ ++ .text ++ .file 1 "loc.s" ++ .loc 1 3 ++ nop ++ .space 40000 ++ .loc 1 5 ++ nop +-- +2.1.4 + diff --git a/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch new file mode 100644 index 0000000..ead3e42 --- /dev/null +++ b/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch @@ -0,0 +1,149 @@ +From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 16 Feb 2016 02:23:28 +0300 +Subject: [PATCH] xtensa: fix .init/.fini literals moving + +Despite the documentation and the comment in xtensa_move_literals, in +the presence of --text-section-literals and --auto-litpools literals are +moved from the separate literal sections into .init and .fini, because +the check in the xtensa_move_literals is incorrect. + +This moving was broken with introduction of auto litpools: some literals +now may be lost. This happens because literal frags emitted from .init +and .fini are not closed when new .literal_position marks new literal +pool. Then frag_align(2, 0, 0) changes type of the last literal frag to +rs_align. rs_align frags are skipped in the xtensa_move_literals. As a +result fixups against such literals are not moved out of .init.literal/ +.fini.literal sections producing the following assembler error: + + test.S: Warning: fixes not all moved from .init.literal + test.S: Internal error! + +Fix check for .init.literal/.fini.literal in the xtensa_move_literals +and don't let it move literals from there in the presence of +--text-section-literals or --auto-litpools. + +2016-02-17 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Fix check for + .init.literal/.fini.literal section name. + * testsuite/gas/xtensa/all.exp: Add init-fini-literals to the + list of xtensa tests. + * testsuite/gas/xtensa/init-fini-literals.d: New file: + init-fini-literals test result patterns. + * testsuite/gas/xtensa/init-fini-literals.s: New file: + init-fini-literals test. + +Signed-off-by: Max Filippov +--- +Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 + + gas/config/tc-xtensa.c | 12 ++++++++++-- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ + gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ + 4 files changed, 54 insertions(+), 2 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 36a06cc..5773634 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -11061,6 +11061,10 @@ xtensa_move_literals (void) + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; + struct litpool_seg *lps; ++ const char *init_name = INIT_SECTION_NAME; ++ const char *fini_name = FINI_SECTION_NAME; ++ int init_name_len = strlen(init_name); ++ int fini_name_len = strlen(fini_name); + + mark_literal_frags (literal_head->next); + +@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) + + for (segment = literal_head->next; segment; segment = segment->next) + { ++ const char *seg_name = segment_name (segment->seg); ++ + /* Keep the literals for .init and .fini in separate sections. */ +- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME) +- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME)) ++ if ((!memcmp (seg_name, init_name, init_name_len) && ++ !strcmp (seg_name + init_name_len, ".literal")) || ++ (!memcmp (seg_name, fini_name, fini_name_len) && ++ !strcmp (seg_name + fini_name_len, ".literal"))) + continue; + + frchain_from = seg_info (segment->seg)->frchainP; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 7ff7bd7..6b67320 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" + run_dump_test "loc" ++ run_dump_test "init-fini-literals" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d +new file mode 100644 +index 0000000..19ed121 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.d +@@ -0,0 +1,24 @@ ++#as: --text-section-literals ++#objdump: -r ++#name: check that literals for .init and .fini always go to separate sections ++ ++.*: +file format .*xtensa.* ++#... ++RELOCATION RECORDS FOR \[\.init\.literal\]: ++#... ++00000000 R_XTENSA_PLT init ++#... ++RELOCATION RECORDS FOR \[\.fini\.literal\]: ++#... ++00000000 R_XTENSA_PLT fini ++#... ++RELOCATION RECORDS FOR \[\.init\]: ++#... ++.* R_XTENSA_SLOT0_OP \.init\.literal ++.* R_XTENSA_SLOT0_OP \.init\.literal\+0x00000004 ++#... ++RELOCATION RECORDS FOR \[\.fini\]: ++#... ++.* R_XTENSA_SLOT0_OP \.fini\.literal ++.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004 ++#... +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s +new file mode 100644 +index 0000000..7c9ec17 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.s +@@ -0,0 +1,19 @@ ++ .section .init,"ax",@progbits ++ .literal_position ++ .literal .LC0, init@PLT ++ .literal_position ++ .literal .LC1, 1 ++ .align 4 ++ ++ l32r a2, .LC0 ++ l32r a2, .LC1 ++ ++ .section .fini,"ax",@progbits ++ .literal_position ++ .literal .LC2, fini@PLT ++ .literal_position ++ .literal .LC3, 1 ++ .align 4 ++ ++ l32r a2, .LC2 ++ l32r a2, .LC3 +-- +2.1.4 + diff --git a/packages/binutils/2.26.1/version.desc b/packages/binutils/2.26.1/version.desc new file mode 100644 index 0000000..e69de29 diff --git a/packages/binutils/2.26/120-sh-conf.patch b/packages/binutils/2.26/120-sh-conf.patch deleted file mode 100644 index c12a023..0000000 --- a/packages/binutils/2.26/120-sh-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ -r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines - -Likewise, binutils has no idea about any of these new targets either, so we -fix that up too.. now we're able to actually build a real toolchain for -sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more -inept targets than that one, really. Go look, I promise). - -diff --git a/configure b/configure -index 87677bc..2d916f1 100755 ---- a/configure -+++ b/configure -@@ -3812,7 +3812,7 @@ case "${target}" in - or1k*-*-*) - noconfigdirs="$noconfigdirs gdb" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${target}" in - sh*-*-elf) - ;; -diff --git a/configure.ac b/configure.ac -index 8fe0eca..b10a99f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1140,7 +1140,7 @@ case "${target}" in - or1k*-*-*) - noconfigdirs="$noconfigdirs gdb" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${target}" in - sh*-*-elf) - ;; diff --git a/packages/binutils/2.26/300-001_ld_makefile_patch.patch b/packages/binutils/2.26/300-001_ld_makefile_patch.patch deleted file mode 100644 index 2a1320c..0000000 --- a/packages/binutils/2.26/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/ld/Makefile.am b/ld/Makefile.am -index 9575f1f..84df0bf 100644 ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -54,7 +54,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ -diff --git a/ld/Makefile.in b/ld/Makefile.in -index 9f56ca1..272860f 100644 ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/packages/binutils/2.26/300-012_check_ldrunpath_length.patch b/packages/binutils/2.26/300-012_check_ldrunpath_length.patch deleted file mode 100644 index f1f31af..0000000 --- a/packages/binutils/2.26/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em -index 137446f..bb8391a 100644 ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1195,6 +1195,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/packages/binutils/2.26/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.26/310-fix-gold-pthreads-typo.patch deleted file mode 100644 index f2e6ff2..0000000 --- a/packages/binutils/2.26/310-fix-gold-pthreads-typo.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100 -+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100 -@@ -102,9 +102,9 @@ - if (err != 0) - gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); - #ifdef PTHREAD_MUTEX_ADAPTIVE_NP -- err = pthread_mutextattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); -+ err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); - if (err != 0) -- gold_fatal(_("pthread_mutextattr_settype failed: %s"), strerror(err)); -+ gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err)); - #endif - - err = pthread_mutex_init(&this->mutex_, &attr); diff --git a/packages/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch deleted file mode 100644 index f9a8af6..0000000 --- a/packages/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- binutils-2.25.1/gold/gold-threads.cc.orig 2015-10-20 22:39:36.371169400 +0100 -+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:39:38.182772700 +0100 -@@ -101,7 +101,7 @@ - int err = pthread_mutexattr_init(&attr); - if (err != 0) - gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); --#ifdef PTHREAD_MUTEX_ADAPTIVE_NP -+#if defined(PTHREAD_MUTEX_ADAPTIVE_NP) && !defined(_WIN32) - err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); - if (err != 0) - gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err)); diff --git a/packages/binutils/2.26/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.26/330-Dont-link-to-libfl-as-its-unnecessary.patch deleted file mode 100644 index 334ee3e..0000000 --- a/packages/binutils/2.26/330-Dont-link-to-libfl-as-its-unnecessary.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/binutils/configure b/binutils/configure -index 6e1f21e..78bf4ae 100755 ---- a/binutils/configure -+++ b/binutils/configure -@@ -12069,6 +12069,7 @@ fi - done - test -n "$YACC" || YACC="yacc" - -+save_LIBS=$LIBS - for ac_prog in flex lex - do - # Extract the first word of "$ac_prog", so it can be a program name with args. -@@ -12230,6 +12231,8 @@ esac - if test "$LEX" = :; then - LEX=${am_missing_run}flex - fi -+LIBS=$save_LIBS -+LEXLIB= - - ALL_LINGUAS="bg ca da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" - # If we haven't got the data from the intl directory, -diff --git a/binutils/configure.ac b/binutils/configure.ac -index defe781..8fd236a 100644 ---- a/binutils/configure.ac -+++ b/binutils/configure.ac -@@ -87,7 +87,10 @@ if test -z "$host" ; then - fi - - AC_PROG_YACC -+save_LIBS=$LIBS - AM_PROG_LEX -+LIBS=$save_LIBS -+LEXLIB= - - ALL_LINGUAS="bg ca da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" - ZW_GNU_GETTEXT_SISTER_DIR -diff --git a/gas/configure b/gas/configure -index f959e95..9bb4043 100755 ---- a/gas/configure -+++ b/gas/configure -@@ -12819,6 +12819,7 @@ fi - done - test -n "$YACC" || YACC="yacc" - -+save_LIBS=$LIBS - for ac_prog in flex lex - do - # Extract the first word of "$ac_prog", so it can be a program name with args. -@@ -12980,6 +12981,8 @@ esac - if test "$LEX" = :; then - LEX=${am_missing_run}flex - fi -+LIBS=$save_LIBS -+LEXLIB= - - ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN" - # If we haven't got the data from the intl directory, -diff --git a/gas/configure.ac b/gas/configure.ac -index 07f825d..c552b7e 100644 ---- a/gas/configure.ac -+++ b/gas/configure.ac -@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.]) - AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) - - AC_PROG_YACC -+save_LIBS=$LIBS - AM_PROG_LEX -+LIBS=$save_LIBS -+LEXLIB= - - ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN" - ZW_GNU_GETTEXT_SISTER_DIR -diff --git a/ld/configure b/ld/configure -index a446283..1a6bf81 100755 ---- a/ld/configure -+++ b/ld/configure -@@ -16087,6 +16087,7 @@ fi - done - test -n "$YACC" || YACC="yacc" - -+save_LIBS=$LIBS - for ac_prog in flex lex - do - # Extract the first word of "$ac_prog", so it can be a program name with args. -@@ -16248,6 +16249,8 @@ esac - if test "$LEX" = :; then - LEX=${am_missing_run}flex - fi -+LIBS=$save_LIBS -+LEXLIB= - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -diff --git a/ld/configure.ac b/ld/configure.ac -index 188172d..45eec53 100644 ---- a/ld/configure.ac -+++ b/ld/configure.ac -@@ -186,7 +186,10 @@ AM_PO_SUBDIRS - AC_EXEEXT - - AC_PROG_YACC -+save_LIBS=$LIBS - AM_PROG_LEX -+LIBS=$save_LIBS -+LEXLIB= - - AM_MAINTAINER_MODE - AM_CONDITIONAL(GENINSRC_NEVER, false) diff --git a/packages/binutils/2.26/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.26/340-Darwin-gold-binary-cc-include-string-not-cstring.patch deleted file mode 100644 index e4f235b..0000000 --- a/packages/binutils/2.26/340-Darwin-gold-binary-cc-include-string-not-cstring.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/gold/binary.cc b/gold/binary.cc -index 52df81a..03a8f20 100644 ---- a/gold/binary.cc -+++ b/gold/binary.cc -@@ -23,7 +23,7 @@ - #include "gold.h" - - #include --#include -+#include - - #include "elfcpp.h" - #include "stringpool.h" diff --git a/packages/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch deleted file mode 100644 index 6168b31..0000000 --- a/packages/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch +++ /dev/null @@ -1,77 +0,0 @@ -From c39479f4ab4d372b518957871e1f205a03e7c3d6 Mon Sep 17 00:00:00 2001 -From: Andrew Hsieh -Date: Wed, 18 Mar 2015 10:57:24 +0800 -Subject: [PATCH] Fix darwin build - -1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 - doesn't support ended initializer list -2. wcsncasecmp doesn't exist in MacSDK10.6.x - -Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e ---- - binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++ - binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++--- - 2 files changed, 34 insertions(+), 3 deletions(-) - -diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c -index 13e39e4..7a98306 100644 ---- binutils-2.25.orig/bfd/peXXigen.c -+++ binutils-2.25/bfd/peXXigen.c -@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n) - } - #endif /* HAVE_WCHAR_H and not Cygwin/Mingw */ - -+#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L -+/* wcsncasecmp isn't always defined in Mac SDK */ -+static int -+wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) -+{ -+ wchar_t c1, c2; -+ -+ if (n == 0) -+ return (0); -+ for (; *s1; s1++, s2++) -+ { -+ c1 = towlower(*s1); -+ c2 = towlower(*s2); -+ if (c1 != c2) -+ return ((int)c1 - c2); -+ if (--n == 0) -+ return (0); -+ } -+ return (-*s2); -+} -+#endif -+ - /* Perform a comparison of two entries. */ - static signed int - rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) -diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc -index ff5a8ac..45140e0 100644 ---- binutils-2.25.orig/gold/gold-threads.cc -+++ binutils-2.25/gold/gold-threads.cc -@@ -284,9 +284,18 @@ Condvar::~Condvar() - class Once_initialize - { - public: -- Once_initialize() -- : once_(PTHREAD_ONCE_INIT) -- { } -+ Once_initialize() -+#if !defined(__APPLE__) -+ : once_(PTHREAD_ONCE_INIT) -+ { } -+#else -+// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support -+// extended initializer list as above */ -+ { -+ pthread_once_t once_2 = PTHREAD_ONCE_INIT; -+ once_ = once_2; -+ } -+#endif - - // Return a pointer to the pthread_once_t variable. - pthread_once_t* --- -2.1.3 - diff --git a/packages/binutils/2.26/500-sysroot.patch b/packages/binutils/2.26/500-sysroot.patch deleted file mode 100644 index e49c795..0000000 --- a/packages/binutils/2.26/500-sysroot.patch +++ /dev/null @@ -1,37 +0,0 @@ -Signed-off-by: Sven Rebhan - -Always try to prepend the sysroot prefix to absolute filenames first. - -http://bugs.gentoo.org/275666 -http://sourceware.org/bugzilla/show_bug.cgi?id=10340 - ---- a/ld/ldfile.c -+++ b/ld/ldfile.c -@@ -308,18 +308,25 @@ - directory first. */ - if (! entry->flags.maybe_archive) - { -- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) -+ /* For absolute pathnames, try to always open the file in the -+ sysroot first. If this fails, try to open the file at the -+ given location. */ -+ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); -+ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) -+ && ld_sysroot) - { - char *name = concat (ld_sysroot, entry->filename, - (const char *) NULL); - if (ldfile_try_open_bfd (name, entry)) - { - entry->filename = name; -+ entry->flags.sysrooted = TRUE; - return TRUE; - } - free (name); - } -- else if (ldfile_try_open_bfd (entry->filename, entry)) -+ -+ if (ldfile_try_open_bfd (entry->filename, entry)) - return TRUE; - - if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/packages/binutils/2.26/600-poison-system-directories.patch b/packages/binutils/2.26/600-poison-system-directories.patch deleted file mode 100644 index aa04082..0000000 --- a/packages/binutils/2.26/600-poison-system-directories.patch +++ /dev/null @@ -1,285 +0,0 @@ -Patch adapted to binutils 2.23.2 and extended to use -BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. - -[Gustavo: adapt to binutils 2.25] -Signed-off-by: Thomas Petazzoni -Signed-off-by: Gustavo Zacarias - -Upstream-Status: Inappropriate [distribution: codesourcery] - -Patch originally created by Mark Hatle, forward-ported to -binutils 2.21 by Scott Garman. - -purpose: warn for uses of system directories when cross linking - -Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 - -2008-07-02 Joseph Myers - - ld/ - * ld.h (args_type): Add error_poison_system_directories. - * ld.texinfo (--error-poison-system-directories): Document. - * ldfile.c (ldfile_add_library_path): Check - command_line.error_poison_system_directories. - * ldmain.c (main): Initialize - command_line.error_poison_system_directories. - * lexsup.c (enum option_values): Add - OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. - (ld_options): Add --error-poison-system-directories. - (parse_args): Handle new option. - -2007-06-13 Joseph Myers - - ld/ - * config.in: Regenerate. - * ld.h (args_type): Add poison_system_directories. - * ld.texinfo (--no-poison-system-directories): Document. - * ldfile.c (ldfile_add_library_path): Check - command_line.poison_system_directories. - * ldmain.c (main): Initialize - command_line.poison_system_directories. - * lexsup.c (enum option_values): Add - OPTION_NO_POISON_SYSTEM_DIRECTORIES. - (ld_options): Add --no-poison-system-directories. - (parse_args): Handle new option. - -2007-04-20 Joseph Myers - - Merge from Sourcery G++ binutils 2.17: - - 2007-03-20 Joseph Myers - Based on patch by Mark Hatle . - ld/ - * configure.ac (--enable-poison-system-directories): New option. - * configure, config.in: Regenerate. - * ldfile.c (ldfile_add_library_path): If - ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, - /usr/lib, /usr/local/lib or /usr/X11R6/lib. - -Signed-off-by: Mark Hatle -Signed-off-by: Scott Garman - -diff --git a/ld/config.in b/ld/config.in -index 276fb77..35c58eb 100644 ---- a/ld/config.in -+++ b/ld/config.in -@@ -14,6 +14,9 @@ - language is requested. */ - #undef ENABLE_NLS - -+/* Define to warn for use of native system library directories */ -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+ - /* Additional extension a shared object might have. */ - #undef EXTRA_SHLIB_EXTENSION - -diff --git a/ld/configure b/ld/configure -index a446283..d1f9504 100755 ---- a/ld/configure -+++ b/ld/configure -@@ -786,6 +786,7 @@ with_lib_path - enable_targets - enable_64_bit_bfd - with_sysroot -+enable_poison_system_directories - enable_gold - enable_got - enable_compressed_debug_sections -@@ -1442,6 +1443,8 @@ Optional Features: - --disable-largefile omit support for large files - --enable-targets alternative target configurations - --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) -+ --enable-poison-system-directories -+ warn for use of native system library directories - --enable-gold[=ARG] build gold [ARG={default,yes,no}] - --enable-got= GOT handling scheme (target, single, negative, - multigot) -@@ -15491,7 +15494,18 @@ else - fi - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then - -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi - - # Check whether --enable-got was given. - if test "${enable_got+set}" = set; then : -diff --git a/ld/configure.ac b/ld/configure.ac -index 188172d..2cd8443 100644 ---- a/ld/configure.ac -+++ b/ld/configure.ac -@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) - AC_SUBST(TARGET_SYSTEM_ROOT) - AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) - -+AC_ARG_ENABLE([poison-system-directories], -+ AS_HELP_STRING([--enable-poison-system-directories], -+ [warn for use of native system library directories]),, -+ [enable_poison_system_directories=no]) -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], -+ [1], -+ [Define to warn for use of native system library directories]) -+fi -+ - dnl Use --enable-gold to decide if this linker should be the default. - dnl "install_as_default" is set to false if gold is the default linker. - dnl "installed_linker" is the installed BFD linker name. -diff --git a/ld/ld.h b/ld/ld.h -index d84ec4e..3476b26 100644 ---- a/ld/ld.h -+++ b/ld/ld.h -@@ -164,6 +164,14 @@ typedef struct { - /* If set, display the target memory usage (per memory region). */ - bfd_boolean print_memory_usage; - -+ /* If TRUE (the default) warn for uses of system directories when -+ cross linking. */ -+ bfd_boolean poison_system_directories; -+ -+ /* If TRUE (default FALSE) give an error for uses of system -+ directories when cross linking instead of a warning. */ -+ bfd_boolean error_poison_system_directories; -+ - /* Big or little endian as set on command line. */ - enum endian_enum endian; - -diff --git a/ld/ld.texinfo b/ld/ld.texinfo -index 1dd7492..fb1438e 100644 ---- a/ld/ld.texinfo -+++ b/ld/ld.texinfo -@@ -2332,6 +2332,18 @@ string identifying the original linked file does not change. - - Passing @code{none} for @var{style} disables the setting from any - @code{--build-id} options earlier on the command line. -+ -+@kindex --no-poison-system-directories -+@item --no-poison-system-directories -+Do not warn for @option{-L} options using system directories such as -+@file{/usr/lib} when cross linking. This option is intended for use -+in chroot environments when such directories contain the correct -+libraries for the target system rather than the host. -+ -+@kindex --error-poison-system-directories -+@item --error-poison-system-directories -+Give an error instead of a warning for @option{-L} options using -+system directories when cross linking. - @end table - - @c man end -diff --git a/ld/ldfile.c b/ld/ldfile.c -index 96f9ecc..af231c0 100644 ---- a/ld/ldfile.c -+++ b/ld/ldfile.c -@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) - new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); - else - new_dirs->name = xstrdup (name); -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (command_line.poison_system_directories -+ && ((!strncmp (name, "/lib", 4)) -+ || (!strncmp (name, "/usr/lib", 8)) -+ || (!strncmp (name, "/usr/local/lib", 14)) -+ || (!strncmp (name, "/usr/X11R6/lib", 14)))) -+ { -+ if (command_line.error_poison_system_directories) -+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " -+ "cross-compilation\n"), name); -+ else -+ einfo (_("%P: warning: library search path \"%s\" is unsafe for " -+ "cross-compilation\n"), name); -+ } -+#endif -+ - } - - /* Try to open a BFD for a lang_input_statement. */ -diff --git a/ld/ldlex.h b/ld/ldlex.h -index 6f11e7b..0ca3110 100644 ---- a/ld/ldlex.h -+++ b/ld/ldlex.h -@@ -144,6 +144,8 @@ enum option_values - OPTION_PRINT_MEMORY_USAGE, - OPTION_REQUIRE_DEFINED_SYMBOL, - OPTION_ORPHAN_HANDLING, -+ OPTION_NO_POISON_SYSTEM_DIRECTORIES, -+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, - }; - - /* The initial parser states. */ -diff --git a/ld/ldmain.c b/ld/ldmain.c -index bb0b9cc..a23c56c 100644 ---- a/ld/ldmain.c -+++ b/ld/ldmain.c -@@ -257,6 +257,8 @@ main (int argc, char **argv) - command_line.warn_mismatch = TRUE; - command_line.warn_search_mismatch = TRUE; - command_line.check_section_addresses = -1; -+ command_line.poison_system_directories = TRUE; -+ command_line.error_poison_system_directories = FALSE; - - /* We initialize DEMANGLING based on the environment variable - COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the -diff --git a/ld/lexsup.c b/ld/lexsup.c -index 4cad209..be7d584 100644 ---- a/ld/lexsup.c -+++ b/ld/lexsup.c -@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] = - { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING}, - '\0', N_("=MODE"), N_("Control how orphan sections are handled."), - TWO_DASHES }, -+ { {"no-poison-system-directories", no_argument, NULL, -+ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, -+ '\0', NULL, N_("Do not warn for -L options using system directories"), -+ TWO_DASHES }, -+ { {"error-poison-system-directories", no_argument, NULL, -+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, -+ '\0', NULL, N_("Give an error for -L options using system directories"), -+ TWO_DASHES }, - }; - - #define OPTION_COUNT ARRAY_SIZE (ld_options) -@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv) - int ingroup = 0; - char *default_dirlist = NULL; - char *shortopts; -+ char *BR_paranoid_env; - struct option *longopts; - struct option *really_longopts; - int last_optind; -@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv) - } - break; - -+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: -+ command_line.poison_system_directories = FALSE; -+ break; -+ -+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: -+ command_line.error_poison_system_directories = TRUE; -+ break; -+ - case OPTION_PUSH_STATE: - input_flags.pushed = xmemdup (&input_flags, - sizeof (input_flags), -@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv) - command_line.soname = NULL; - } - -+ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); -+ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) -+ command_line.error_poison_system_directories = TRUE; -+ - while (ingroup) - { - lang_leave_group (); diff --git a/packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch deleted file mode 100644 index cea92f3..0000000 --- a/packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Sat, 11 Mar 2017 17:27:09 -0800 -Subject: [PATCH] Fix library paths on PowerPC - -First, need to match against just the CPU name, not the whole triplet. -Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin -triplet. - -Second, it should be testing for $target, not $host. Host may be -little endian by default, and the sysroot directory layout shouldn't -depend on whether it is built on LE or BE machine. - -Signed-off-by: Alexey Neyman ---- - ld/emulparams/elf32ppccommon.sh | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh -index 1f54ef8..d00cf68 100644 ---- a/ld/emulparams/elf32ppccommon.sh -+++ b/ld/emulparams/elf32ppccommon.sh -@@ -44,11 +44,11 @@ fi - - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. - # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc. --case "$host":"$EMULATION_NAME" in -- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;; -- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;; -- *le-*:*64*) LIBPATH_SUFFIX=64be ;; -- *le-*:*32*) LIBPATH_SUFFIX=32be ;; -+case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in -+ *le:*64lppc*) LIBPATH_SUFFIX=64 ;; -+ *le:*32lppc*) LIBPATH_SUFFIX=32 ;; -+ *le:*64*) LIBPATH_SUFFIX=64be ;; -+ *le:*32*) LIBPATH_SUFFIX=32be ;; - *:*64lppc*) LIBPATH_SUFFIX=64le ;; - *:*32lppc*) LIBPATH_SUFFIX=32le ;; - *:*64*) LIBPATH_SUFFIX=64 ;; --- -2.9.3 - diff --git a/packages/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch deleted file mode 100644 index 66d4e60..0000000 --- a/packages/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001 -From: Max Filippov -Date: Tue, 2 Feb 2016 17:11:38 +0300 -Subject: [PATCH] xtensa: fix signedness of gas relocations - -Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation -offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations -substituted for BFD_RELOC_*. This made it impossible to encode arbitrary -8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc -directive. Revert this part and add test. - -gas/ -2016-02-03 Max Filippov - * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF* - substitutions for BFD_RELOC_* as unsigned. - * gas/testsuite/gas/xtensa/all.exp: Add loc to list of xtensa - tests. - * gas/testsuite/gas/xtensa/loc.d: New file: loc test result - patterns. - * gas/testsuite/gas/xtensa/loc.s: New file: loc test. - -Signed-off-by: Max Filippov ---- - gas/config/tc-xtensa.c | 6 +++--- - gas/testsuite/gas/xtensa/all.exp | 1 + - gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ - gas/testsuite/gas/xtensa/loc.s | 7 +++++++ - 4 files changed, 21 insertions(+), 3 deletions(-) - create mode 100644 gas/testsuite/gas/xtensa/loc.d - create mode 100644 gas/testsuite/gas/xtensa/loc.s - -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index a119871..36a06cc 100644 ---- a/gas/config/tc-xtensa.c -+++ b/gas/config/tc-xtensa.c -@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) - { - case BFD_RELOC_8: - fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; -- fixP->fx_signed = 1; -+ fixP->fx_signed = 0; - break; - case BFD_RELOC_16: - fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; -- fixP->fx_signed = 1; -+ fixP->fx_signed = 0; - break; - case BFD_RELOC_32: - fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; -- fixP->fx_signed = 1; -+ fixP->fx_signed = 0; - break; - default: - break; -diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp -index 31b725b..7ff7bd7 100644 ---- a/gas/testsuite/gas/xtensa/all.exp -+++ b/gas/testsuite/gas/xtensa/all.exp -@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then { - run_dump_test "trampoline" - run_dump_test "first_frag_align" - run_dump_test "auto-litpools" -+ run_dump_test "loc" - } - - if [info exists errorInfo] then { -diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d -new file mode 100644 -index 0000000..71983cc ---- /dev/null -+++ b/gas/testsuite/gas/xtensa/loc.d -@@ -0,0 +1,10 @@ -+#as: -+#objdump: -r -+#name: .loc directive relocs -+ -+.*: +file format .*xtensa.* -+ -+RELOCATION RECORDS FOR \[\.debug_line\]: -+#... -+.*R_XTENSA_DIFF16.*\.text\+0x00009c42 -+#... -diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s -new file mode 100644 -index 0000000..029e14e ---- /dev/null -+++ b/gas/testsuite/gas/xtensa/loc.s -@@ -0,0 +1,7 @@ -+ .text -+ .file 1 "loc.s" -+ .loc 1 3 -+ nop -+ .space 40000 -+ .loc 1 5 -+ nop --- -2.1.4 - diff --git a/packages/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch deleted file mode 100644 index ead3e42..0000000 --- a/packages/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001 -From: Max Filippov -Date: Tue, 16 Feb 2016 02:23:28 +0300 -Subject: [PATCH] xtensa: fix .init/.fini literals moving - -Despite the documentation and the comment in xtensa_move_literals, in -the presence of --text-section-literals and --auto-litpools literals are -moved from the separate literal sections into .init and .fini, because -the check in the xtensa_move_literals is incorrect. - -This moving was broken with introduction of auto litpools: some literals -now may be lost. This happens because literal frags emitted from .init -and .fini are not closed when new .literal_position marks new literal -pool. Then frag_align(2, 0, 0) changes type of the last literal frag to -rs_align. rs_align frags are skipped in the xtensa_move_literals. As a -result fixups against such literals are not moved out of .init.literal/ -.fini.literal sections producing the following assembler error: - - test.S: Warning: fixes not all moved from .init.literal - test.S: Internal error! - -Fix check for .init.literal/.fini.literal in the xtensa_move_literals -and don't let it move literals from there in the presence of ---text-section-literals or --auto-litpools. - -2016-02-17 Max Filippov -gas/ - * config/tc-xtensa.c (xtensa_move_literals): Fix check for - .init.literal/.fini.literal section name. - * testsuite/gas/xtensa/all.exp: Add init-fini-literals to the - list of xtensa tests. - * testsuite/gas/xtensa/init-fini-literals.d: New file: - init-fini-literals test result patterns. - * testsuite/gas/xtensa/init-fini-literals.s: New file: - init-fini-literals test. - -Signed-off-by: Max Filippov ---- -Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 - - gas/config/tc-xtensa.c | 12 ++++++++++-- - gas/testsuite/gas/xtensa/all.exp | 1 + - gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ - gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ - 4 files changed, 54 insertions(+), 2 deletions(-) - create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d - create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s - -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index 36a06cc..5773634 100644 ---- a/gas/config/tc-xtensa.c -+++ b/gas/config/tc-xtensa.c -@@ -11061,6 +11061,10 @@ xtensa_move_literals (void) - fixS *fix, *next_fix, **fix_splice; - sym_list *lit; - struct litpool_seg *lps; -+ const char *init_name = INIT_SECTION_NAME; -+ const char *fini_name = FINI_SECTION_NAME; -+ int init_name_len = strlen(init_name); -+ int fini_name_len = strlen(fini_name); - - mark_literal_frags (literal_head->next); - -@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) - - for (segment = literal_head->next; segment; segment = segment->next) - { -+ const char *seg_name = segment_name (segment->seg); -+ - /* Keep the literals for .init and .fini in separate sections. */ -- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME) -- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME)) -+ if ((!memcmp (seg_name, init_name, init_name_len) && -+ !strcmp (seg_name + init_name_len, ".literal")) || -+ (!memcmp (seg_name, fini_name, fini_name_len) && -+ !strcmp (seg_name + fini_name_len, ".literal"))) - continue; - - frchain_from = seg_info (segment->seg)->frchainP; -diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp -index 7ff7bd7..6b67320 100644 ---- a/gas/testsuite/gas/xtensa/all.exp -+++ b/gas/testsuite/gas/xtensa/all.exp -@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then { - run_dump_test "first_frag_align" - run_dump_test "auto-litpools" - run_dump_test "loc" -+ run_dump_test "init-fini-literals" - } - - if [info exists errorInfo] then { -diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d -new file mode 100644 -index 0000000..19ed121 ---- /dev/null -+++ b/gas/testsuite/gas/xtensa/init-fini-literals.d -@@ -0,0 +1,24 @@ -+#as: --text-section-literals -+#objdump: -r -+#name: check that literals for .init and .fini always go to separate sections -+ -+.*: +file format .*xtensa.* -+#... -+RELOCATION RECORDS FOR \[\.init\.literal\]: -+#... -+00000000 R_XTENSA_PLT init -+#... -+RELOCATION RECORDS FOR \[\.fini\.literal\]: -+#... -+00000000 R_XTENSA_PLT fini -+#... -+RELOCATION RECORDS FOR \[\.init\]: -+#... -+.* R_XTENSA_SLOT0_OP \.init\.literal -+.* R_XTENSA_SLOT0_OP \.init\.literal\+0x00000004 -+#... -+RELOCATION RECORDS FOR \[\.fini\]: -+#... -+.* R_XTENSA_SLOT0_OP \.fini\.literal -+.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004 -+#... -diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s -new file mode 100644 -index 0000000..7c9ec17 ---- /dev/null -+++ b/gas/testsuite/gas/xtensa/init-fini-literals.s -@@ -0,0 +1,19 @@ -+ .section .init,"ax",@progbits -+ .literal_position -+ .literal .LC0, init@PLT -+ .literal_position -+ .literal .LC1, 1 -+ .align 4 -+ -+ l32r a2, .LC0 -+ l32r a2, .LC1 -+ -+ .section .fini,"ax",@progbits -+ .literal_position -+ .literal .LC2, fini@PLT -+ .literal_position -+ .literal .LC3, 1 -+ .align 4 -+ -+ l32r a2, .LC2 -+ l32r a2, .LC3 --- -2.1.4 - diff --git a/packages/binutils/2.26/version.desc b/packages/binutils/2.26/version.desc deleted file mode 100644 index e69de29..0000000 diff --git a/packages/cloog/0.18.0/version.desc b/packages/cloog/0.18.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/cloog/0.18.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gdb/7.10/10-setns-handling.patch b/packages/gdb/7.10/10-setns-handling.patch deleted file mode 100644 index e2647ad..0000000 --- a/packages/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 -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/packages/gdb/7.10/100-musl_fix.patch b/packages/gdb/7.10/100-musl_fix.patch deleted file mode 100644 index c0c1e0a..0000000 --- a/packages/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 . */ - -+#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/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch deleted file mode 100644 index 1182a45..0000000 --- a/packages/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 -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 ---- - 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/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch deleted file mode 100644 index 982bd7f..0000000 --- a/packages/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 -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 ---- - 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/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch deleted file mode 100644 index 506a57c..0000000 --- a/packages/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 -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 ---- - 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/packages/gdb/7.10/version.desc b/packages/gdb/7.10/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gdb/7.10/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gdb/7.3a/version.desc b/packages/gdb/7.3a/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gdb/7.3a/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gdb/7.4/version.desc b/packages/gdb/7.4/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gdb/7.4/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gdb/7.7/version.desc b/packages/gdb/7.7/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gdb/7.7/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gdb/7.8/version.desc b/packages/gdb/7.8/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gdb/7.8/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gdb/7.9/version.desc b/packages/gdb/7.9/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gdb/7.9/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch b/packages/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch deleted file mode 100644 index f60e88f..0000000 --- a/packages/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/packages/gmp/4.3.0/110-unbounded-alloc.patch b/packages/gmp/4.3.0/110-unbounded-alloc.patch deleted file mode 100644 index 78e0588..0000000 --- a/packages/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/packages/gmp/4.3.0/version.desc b/packages/gmp/4.3.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gmp/4.3.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch b/packages/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch deleted file mode 100644 index f60e88f..0000000 --- a/packages/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/packages/gmp/4.3.1/110-unbounded-alloc.patch b/packages/gmp/4.3.1/110-unbounded-alloc.patch deleted file mode 100644 index 78e0588..0000000 --- a/packages/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/packages/gmp/4.3.1/version.desc b/packages/gmp/4.3.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gmp/4.3.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gmp/5.0.1/100-fix-tests-ABI-long-long.patch b/packages/gmp/5.0.1/100-fix-tests-ABI-long-long.patch deleted file mode 100644 index b6e303e..0000000 --- a/packages/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 -# 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/packages/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch b/packages/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch deleted file mode 100644 index 2e0a1af..0000000 --- a/packages/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 -# 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/packages/gmp/5.0.1/120-fix-r0-clobbering-issue.patch b/packages/gmp/5.0.1/120-fix-r0-clobbering-issue.patch deleted file mode 100644 index d12d6b2..0000000 --- a/packages/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 -# 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/packages/gmp/5.0.1/version.desc b/packages/gmp/5.0.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gmp/5.0.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch b/packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch deleted file mode 100644 index f6faca1..0000000 --- a/packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch +++ /dev/null @@ -1,21 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund -# 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/packages/gmp/5.1.1/110-mpz_powm_ui.patch b/packages/gmp/5.1.1/110-mpz_powm_ui.patch deleted file mode 100644 index f0d240c..0000000 --- a/packages/gmp/5.1.1/110-mpz_powm_ui.patch +++ /dev/null @@ -1,39 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund -# 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/packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch b/packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch deleted file mode 100644 index 13a50ad..0000000 --- a/packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch +++ /dev/null @@ -1,164 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund -# 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/packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch b/packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch deleted file mode 100644 index 9f9f470..0000000 --- a/packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch +++ /dev/null @@ -1,73 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund -# 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/packages/gmp/5.1.1/version.desc b/packages/gmp/5.1.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gmp/5.1.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/gmp/6.1.0/100-fix-broadwell-skylake.patch b/packages/gmp/6.1.0/100-fix-broadwell-skylake.patch deleted file mode 100644 index 9afd339..0000000 --- a/packages/gmp/6.1.0/100-fix-broadwell-skylake.patch +++ /dev/null @@ -1,59 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund -# 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/packages/gmp/6.1.0/version.desc b/packages/gmp/6.1.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/gmp/6.1.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/libelf/0.8.12/100-fix-64-bit-detection.patch b/packages/libelf/0.8.12/100-fix-64-bit-detection.patch deleted file mode 100644 index 7995443..0000000 --- a/packages/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 < - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v2.0.7/version.desc b/packages/mingw-w64/v2.0.7/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v2.0.7/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v2.0.8/version.desc b/packages/mingw-w64/v2.0.8/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v2.0.8/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v4.0.0/version.desc b/packages/mingw-w64/v4.0.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v4.0.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v4.0.1/version.desc b/packages/mingw-w64/v4.0.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v4.0.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v4.0.2/version.desc b/packages/mingw-w64/v4.0.2/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v4.0.2/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v4.0.4/version.desc b/packages/mingw-w64/v4.0.4/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v4.0.4/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch deleted file mode 100644 index d9d5a61..0000000 --- a/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - diff --git a/packages/mingw-w64/v4.0.5/version.desc b/packages/mingw-w64/v4.0.5/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v4.0.5/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch deleted file mode 100644 index 3d05b63..0000000 --- a/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 -@@ -12,9 +12,8 @@ - #define PATHTOOLS_H - - #include --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 -@@ -8,9 +8,8 @@ - .email: . - */ - --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include diff --git a/packages/mingw-w64/v5.0.0/version.desc b/packages/mingw-w64/v5.0.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mingw-w64/v5.0.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch deleted file mode 100644 index 3d05b63..0000000 --- a/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800 -@@ -26,7 +26,9 @@ - #include - #include - #include -+#if defined(HAVE_MALLOC_H) - #include -+#endif - #include - #include - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800 -@@ -21,7 +21,10 @@ - #include "genidl_cfg.h" - #include "genidl_typeinfo.h" - #include "genidl_typinfo.h" -+#if defined(HAVE_MALLOC_H) - #include -+#endif -+#include - #include - #include - -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800 -@@ -12,9 +12,8 @@ - #define PATHTOOLS_H - - #include --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include -diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c ---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800 -+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800 -@@ -8,9 +8,8 @@ - .email: . - */ - --#if defined(__APPLE__) - #include --#else -+#if defined(HAVE_MALLOC_H) - #include - #endif - #include diff --git a/packages/mingw-w64/v5.0.1/version.desc b/packages/mingw-w64/v5.0.1/version.desc deleted file mode 100644 index e69de29..0000000 diff --git a/packages/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff b/packages/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff deleted file mode 100644 index 88e1517..0000000 --- a/packages/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/packages/mpc/0.8.1/version.desc b/packages/mpc/0.8.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpc/0.8.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpc/1.0.1/version.desc b/packages/mpc/1.0.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpc/1.0.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpc/1.0.2/version.desc b/packages/mpc/1.0.2/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpc/1.0.2/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpc/1.0/version.desc b/packages/mpc/1.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpc/1.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/2.4.0/100-printf-hh-ll.patch b/packages/mpfr/2.4.0/100-printf-hh-ll.patch deleted file mode 100644 index e2a9f81..0000000 --- a/packages/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_],, -+ [AC_DEFINE([NPRINTF_HH], 1, [gmp_printf cannot use 'hh' length modifier])]) -+ -+MPFR_FUNC_PRINTF_SPEC([%lld], [long long int], [ -+#include -+ ], [gmp_],, -+ [AC_DEFINE([NPRINTF_LL], 1, [gmp_printf cannot read long long int])]) -+ - MPFR_FUNC_PRINTF_SPEC([%.0Lf], [long double], [ - #include - ], [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 -+ -+#include -+ -+ -+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 -+ -+#include -+ -+ -+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/packages/mpfr/2.4.0/110-mpfr_snprintf.patch b/packages/mpfr/2.4.0/110-mpfr_snprintf.patch deleted file mode 100644 index 92af137..0000000 --- a/packages/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/packages/mpfr/2.4.0/version.desc b/packages/mpfr/2.4.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/2.4.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/2.4.1/100-remainder-neg.patch b/packages/mpfr/2.4.1/100-remainder-neg.patch deleted file mode 100644 index ae92788..0000000 --- a/packages/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/packages/mpfr/2.4.1/110-assert.patch b/packages/mpfr/2.4.1/110-assert.patch deleted file mode 100644 index c6b6aac..0000000 --- a/packages/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/packages/mpfr/2.4.1/120-cast-to-void-ptr.patch b/packages/mpfr/2.4.1/120-cast-to-void-ptr.patch deleted file mode 100644 index e85136a..0000000 --- a/packages/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/packages/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch b/packages/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch deleted file mode 100644 index 08e21f2..0000000 --- a/packages/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/packages/mpfr/2.4.1/140-zeta_ui-shift.patch b/packages/mpfr/2.4.1/140-zeta_ui-shift.patch deleted file mode 100644 index 710c698..0000000 --- a/packages/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/packages/mpfr/2.4.1/150-test-tmul.patch b/packages/mpfr/2.4.1/150-test-tmul.patch deleted file mode 100644 index 8b757d3..0000000 --- a/packages/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/packages/mpfr/2.4.1/version.desc b/packages/mpfr/2.4.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/2.4.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/3.0.0/110-mpfr_out_str.patch b/packages/mpfr/3.0.0/110-mpfr_out_str.patch deleted file mode 100644 index da98aab..0000000 --- a/packages/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/packages/mpfr/3.0.0/120-alloca.patch b/packages/mpfr/3.0.0/120-alloca.patch deleted file mode 100644 index af6dfb2..0000000 --- a/packages/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 -+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 -+# define alloca _alloca -+# else -+# ifdef HAVE_ALLOCA_H -+# include -+# 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/packages/mpfr/3.0.0/130-gamma_underflow.patch b/packages/mpfr/3.0.0/130-gamma_underflow.patch deleted file mode 100644 index cf8a936..0000000 --- a/packages/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/packages/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch b/packages/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch deleted file mode 100644 index 67d6a6a..0000000 --- a/packages/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/packages/mpfr/3.0.0/150-tcan_round.patch b/packages/mpfr/3.0.0/150-tcan_round.patch deleted file mode 100644 index 292e7a5..0000000 --- a/packages/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/packages/mpfr/3.0.0/160-mpfr_sub1.patch b/packages/mpfr/3.0.0/160-mpfr_sub1.patch deleted file mode 100644 index 2ce98e9..0000000 --- a/packages/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/packages/mpfr/3.0.0/170-mpfr_set_ld.patch b/packages/mpfr/3.0.0/170-mpfr_set_ld.patch deleted file mode 100644 index 9209afe..0000000 --- a/packages/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/packages/mpfr/3.0.0/180-macros.patch b/packages/mpfr/3.0.0/180-macros.patch deleted file mode 100644 index 58a490f..0000000 --- a/packages/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/packages/mpfr/3.0.0/version.desc b/packages/mpfr/3.0.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/3.0.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/3.1.0/110-mpfr_unlikely.patch b/packages/mpfr/3.1.0/110-mpfr_unlikely.patch deleted file mode 100644 index 437b1a2..0000000 --- a/packages/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/packages/mpfr/3.1.0/120-lib-search-path.patch b/packages/mpfr/3.1.0/120-lib-search-path.patch deleted file mode 100644 index 4714ac9..0000000 --- a/packages/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/packages/mpfr/3.1.0/130-vasprintf.patch b/packages/mpfr/3.1.0/130-vasprintf.patch deleted file mode 100644 index aa1cfbc..0000000 --- a/packages/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/packages/mpfr/3.1.0/140-gmp41compat.patch b/packages/mpfr/3.1.0/140-gmp41compat.patch deleted file mode 100644 index 4b1ba08..0000000 --- a/packages/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/packages/mpfr/3.1.0/150-logging-freeze.patch b/packages/mpfr/3.1.0/150-logging-freeze.patch deleted file mode 100644 index c664cee..0000000 --- a/packages/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/packages/mpfr/3.1.0/160-logging-varfmt.patch b/packages/mpfr/3.1.0/160-logging-varfmt.patch deleted file mode 100644 index 0f4bfad..0000000 --- a/packages/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/packages/mpfr/3.1.0/170-large-prec.patch b/packages/mpfr/3.1.0/170-large-prec.patch deleted file mode 100644 index 08e7b57..0000000 --- a/packages/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 -+ - #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/packages/mpfr/3.1.0/180-__gmp_const.patch b/packages/mpfr/3.1.0/180-__gmp_const.patch deleted file mode 100644 index 94444b6..0000000 --- a/packages/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 - #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/packages/mpfr/3.1.0/190-gamma-underflow.patch b/packages/mpfr/3.1.0/190-gamma-underflow.patch deleted file mode 100644 index 3de1d19..0000000 --- a/packages/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/packages/mpfr/3.1.0/200-gamma-overunderflow.patch b/packages/mpfr/3.1.0/200-gamma-overunderflow.patch deleted file mode 100644 index e6d6051..0000000 --- a/packages/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/packages/mpfr/3.1.0/version.desc b/packages/mpfr/3.1.0/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/3.1.0/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/3.1.1/110-get_decimal64.patch b/packages/mpfr/3.1.1/110-get_decimal64.patch deleted file mode 100644 index d73a3d7..0000000 --- a/packages/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 /* 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/packages/mpfr/3.1.1/120-strtofr-ternary-value.patch b/packages/mpfr/3.1.1/120-strtofr-ternary-value.patch deleted file mode 100644 index 76dbc45..0000000 --- a/packages/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/packages/mpfr/3.1.1/130-gmp51-compat.patch b/packages/mpfr/3.1.1/130-gmp51-compat.patch deleted file mode 100644 index ecf7537..0000000 --- a/packages/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 - #include -@@ -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/packages/mpfr/3.1.1/version.desc b/packages/mpfr/3.1.1/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/3.1.1/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/3.1.2/110-exp_2.patch b/packages/mpfr/3.1.2/110-exp_2.patch deleted file mode 100644 index 731ea92..0000000 --- a/packages/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/packages/mpfr/3.1.2/120-fits-smallneg.patch b/packages/mpfr/3.1.2/120-fits-smallneg.patch deleted file mode 100644 index b229c18..0000000 --- a/packages/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/packages/mpfr/3.1.2/130-clang-divby0.patch b/packages/mpfr/3.1.2/130-clang-divby0.patch deleted file mode 100644 index 8e0cd8e..0000000 --- a/packages/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/packages/mpfr/3.1.2/140-printf-alt0.patch b/packages/mpfr/3.1.2/140-printf-alt0.patch deleted file mode 100644 index 2451f36..0000000 --- a/packages/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/packages/mpfr/3.1.2/150-custom_init_set.patch b/packages/mpfr/3.1.2/150-custom_init_set.patch deleted file mode 100644 index 669b91d..0000000 --- a/packages/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/packages/mpfr/3.1.2/160-li2-return.patch b/packages/mpfr/3.1.2/160-li2-return.patch deleted file mode 100644 index 50cd04d..0000000 --- a/packages/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/packages/mpfr/3.1.2/170-exp3.patch b/packages/mpfr/3.1.2/170-exp3.patch deleted file mode 100644 index 378c3bf..0000000 --- a/packages/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/packages/mpfr/3.1.2/180-gmp6-compat.patch b/packages/mpfr/3.1.2/180-gmp6-compat.patch deleted file mode 100644 index 2245c7c..0000000 --- a/packages/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 - #include - #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 - #include - #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/packages/mpfr/3.1.2/190-div-overflow.patch b/packages/mpfr/3.1.2/190-div-overflow.patch deleted file mode 100644 index 6ff7c4a..0000000 --- a/packages/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/packages/mpfr/3.1.2/200-vasprintf.patch b/packages/mpfr/3.1.2/200-vasprintf.patch deleted file mode 100644 index 43848f7..0000000 --- a/packages/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/packages/mpfr/3.1.2/210-strtofr.patch b/packages/mpfr/3.1.2/210-strtofr.patch deleted file mode 100644 index 462162e..0000000 --- a/packages/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/packages/mpfr/3.1.2/version.desc b/packages/mpfr/3.1.2/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/3.1.2/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/mpfr/3.1.3/110-lngamma-and-doc.patch b/packages/mpfr/3.1.3/110-lngamma-and-doc.patch deleted file mode 100644 index d7e1cbf..0000000 --- a/packages/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/packages/mpfr/3.1.3/120-muldiv-2exp-overflow.patch b/packages/mpfr/3.1.3/120-muldiv-2exp-overflow.patch deleted file mode 100644 index df711fd..0000000 --- a/packages/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/packages/mpfr/3.1.3/130-muldiv-2exp-underflow.patch b/packages/mpfr/3.1.3/130-muldiv-2exp-underflow.patch deleted file mode 100644 index c7be09f..0000000 --- a/packages/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 ("%ld", (long) e); -+ else -+ printf ("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 -+ -+ 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/packages/mpfr/3.1.3/160-jn.patch b/packages/mpfr/3.1.3/160-jn.patch deleted file mode 100644 index e7d04fa..0000000 --- a/packages/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/packages/mpfr/3.1.3/170-zeta.patch b/packages/mpfr/3.1.3/170-zeta.patch deleted file mode 100644 index 12faf1d..0000000 --- a/packages/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/packages/mpfr/3.1.3/180-sqrt.patch b/packages/mpfr/3.1.3/180-sqrt.patch deleted file mode 100644 index 4887009..0000000 --- a/packages/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/packages/mpfr/3.1.3/190-si-ops.patch b/packages/mpfr/3.1.3/190-si-ops.patch deleted file mode 100644 index e4df233..0000000 --- a/packages/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/packages/mpfr/3.1.3/200-can_round.patch b/packages/mpfr/3.1.3/200-can_round.patch deleted file mode 100644 index 6c0f79a..0000000 --- a/packages/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 can round, thus we are never in the even rule case: - if the round bit is 0, we truncate - if the round bit is 1, we add 1 */ -- if (qh == 0) -- { -- if (sh > 0) -- round_bit = (qp[1] >> (sh - 1)) & 1; -- else -- round_bit = qp[0] >> (GMP_NUMB_BITS - 1); -- } -- else /* qh = 1 */ -- round_bit = (qp[1] >> sh) & 1; -+ if (sh > 0) -+ round_bit = (qp[1] >> (sh - 1)) & 1; -+ else -+ round_bit = qp[0] >> (GMP_NUMB_BITS - 1); - if (round_bit == 0) - { - inex = -1; -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:17:39.282577552 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:19:24.270647311 +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-p9" -+#define MPFR_VERSION_STRING "3.1.3-p10" - - /* 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/round_p.c mpfr-3.1.3-b/src/round_p.c ---- mpfr-3.1.3-a/src/round_p.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/round_p.c 2016-02-15 15:19:24.250647299 +0000 -@@ -31,7 +31,11 @@ - { - int i1, i2; - -+ MPFR_ASSERTN(bp[bn - 1] & MPFR_LIMB_HIGHBIT); -+ - i1 = mpfr_round_p_2 (bp, bn, err0, prec); -+ -+ /* compare with mpfr_can_round_raw */ - i2 = mpfr_can_round_raw (bp, bn, MPFR_SIGN_POS, err0, - MPFR_RNDN, MPFR_RNDZ, prec); - if (i1 != i2) -@@ -42,6 +46,7 @@ - gmp_fprintf (stderr, "%NX\n", bp, bn); - MPFR_ASSERTN (0); - } -+ - return i1; - } - # define mpfr_round_p mpfr_round_p_2 -@@ -62,6 +67,8 @@ - mp_limb_t tmp, mask; - int s; - -+ MPFR_ASSERTD(bp[bn - 1] & MPFR_LIMB_HIGHBIT); -+ - err = (mpfr_prec_t) bn * GMP_NUMB_BITS; - if (MPFR_UNLIKELY (err0 <= 0 || (mpfr_uexp_t) err0 <= prec || prec >= err)) - return 0; /* can't round */ -diff -Naurd mpfr-3.1.3-a/src/round_prec.c mpfr-3.1.3-b/src/round_prec.c ---- mpfr-3.1.3-a/src/round_prec.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/round_prec.c 2016-02-15 15:19:24.250647299 +0000 -@@ -141,24 +141,40 @@ - mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err0, - mpfr_rnd_t rnd1, mpfr_rnd_t rnd2, mpfr_prec_t prec) - { -- mpfr_prec_t err; -+ mpfr_prec_t err, prec0 = prec; - mp_size_t k, k1, tn; - int s, s1; - mp_limb_t cc, cc2; - mp_limb_t *tmp; - MPFR_TMP_DECL(marker); - -+ MPFR_ASSERTD(bp[bn - 1] & MPFR_LIMB_HIGHBIT); -+ - if (MPFR_UNLIKELY(err0 < 0 || (mpfr_uexp_t) err0 <= prec)) - return 0; /* can't round */ -- else if (MPFR_UNLIKELY (prec > (mpfr_prec_t) bn * GMP_NUMB_BITS)) -- { /* then ulp(b) < precision < error */ -- return rnd2 == MPFR_RNDN && (mpfr_uexp_t) err0 - 2 >= prec; -- /* can round only in rounding to the nearest and err0 >= prec + 2 */ -- } - - MPFR_ASSERT_SIGN(neg); - neg = MPFR_IS_NEG_SIGN(neg); - -+ /* Transform RNDD and RNDU to Zero / Away */ -+ MPFR_ASSERTD((neg == 0) || (neg == 1)); -+ if (rnd1 != MPFR_RNDN) -+ rnd1 = MPFR_IS_LIKE_RNDZ(rnd1, neg) ? MPFR_RNDZ : MPFR_RNDA; -+ if (rnd2 != MPFR_RNDN) -+ rnd2 = MPFR_IS_LIKE_RNDZ(rnd2, neg) ? MPFR_RNDZ : MPFR_RNDA; -+ -+ if (MPFR_UNLIKELY (prec > (mpfr_prec_t) bn * GMP_NUMB_BITS)) -+ { /* Then prec < PREC(b): we can round: -+ (i) in rounding to the nearest iff err0 >= prec + 2 -+ (ii) in directed rounding mode iff rnd1 is compatible with rnd2 -+ and err0 >= prec + 1, unless b = 2^k and rnd1=rnd2=RNDA in -+ which case we need err0 >= prec + 2. */ -+ if (rnd2 == MPFR_RNDN) -+ return (mpfr_uexp_t) err0 - 2 >= prec; -+ else -+ return (rnd1 == rnd2) && (mpfr_uexp_t) err0 - 2 >= prec; -+ } -+ - /* if the error is smaller than ulp(b), then anyway it will propagate - up to ulp(b) */ - err = ((mpfr_uexp_t) err0 > (mpfr_prec_t) bn * GMP_NUMB_BITS) ? -@@ -168,19 +184,25 @@ - k = (err - 1) / GMP_NUMB_BITS; - MPFR_UNSIGNED_MINUS_MODULO(s, err); - /* the error corresponds to bit s in limb k, the most significant limb -- being limb 0 */ -+ being limb 0; in memory, limb k is bp[bn-1-k]. */ - - k1 = (prec - 1) / GMP_NUMB_BITS; - MPFR_UNSIGNED_MINUS_MODULO(s1, prec); -- /* the last significant bit is bit s1 in limb k1 */ -+ /* the least significant bit is bit s1 in limb k1 */ - -- /* don't need to consider the k1 most significant limbs */ -+ /* We don't need to consider the k1 most significant limbs. -+ They will be considered later only to detect when subtracting -+ the error bound yields a change of binade. -+ Warning! The number with updated bn may no longer be normalized. */ - k -= k1; - bn -= k1; - prec -= (mpfr_prec_t) k1 * GMP_NUMB_BITS; - -- /* if when adding or subtracting (1 << s) in bp[bn-1-k], it does not -- change bp[bn-1] >> s1, then we can round */ -+ /* We can decide of the correct rounding if rnd2(b-eps) and rnd2(b+eps) -+ give the same result to the target precision 'prec', i.e., if when -+ adding or subtracting (1 << s) in bp[bn-1-k], it does not change the -+ rounding in direction 'rnd2' at ulp-position bp[bn-1] >> s1, taking also -+ into account the possible change of binade. */ - MPFR_TMP_MARK(marker); - tn = bn; - k++; /* since we work with k+1 everywhere */ -@@ -190,11 +212,6 @@ - - MPFR_ASSERTD (k > 0); - -- /* Transform RNDD and RNDU to Zero / Away */ -- MPFR_ASSERTD((neg == 0) || (neg ==1)); -- if (MPFR_IS_RNDUTEST_OR_RNDDNOTTEST(rnd1, neg)) -- rnd1 = MPFR_RNDZ; -- - switch (rnd1) - { - case MPFR_RNDZ: -@@ -203,33 +220,54 @@ - /* mpfr_round_raw2 returns 1 if one should add 1 at ulp(b,prec), - and 0 otherwise */ - cc ^= mpfr_round_raw2 (bp, bn, neg, rnd2, prec); -- /* cc is the new value of bit s1 in bp[bn-1] */ -+ /* cc is the new value of bit s1 in bp[bn-1] after rounding 'rnd2' */ -+ - /* now round b + 2^(MPFR_EXP(b)-err) */ -- cc2 = mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s); -+ mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s); -+ /* if there was a carry here, then necessarily bit s1 of bp[bn-1] -+ changed, thus we surely cannot round for directed rounding, but this -+ will be detected below, with cc2 != cc */ - break; - case MPFR_RNDN: - /* Round to nearest */ -- /* first round b+2^(MPFR_EXP(b)-err) */ -- cc = mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s); -+ -+ /* first round b+2^(MPFR_EXP(b)-err) */ -+ mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s); -+ /* same remark as above in case a carry occurs in mpn_add_1() */ - cc = (tmp[bn - 1] >> s1) & 1; /* gives 0 when cc=1 */ - cc ^= mpfr_round_raw2 (tmp, bn, neg, rnd2, prec); -+ /* cc is the new value of bit s1 in bp[bn-1]+eps after rounding 'rnd2' */ -+ -+ subtract_eps: - /* now round b-2^(MPFR_EXP(b)-err) */ - cc2 = mpn_sub_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s); -+ /* propagate the potential borrow up to the most significant limb -+ (it cannot propagate further since the most significant limb is -+ at least MPFR_LIMB_HIGHBIT) */ -+ for (tn = 0; tn + 1 < k1 && (cc2 != 0); tn ++) -+ cc2 = bp[bn + tn] == 0; -+ /* We have an exponent decrease when either: -+ (i) k1 = 0 and tmp[bn-1] < MPFR_LIMB_HIGHBIT -+ (ii) k1 > 0 and cc <> 0 and bp[bn + tn] = MPFR_LIMB_HIGHBIT -+ (then necessarily tn = k1-1). -+ Then for directed rounding we cannot round, -+ and for rounding to nearest we cannot round when err = prec + 1. -+ */ -+ if (((k1 == 0 && tmp[bn - 1] < MPFR_LIMB_HIGHBIT) || -+ (k1 != 0 && cc2 != 0 && bp[bn + tn] == MPFR_LIMB_HIGHBIT)) && -+ (rnd2 != MPFR_RNDN || err0 == prec0 + 1)) -+ { -+ MPFR_TMP_FREE(marker); -+ return 0; -+ } - break; - default: - /* Round away */ - cc = (bp[bn - 1] >> s1) & 1; - cc ^= mpfr_round_raw2 (bp, bn, neg, rnd2, prec); -- /* now round b +/- 2^(MPFR_EXP(b)-err) */ -- cc2 = mpn_sub_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s); -- break; -- } -+ /* cc is the new value of bit s1 in bp[bn-1]+eps after rounding 'rnd2' */ - -- /* if cc2 is 1, then a carry or borrow propagates to the next limb */ -- if (cc2 && cc) -- { -- MPFR_TMP_FREE(marker); -- return 0; -+ goto subtract_eps; - } - - cc2 = (tmp[bn - 1] >> s1) & 1; -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:17:39.282577552 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:19:24.274647313 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p9"; -+ return "3.1.3-p10"; - } -diff -Naurd mpfr-3.1.3-a/tests/tcan_round.c mpfr-3.1.3-b/tests/tcan_round.c ---- mpfr-3.1.3-a/tests/tcan_round.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tcan_round.c 2016-02-15 15:19:24.250647299 +0000 -@@ -1,4 +1,4 @@ --/* Test file for mpfr_can_round. -+/* Test file for mpfr_can_round and mpfr_round_p. - - Copyright 1999, 2001-2015 Free Software Foundation, Inc. - Contributed by the AriC and Caramel projects, INRIA. -@@ -41,6 +41,8 @@ - /* avoid mpn_random which leaks memory */ - for (i = 0; i < n; i++) - buf[i] = randlimb (); -+ /* force the number to be normalized */ -+ buf[n - 1] |= MPFR_LIMB_HIGHBIT; - p = randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; - err = p + randlimb () % GMP_NUMB_BITS; - r1 = mpfr_round_p (buf, n, err, p); -@@ -57,11 +59,72 @@ - } - } - -+/* check x=2^i with precision px, error at most 1, and target precision prec */ -+static void -+test_pow2 (mpfr_exp_t i, mpfr_prec_t px, mpfr_rnd_t r1, mpfr_rnd_t r2, -+ mpfr_prec_t prec) -+{ -+ mpfr_t x; -+ int b, expected_b, b2; -+ -+ mpfr_init2 (x, px); -+ mpfr_set_ui_2exp (x, 1, i, MPFR_RNDN); -+ b = !!mpfr_can_round (x, i+1, r1, r2, prec); -+ /* Note: If mpfr_can_round succeeds for both -+ (r1,r2) = (MPFR_RNDD,MPFR_RNDN) and -+ (r1,r2) = (MPFR_RNDU,MPFR_RNDN), then it should succeed for -+ (r1,r2) = (MPFR_RNDN,MPFR_RNDN). So, the condition on prec below -+ for r1 = MPFR_RNDN should be the most restrictive between those -+ for r1 = any directed rounding mode. -+ For r1 like MPFR_RNDA, the unrounded, unknown number may be anyone -+ in [2^i-1,i]. As both 2^i-1 and 2^i fit on i bits, one cannot round -+ in any precision >= i bits, hence the condition prec < i; prec = i-1 -+ will work here for r2 = MPFR_RNDN thanks to the even-rounding rule -+ (and also with rounding ties away from zero). */ -+ expected_b = -+ MPFR_IS_LIKE_RNDD (r1, MPFR_SIGN_POS) ? -+ (MPFR_IS_LIKE_RNDU (r2, MPFR_SIGN_POS) ? 0 : prec <= i) : -+ MPFR_IS_LIKE_RNDU (r1, MPFR_SIGN_POS) ? -+ (MPFR_IS_LIKE_RNDD (r2, MPFR_SIGN_POS) ? 0 : prec < i) : -+ (r2 != MPFR_RNDN ? 0 : prec < i); -+ /* We only require mpfr_can_round to return 1 when we can really -+ round, it is allowed to return 0 in some rare boundary cases, -+ for example when x = 2^k and the error is 0.25 ulp. -+ Note: if this changes in the future, the test could be improved by -+ removing the "&& expected_b == 0" below. */ -+ if (b != expected_b && expected_b == 0) -+ { -+ printf ("Error for x=2^%d, px=%lu, err=%d, r1=%s, r2=%s, prec=%d\n", -+ (int) i, (unsigned long) px, (int) i + 1, -+ mpfr_print_rnd_mode (r1), mpfr_print_rnd_mode (r2), (int) prec); -+ printf ("Expected %d, got %d\n", expected_b, b); -+ exit (1); -+ } -+ -+ if (r1 == MPFR_RNDN && r2 == MPFR_RNDZ) -+ { -+ /* Similar test to the one done in src/round_p.c -+ for MPFR_WANT_ASSERT >= 2. */ -+ b2 = !!mpfr_round_p (MPFR_MANT(x), MPFR_LIMB_SIZE(x), i+1, prec); -+ if (b2 != b) -+ { -+ printf ("Error for x=2^%d, px=%lu, err=%d, prec=%d\n", -+ (int) i, (unsigned long) px, (int) i + 1, (int) prec); -+ printf ("mpfr_can_round gave %d, mpfr_round_p gave %d\n", b, b2); -+ exit (1); -+ } -+ } -+ -+ mpfr_clear (x); -+} -+ - int - main (void) - { - mpfr_t x; -- mpfr_prec_t i, j; -+ mpfr_prec_t i, j, k; -+ int r1, r2; -+ int n; - - tests_start_mpfr (); - -@@ -111,12 +174,30 @@ - mpfr_set_str (x, "0.ff4ca619c76ba69", 16, MPFR_RNDZ); - for (i = 30; i < 99; i++) - for (j = 30; j < 99; j++) -- { -- int r1, r2; -- for (r1 = 0; r1 < MPFR_RND_MAX ; r1++) -- for (r2 = 0; r2 < MPFR_RND_MAX ; r2++) -- mpfr_can_round (x, i, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j); /* test for assertions */ -- } -+ for (r1 = 0; r1 < MPFR_RND_MAX; r1++) -+ for (r2 = 0; r2 < MPFR_RND_MAX; r2++) -+ { -+ /* test for assertions */ -+ mpfr_can_round (x, i, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j); -+ } -+ -+ test_pow2 (32, 32, MPFR_RNDN, MPFR_RNDN, 32); -+ test_pow2 (174, 174, MPFR_RNDN, MPFR_RNDN, 174); -+ test_pow2 (174, 174, MPFR_RNDU, MPFR_RNDN, 174); -+ test_pow2 (176, 129, MPFR_RNDU, MPFR_RNDU, 174); -+ test_pow2 (176, 2, MPFR_RNDZ, MPFR_RNDZ, 174); -+ test_pow2 (176, 2, MPFR_RNDU, MPFR_RNDU, 176); -+ -+ /* Tests for x = 2^i (E(x) = i+1) with error at most 1 = 2^0. */ -+ for (n = 0; n < 100; n++) -+ { -+ i = (randlimb() % 200) + 4; -+ for (j = i - 2; j < i + 2; j++) -+ for (r1 = 0; r1 < MPFR_RND_MAX; r1++) -+ for (r2 = 0; r2 < MPFR_RND_MAX; r2++) -+ for (k = MPFR_PREC_MIN; k <= i + 2; k++) -+ test_pow2 (i, k, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j); -+ } - - mpfr_clear (x); - diff --git a/packages/mpfr/3.1.3/210-fits.patch b/packages/mpfr/3.1.3/210-fits.patch deleted file mode 100644 index 888389c..0000000 --- a/packages/mpfr/3.1.3/210-fits.patch +++ /dev/null @@ -1,584 +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:20:16.854677843 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:20:16.922677881 +0000 -@@ -0,0 +1 @@ -+fits -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:19:24.274647313 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:20:16.922677881 +0000 -@@ -1 +1 @@ --3.1.3-p10 -+3.1.3-p11 -diff -Naurd mpfr-3.1.3-a/src/fits_intmax.c mpfr-3.1.3-b/src/fits_intmax.c ---- mpfr-3.1.3-a/src/fits_intmax.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/fits_intmax.c 2016-02-15 15:20:16.898677867 +0000 -@@ -33,6 +33,7 @@ - int - mpfr_fits_intmax_p (mpfr_srcptr f, mpfr_rnd_t rnd) - { -+ unsigned int saved_flags; - mpfr_exp_t e; - int prec; - mpfr_t x, y; -@@ -85,6 +86,7 @@ - MPFR_ASSERTD (e == prec); - - /* hard case: first round to prec bits, then check */ -+ saved_flags = __gmpfr_flags; - mpfr_init2 (x, prec); - mpfr_set (x, f, rnd); - -@@ -97,10 +99,16 @@ - } - else - { -- res = MPFR_GET_EXP (x) == e; -+ /* Warning! Due to the rounding, x can be an infinity. Here we use -+ the fact that singular numbers have a special exponent field, -+ thus well-defined and different from e, in which case this means -+ that the number does not fit. That's why we use MPFR_EXP, not -+ MPFR_GET_EXP. */ -+ res = MPFR_EXP (x) == e; - } - - mpfr_clear (x); -+ __gmpfr_flags = saved_flags; - return res; - } - -diff -Naurd mpfr-3.1.3-a/src/fits_s.h mpfr-3.1.3-b/src/fits_s.h ---- mpfr-3.1.3-a/src/fits_s.h 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/fits_s.h 2016-02-15 15:20:16.898677867 +0000 -@@ -29,6 +29,7 @@ - int - FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd) - { -+ unsigned int saved_flags; - mpfr_exp_t e; - int prec; - mpfr_t x; -@@ -81,9 +82,16 @@ - MPFR_ASSERTD (e == prec); - - /* hard case: first round to prec bits, then check */ -+ saved_flags = __gmpfr_flags; - mpfr_init2 (x, prec); - mpfr_set (x, f, rnd); -- res = neg ? (mpfr_cmp_si (x, MINIMUM) >= 0) : (MPFR_GET_EXP (x) == e); -+ /* Warning! Due to the rounding, x can be an infinity. Here we use -+ the fact that singular numbers have a special exponent field, -+ thus well-defined and different from e, in which case this means -+ that the number does not fit. That's why we use MPFR_EXP, not -+ MPFR_GET_EXP. */ -+ res = neg ? (mpfr_cmp_si (x, MINIMUM) >= 0) : (MPFR_EXP (x) == e); - mpfr_clear (x); -+ __gmpfr_flags = saved_flags; - return res; - } -diff -Naurd mpfr-3.1.3-a/src/fits_u.h mpfr-3.1.3-b/src/fits_u.h ---- mpfr-3.1.3-a/src/fits_u.h 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/fits_u.h 2016-02-15 15:20:16.898677867 +0000 -@@ -25,6 +25,7 @@ - int - FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd) - { -+ unsigned int saved_flags; - mpfr_exp_t e; - int prec; - TYPE s; -@@ -62,9 +63,16 @@ - MPFR_ASSERTD (e == prec); - - /* hard case: first round to prec bits, then check */ -+ saved_flags = __gmpfr_flags; - mpfr_init2 (x, prec); - mpfr_set (x, f, rnd); -- res = MPFR_GET_EXP (x) == e; -+ /* Warning! Due to the rounding, x can be an infinity. Here we use -+ the fact that singular numbers have a special exponent field, -+ thus well-defined and different from e, in which case this means -+ that the number does not fit. That's why we use MPFR_EXP, not -+ MPFR_GET_EXP. */ -+ res = MPFR_EXP (x) == e; - mpfr_clear (x); -+ __gmpfr_flags = saved_flags; - 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:19:24.270647311 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:20:16.922677881 +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-p10" -+#define MPFR_VERSION_STRING "3.1.3-p11" - - /* 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:19:24.274647313 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:20:16.922677881 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p10"; -+ return "3.1.3-p11"; - } -diff -Naurd mpfr-3.1.3-a/tests/tfits.c mpfr-3.1.3-b/tests/tfits.c ---- mpfr-3.1.3-a/tests/tfits.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tfits.c 2016-02-15 15:20:16.898677867 +0000 -@@ -33,258 +33,225 @@ - #include "mpfr-intmax.h" - #include "mpfr-test.h" - --#define ERROR1(N) \ -+#define FTEST_AUX(N,NOT,FCT) \ - do \ - { \ -- printf("Error %d for rnd = %s and x = ", N, \ -- mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \ -- mpfr_dump(x); \ -- exit(1); \ -+ __gmpfr_flags = ex_flags; \ -+ if (NOT FCT (x, (mpfr_rnd_t) r)) \ -+ { \ -+ printf ("Error %d for %s, rnd = %s and x = ", \ -+ N, #FCT, \ -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \ -+ mpfr_dump (x); \ -+ exit (1); \ -+ } \ -+ if (__gmpfr_flags != ex_flags) \ -+ { \ -+ unsigned int flags = __gmpfr_flags; \ -+ printf ("Flags error %d for %s, rnd = %s and x = ", \ -+ N, #FCT, \ -+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \ -+ mpfr_dump(x); \ -+ printf ("Expected flags:"); \ -+ flags_out (ex_flags); \ -+ printf ("Got flags: "); \ -+ flags_out (flags); \ -+ exit (1); \ -+ } \ - } \ - while (0) - --static void check_intmax (void); -+#define FTEST(N,NOT,FCT) \ -+ do \ -+ { \ -+ mpfr_exp_t e; \ -+ FTEST_AUX (N,NOT,FCT); \ -+ if (MPFR_IS_SINGULAR (x)) \ -+ break; \ -+ e = mpfr_get_exp (x); \ -+ set_emin (e); \ -+ set_emax (e); \ -+ FTEST_AUX (N,NOT,FCT); \ -+ set_emin (emin); \ -+ set_emax (emax); \ -+ } \ -+ while (0) -+ -+#define CHECK_ALL(N,NOT) \ -+ do \ -+ { \ -+ FTEST (N, NOT, mpfr_fits_ulong_p); \ -+ FTEST (N, NOT, mpfr_fits_slong_p); \ -+ FTEST (N, NOT, mpfr_fits_uint_p); \ -+ FTEST (N, NOT, mpfr_fits_sint_p); \ -+ FTEST (N, NOT, mpfr_fits_ushort_p); \ -+ FTEST (N, NOT, mpfr_fits_sshort_p); \ -+ } \ -+ while (0) -+ -+#define CHECK_MAX(N,NOT) \ -+ do \ -+ { \ -+ FTEST (N, NOT, mpfr_fits_uintmax_p); \ -+ FTEST (N, NOT, mpfr_fits_intmax_p); \ -+ } \ -+ while (0) -+ -+/* V is a non-zero limit for the type (*_MIN for a signed type or *_MAX). -+ * If V is positive, then test V, V + 1/4, V + 3/4 and V + 1. -+ * If V is negative, then test V, V - 1/4, V - 3/4 and V - 1. -+ */ -+#define CHECK_LIM(N,V,SET,FCT) \ -+ do \ -+ { \ -+ SET (x, V, MPFR_RNDN); \ -+ FTEST (N, !, FCT); \ -+ mpfr_set_si_2exp (y, (V) < 0 ? -1 : 1, -2, MPFR_RNDN); \ -+ mpfr_add (x, x, y, MPFR_RNDN); \ -+ FTEST (N+1, (r == MPFR_RNDN || \ -+ MPFR_IS_LIKE_RNDZ (r, (V) < 0)) ^ !!, FCT); \ -+ mpfr_add (x, x, y, MPFR_RNDN); \ -+ mpfr_add (x, x, y, MPFR_RNDN); \ -+ FTEST (N+3, MPFR_IS_LIKE_RNDZ (r, (V) < 0) ^ !!, FCT); \ -+ mpfr_add (x, x, y, MPFR_RNDN); \ -+ FTEST (N+4, !!, FCT); \ -+ } \ -+ while (0) - - int - main (void) - { -+ mpfr_exp_t emin, emax; - mpfr_t x, y; -- int i, r; -+ unsigned int flags[2] = { 0, MPFR_FLAGS_ALL }, ex_flags; -+ int i, r, fi; - - tests_start_mpfr (); - -- mpfr_init2 (x, 256); -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ mpfr_init2 (x, sizeof (unsigned long) * CHAR_BIT + 2); - mpfr_init2 (y, 8); - - RND_LOOP (r) -- { -- -- /* 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); -+ for (fi = 0; fi < numberof (flags); fi++) -+ { -+ ex_flags = flags[fi]; - -- /* 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 NaN */ -+ mpfr_set_nan (x); -+ CHECK_ALL (1, !!); - -- /* 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 +Inf */ -+ mpfr_set_inf (x, 1); -+ CHECK_ALL (2, !!); - -- /* 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 -Inf */ -+ mpfr_set_inf (x, -1); -+ CHECK_ALL (3, !!); - -- /* 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); -+ /* Check +0 */ -+ mpfr_set_zero (x, 1); -+ CHECK_ALL (4, !); - -- /* 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); -+ /* Check -0 */ -+ mpfr_set_zero (x, -1); -+ CHECK_ALL (5, !); - -- 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 small positive op */ -+ mpfr_set_str1 (x, "1@-1"); -+ CHECK_ALL (6, !); - -- 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 17 */ -+ mpfr_set_ui (x, 17, MPFR_RNDN); -+ CHECK_ALL (7, !); - -- /* Check negative op */ -- for (i = 1; i <= 4; i++) -- { -- int inv; -+ /* Check large values (no fit) */ -+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); -+ mpfr_mul_2exp (x, x, 1, MPFR_RNDN); -+ CHECK_ALL (8, !!); -+ mpfr_mul_2exp (x, x, 40, MPFR_RNDN); -+ CHECK_ALL (9, !!); - -- 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); -- } -- } -+ /* Check a non-integer number just below a power of two. */ -+ mpfr_set_ui_2exp (x, 255, -2, MPFR_RNDN); -+ CHECK_ALL (10, !); - -- mpfr_clear (x); -- mpfr_clear (y); -+ /* Check the limits of the types (except 0 for unsigned types) */ -+ CHECK_LIM (20, ULONG_MAX, mpfr_set_ui, mpfr_fits_ulong_p); -+ CHECK_LIM (30, LONG_MAX, mpfr_set_si, mpfr_fits_slong_p); -+ CHECK_LIM (35, LONG_MIN, mpfr_set_si, mpfr_fits_slong_p); -+ CHECK_LIM (40, UINT_MAX, mpfr_set_ui, mpfr_fits_uint_p); -+ CHECK_LIM (50, INT_MAX, mpfr_set_si, mpfr_fits_sint_p); -+ CHECK_LIM (55, INT_MIN, mpfr_set_si, mpfr_fits_sint_p); -+ CHECK_LIM (60, USHRT_MAX, mpfr_set_ui, mpfr_fits_ushort_p); -+ CHECK_LIM (70, SHRT_MAX, mpfr_set_si, mpfr_fits_sshort_p); -+ CHECK_LIM (75, SHRT_MIN, mpfr_set_si, mpfr_fits_sshort_p); - -- check_intmax (); -+ /* Check negative op */ -+ for (i = 1; i <= 4; i++) -+ { -+ int inv; - -- tests_end_mpfr (); -- return 0; --} -+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); -+ mpfr_rint (y, x, (mpfr_rnd_t) r); -+ inv = MPFR_NOTZERO (y); -+ FTEST (80, inv ^ !, mpfr_fits_ulong_p); -+ FTEST (81, !, mpfr_fits_slong_p); -+ FTEST (82, inv ^ !, mpfr_fits_uint_p); -+ FTEST (83, !, mpfr_fits_sint_p); -+ FTEST (84, inv ^ !, mpfr_fits_ushort_p); -+ FTEST (85, !, mpfr_fits_sshort_p); -+ } -+ } - --static void --check_intmax (void) --{ - #ifdef _MPFR_H_HAVE_INTMAX_T -- mpfr_t x, y; -- int i, r; - -- mpfr_init2 (x, sizeof (uintmax_t) * CHAR_BIT); -- mpfr_init2 (y, 8); -+ mpfr_set_prec (x, sizeof (uintmax_t) * CHAR_BIT + 2); - - RND_LOOP (r) - { -- /* Check NAN */ -+ /* 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_MAX (1, !!); - -- /* Check INF */ -+ /* 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_MAX (2, !!); - -- /* 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 -Inf */ -+ mpfr_set_inf (x, -1); -+ CHECK_MAX (3, !!); - -- /* Check positive small op */ -+ /* Check +0 */ -+ mpfr_set_zero (x, 1); -+ CHECK_MAX (4, !); -+ -+ /* Check -0 */ -+ mpfr_set_zero (x, -1); -+ CHECK_MAX (5, !); -+ -+ /* Check small positive 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_MAX (6, !); - - /* 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_MAX (7, !); - - /* 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_MAX (8, !!); - -- /* 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 a non-integer number just below a power of two. */ -+ mpfr_set_ui_2exp (x, 255, -2, MPFR_RNDN); -+ CHECK_MAX (10, !); -+ -+ /* Check the limits of the types (except 0 for uintmax_t) */ -+ CHECK_LIM (20, MPFR_UINTMAX_MAX, mpfr_set_uj, mpfr_fits_uintmax_p); -+ CHECK_LIM (30, MPFR_INTMAX_MAX, mpfr_set_sj, mpfr_fits_intmax_p); -+ CHECK_LIM (35, MPFR_INTMAX_MIN, mpfr_set_sj, mpfr_fits_intmax_p); - - /* Check negative op */ - for (i = 1; i <= 4; i++) -@@ -294,14 +261,16 @@ - 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); -+ FTEST (80, inv ^ !, mpfr_fits_uintmax_p); -+ FTEST (81, !, mpfr_fits_intmax_p); - } - } - -+#endif /* _MPFR_H_HAVE_INTMAX_T */ -+ - mpfr_clear (x); - mpfr_clear (y); --#endif -+ -+ tests_end_mpfr (); -+ return 0; - } diff --git a/packages/mpfr/3.1.3/220-root.patch b/packages/mpfr/3.1.3/220-root.patch deleted file mode 100644 index 9cd62a7..0000000 --- a/packages/mpfr/3.1.3/220-root.patch +++ /dev/null @@ -1,621 +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:20:51.242696408 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:20:51.306696441 +0000 -@@ -0,0 +1 @@ -+root -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:20:16.922677881 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:20:51.306696441 +0000 -@@ -1 +1 @@ --3.1.3-p11 -+3.1.3-p12 -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:20:16.922677881 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:20:51.302696439 +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-p11" -+#define MPFR_VERSION_STRING "3.1.3-p12" - - /* 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/root.c mpfr-3.1.3-b/src/root.c ---- mpfr-3.1.3-a/src/root.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/root.c 2016-02-15 15:20:51.282696429 +0000 -@@ -23,13 +23,15 @@ - #define MPFR_NEED_LONGLONG_H - #include "mpfr-impl.h" - -- /* The computation of y = x^(1/k) is done as follows: -+ /* The computation of y = x^(1/k) is done as follows, except for large -+ values of k, for which this would be inefficient or yield internal -+ integer overflows: - - Let x = sign * m * 2^(k*e) where m is an integer - - with 2^(k*(n-1)) <= m < 2^(k*n) where n = PREC(y) - -- and m = s^k + r where 0 <= r and m < (s+1)^k -+ and m = s^k + t where 0 <= t and m < (s+1)^k - - we want that s has n bits i.e. s >= 2^(n-1), or m >= 2^(k*(n-1)) - i.e. m must have at least k*(n-1)+1 bits -@@ -38,11 +40,15 @@ - x^(1/k) = s * 2^e or (s+1) * 2^e according to the rounding mode. - */ - -+static int -+mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k, -+ mpfr_rnd_t rnd_mode); -+ - int - mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode) - { - mpz_t m; -- mpfr_exp_t e, r, sh; -+ mpfr_exp_t e, r, sh, f; - mpfr_prec_t n, size_m, tmp; - int inexact, negative; - MPFR_SAVE_EXPO_DECL (expo); -@@ -55,50 +61,27 @@ - - if (MPFR_UNLIKELY (k <= 1)) - { -- if (k < 1) /* k==0 => y=x^(1/0)=x^(+Inf) */ --#if 0 -- /* For 0 <= x < 1 => +0. -- For x = 1 => 1. -- For x > 1, => +Inf. -- For x < 0 => NaN. -- */ -+ if (k == 0) - { -- if (MPFR_IS_NEG (x) && !MPFR_IS_ZERO (x)) -- { -- MPFR_SET_NAN (y); -- MPFR_RET_NAN; -- } -- inexact = mpfr_cmp (x, __gmpfr_one); -- if (inexact == 0) -- return mpfr_set_ui (y, 1, rnd_mode); /* 1 may be Out of Range */ -- else if (inexact < 0) -- return mpfr_set_ui (y, 0, rnd_mode); /* 0+ */ -- else -- { -- mpfr_set_inf (y, 1); -- return 0; -- } -+ MPFR_SET_NAN (y); -+ MPFR_RET_NAN; - } --#endif -- { -- MPFR_SET_NAN (y); -- MPFR_RET_NAN; -- } -- else /* y =x^(1/1)=x */ -+ else /* y = x^(1/1) = x */ - return mpfr_set (y, x, rnd_mode); - } - - /* Singular values */ -- else if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x))) -+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x))) - { - if (MPFR_IS_NAN (x)) - { - MPFR_SET_NAN (y); /* NaN^(1/k) = NaN */ - MPFR_RET_NAN; - } -- else if (MPFR_IS_INF (x)) /* +Inf^(1/k) = +Inf -- -Inf^(1/k) = -Inf if k odd -- -Inf^(1/k) = NaN if k even */ -+ -+ if (MPFR_IS_INF (x)) /* +Inf^(1/k) = +Inf -+ -Inf^(1/k) = -Inf if k odd -+ -Inf^(1/k) = NaN if k even */ - { - if (MPFR_IS_NEG(x) && (k % 2 == 0)) - { -@@ -106,27 +89,31 @@ - MPFR_RET_NAN; - } - MPFR_SET_INF (y); -- MPFR_SET_SAME_SIGN (y, x); -- MPFR_RET (0); - } - else /* x is necessarily 0: (+0)^(1/k) = +0 - (-0)^(1/k) = -0 */ - { - MPFR_ASSERTD (MPFR_IS_ZERO (x)); - MPFR_SET_ZERO (y); -- MPFR_SET_SAME_SIGN (y, x); -- MPFR_RET (0); - } -+ MPFR_SET_SAME_SIGN (y, x); -+ MPFR_RET (0); - } - - /* Returns NAN for x < 0 and k even */ -- else if (MPFR_IS_NEG (x) && (k % 2 == 0)) -+ if (MPFR_UNLIKELY (MPFR_IS_NEG (x) && (k % 2 == 0))) - { - MPFR_SET_NAN (y); - MPFR_RET_NAN; - } - - /* General case */ -+ -+ /* For large k, use exp(log(x)/k). The threshold of 100 seems to be quite -+ good when the precision goes to infinity. */ -+ if (k > 100) -+ return mpfr_root_aux (y, x, k, rnd_mode); -+ - MPFR_SAVE_EXPO_MARK (expo); - mpz_init (m); - -@@ -135,31 +122,24 @@ - mpz_neg (m, m); - r = e % (mpfr_exp_t) k; - if (r < 0) -- r += k; /* now r = e (mod k) with 0 <= e < r */ -+ r += k; /* now r = e (mod k) with 0 <= r < k */ -+ MPFR_ASSERTD (0 <= r && r < k); - /* x = (m*2^r) * 2^(e-r) where e-r is a multiple of k */ - - MPFR_MPZ_SIZEINBASE2 (size_m, m); - /* for rounding to nearest, we want the round bit to be in the root */ - n = MPFR_PREC (y) + (rnd_mode == MPFR_RNDN); - -- /* we now multiply m by 2^(r+k*sh) so that root(m,k) will give -- exactly n bits: we want k*(n-1)+1 <= size_m + k*sh + r <= k*n -- i.e. sh = floor ((kn-size_m-r)/k) */ -- if ((mpfr_exp_t) size_m + r > k * (mpfr_exp_t) n) -- sh = 0; /* we already have too many bits */ -+ /* we now multiply m by 2^sh so that root(m,k) will give -+ exactly n bits: we want k*(n-1)+1 <= size_m + sh <= k*n -+ i.e. sh = k*f + r with f = max(floor((k*n-size_m-r)/k),0) */ -+ if ((mpfr_exp_t) size_m + r >= k * (mpfr_exp_t) n) -+ f = 0; /* we already have too many bits */ - else -- sh = (k * (mpfr_exp_t) n - (mpfr_exp_t) size_m - r) / k; -- sh = k * sh + r; -- if (sh >= 0) -- { -- mpz_mul_2exp (m, m, sh); -- e = e - sh; -- } -- else if (r > 0) -- { -- mpz_mul_2exp (m, m, r); -- e = e - r; -- } -+ f = (k * (mpfr_exp_t) n - (mpfr_exp_t) size_m - r) / k; -+ sh = k * f + r; -+ mpz_mul_2exp (m, m, sh); -+ e = e - sh; - - /* invariant: x = m*2^e, with e divisible by k */ - -@@ -203,3 +183,97 @@ - MPFR_SAVE_EXPO_FREE (expo); - return mpfr_check_range (y, inexact, rnd_mode); - } -+ -+/* Compute y <- x^(1/k) using exp(log(x)/k). -+ Assume all special cases have been eliminated before. -+ In the extended exponent range, overflows/underflows are not possible. -+ Assume x > 0, or x < 0 and k odd. -+*/ -+static int -+mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode) -+{ -+ int inexact, exact_root = 0; -+ mpfr_prec_t w; /* working precision */ -+ mpfr_t absx, t; -+ MPFR_GROUP_DECL(group); -+ MPFR_TMP_DECL(marker); -+ MPFR_ZIV_DECL(loop); -+ MPFR_SAVE_EXPO_DECL (expo); -+ -+ MPFR_TMP_INIT_ABS (absx, x); -+ -+ MPFR_TMP_MARK(marker); -+ w = MPFR_PREC(y) + 10; -+ /* Take some guard bits to prepare for the 'expt' lost bits below. -+ If |x| < 2^k, then log|x| < k, thus taking log2(k) bits should be fine. */ -+ if (MPFR_GET_EXP(x) > 0) -+ w += MPFR_INT_CEIL_LOG2 (MPFR_GET_EXP(x)); -+ MPFR_GROUP_INIT_1(group, w, t); -+ MPFR_SAVE_EXPO_MARK (expo); -+ MPFR_ZIV_INIT (loop, w); -+ for (;;) -+ { -+ mpfr_exp_t expt; -+ unsigned int err; -+ -+ mpfr_log (t, absx, MPFR_RNDN); -+ /* t = log|x| * (1 + theta) with |theta| <= 2^(-w) */ -+ mpfr_div_ui (t, t, k, MPFR_RNDN); -+ expt = MPFR_GET_EXP (t); -+ /* t = log|x|/k * (1 + theta) + eps with |theta| <= 2^(-w) -+ and |eps| <= 1/2 ulp(t), thus the total error is bounded -+ by 1.5 * 2^(expt - w) */ -+ mpfr_exp (t, t, MPFR_RNDN); -+ /* t = |x|^(1/k) * exp(tau) * (1 + theta1) with -+ |tau| <= 1.5 * 2^(expt - w) and |theta1| <= 2^(-w). -+ For |tau| <= 0.5 we have |exp(tau)-1| < 4/3*tau, thus -+ for w >= expt + 2 we have: -+ t = |x|^(1/k) * (1 + 2^(expt+2)*theta2) * (1 + theta1) with -+ |theta1|, |theta2| <= 2^(-w). -+ If expt+2 > 0, as long as w >= 1, we have: -+ t = |x|^(1/k) * (1 + 2^(expt+3)*theta3) with |theta3| < 2^(-w). -+ For expt+2 = 0, we have: -+ t = |x|^(1/k) * (1 + 2^2*theta3) with |theta3| < 2^(-w). -+ Finally for expt+2 < 0 we have: -+ t = |x|^(1/k) * (1 + 2*theta3) with |theta3| < 2^(-w). -+ */ -+ err = (expt + 2 > 0) ? expt + 3 -+ : (expt + 2 == 0) ? 2 : 1; -+ /* now t = |x|^(1/k) * (1 + 2^(err-w)) thus the error is at most -+ 2^(EXP(t) - w + err) */ -+ if (MPFR_LIKELY (MPFR_CAN_ROUND(t, w - err, MPFR_PREC(y), rnd_mode))) -+ break; -+ -+ /* If we fail to round correctly, check for an exact result or a -+ midpoint result with MPFR_RNDN (regarded as hard-to-round in -+ all precisions in order to determine the ternary value). */ -+ { -+ mpfr_t z, zk; -+ -+ mpfr_init2 (z, MPFR_PREC(y) + (rnd_mode == MPFR_RNDN)); -+ mpfr_init2 (zk, MPFR_PREC(x)); -+ mpfr_set (z, t, MPFR_RNDN); -+ inexact = mpfr_pow_ui (zk, z, k, MPFR_RNDN); -+ exact_root = !inexact && mpfr_equal_p (zk, absx); -+ if (exact_root) /* z is the exact root, thus round z directly */ -+ inexact = mpfr_set4 (y, z, rnd_mode, MPFR_SIGN (x)); -+ mpfr_clear (zk); -+ mpfr_clear (z); -+ if (exact_root) -+ break; -+ } -+ -+ MPFR_ZIV_NEXT (loop, w); -+ MPFR_GROUP_REPREC_1(group, w, t); -+ } -+ MPFR_ZIV_FREE (loop); -+ -+ if (!exact_root) -+ inexact = mpfr_set4 (y, t, rnd_mode, MPFR_SIGN (x)); -+ -+ MPFR_GROUP_CLEAR(group); -+ MPFR_TMP_FREE(marker); -+ MPFR_SAVE_EXPO_FREE (expo); -+ -+ return mpfr_check_range (y, inexact, rnd_mode); -+} -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:20:16.922677881 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:20:51.306696441 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p11"; -+ return "3.1.3-p12"; - } -diff -Naurd mpfr-3.1.3-a/tests/troot.c mpfr-3.1.3-b/tests/troot.c ---- mpfr-3.1.3-a/tests/troot.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/troot.c 2016-02-15 15:20:51.282696429 +0000 -@@ -25,6 +25,19 @@ - - #include "mpfr-test.h" - -+#define DEFN(N) \ -+ static int root##N (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd) \ -+ { return mpfr_root (y, x, N, rnd); } \ -+ static int pow##N (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd) \ -+ { return mpfr_pow_ui (y, x, N, rnd); } -+ -+DEFN(2) -+DEFN(3) -+DEFN(4) -+DEFN(5) -+DEFN(17) -+DEFN(120) -+ - static void - special (void) - { -@@ -52,7 +65,7 @@ - exit (1); - } - -- /* root(-Inf, 17) = -Inf */ -+ /* root(-Inf, 17) = -Inf */ - mpfr_set_inf (x, -1); - mpfr_root (y, x, 17, MPFR_RNDN); - if (!mpfr_inf_p (y) || mpfr_sgn (y) > 0) -@@ -69,7 +82,7 @@ - exit (1); - } - -- /* root(+/-0) = +/-0 */ -+ /* root(+/-0, k) = +/-0 for k > 0 */ - mpfr_set_ui (x, 0, MPFR_RNDN); - mpfr_root (y, x, 17, MPFR_RNDN); - if (mpfr_cmp_ui (y, 0) || mpfr_sgn (y) < 0) -@@ -190,64 +203,39 @@ - i = mpfr_root (y, x, 1, MPFR_RNDN); - if (mpfr_cmp_ui (x, 17) || i != 0) - { -- printf ("Error in root (17^(1/1))\n"); -+ printf ("Error in root for 17^(1/1)\n"); - exit (1); - } - --#if 0 -- /* Check for k == 0: -- For 0 <= x < 1 => +0. -- For x = 1 => 1. -- For x > 1, => +Inf. -- For x < 0 => NaN. */ -- i = mpfr_root (y, x, 0, MPFR_RNDN); -- if (!MPFR_IS_INF (y) || !MPFR_IS_POS (y) || i != 0) -- { -- printf ("Error in root 17^(1/0)\n"); -- exit (1); -- } -- mpfr_set_ui (x, 1, MPFR_RNDN); -- i = mpfr_root (y, x, 0, MPFR_RNDN); -- if (mpfr_cmp_ui (y, 1) || i != 0) -- { -- printf ("Error in root 1^(1/0)\n"); -- exit (1); -- } - mpfr_set_ui (x, 0, MPFR_RNDN); - i = mpfr_root (y, x, 0, MPFR_RNDN); -- if (!MPFR_IS_ZERO (y) || !MPFR_IS_POS (y) || i != 0) -- { -- printf ("Error in root 0+^(1/0)\n"); -- exit (1); -- } -- MPFR_CHANGE_SIGN (x); -- i = mpfr_root (y, x, 0, MPFR_RNDN); -- if (!MPFR_IS_ZERO (y) || !MPFR_IS_POS (y) || i != 0) -+ if (!MPFR_IS_NAN (y) || i != 0) - { -- printf ("Error in root 0-^(1/0)\n"); -+ printf ("Error in root for (+0)^(1/0)\n"); - exit (1); - } -- mpfr_set_ui_2exp (x, 17, -5, MPFR_RNDD); -+ mpfr_neg (x, x, MPFR_RNDN); - i = mpfr_root (y, x, 0, MPFR_RNDN); -- if (!MPFR_IS_ZERO (y) || !MPFR_IS_POS (y) || i != 0) -+ if (!MPFR_IS_NAN (y) || i != 0) - { -- printf ("Error in root (17/2^5)^(1/0)\n"); -+ printf ("Error in root for (-0)^(1/0)\n"); - exit (1); - } --#endif -- mpfr_set_ui (x, 0, MPFR_RNDN); -+ -+ mpfr_set_ui (x, 1, MPFR_RNDN); - i = mpfr_root (y, x, 0, MPFR_RNDN); - if (!MPFR_IS_NAN (y) || i != 0) - { -- printf ("Error in root 0+^(1/0)\n"); -+ printf ("Error in root for 1^(1/0)\n"); - exit (1); - } -+ - /* Check for k==2 */ - mpfr_set_si (x, -17, MPFR_RNDD); - i = mpfr_root (y, x, 2, MPFR_RNDN); - if (!MPFR_IS_NAN (y) || i != 0) - { -- printf ("Error in root (-17)^(1/2)\n"); -+ printf ("Error in root for (-17)^(1/2)\n"); - exit (1); - } - -@@ -255,11 +243,168 @@ - mpfr_clear (y); - } - -+/* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812779 -+ * https://bugzilla.gnome.org/show_bug.cgi?id=756960 -+ * is a GNOME Calculator bug (mpfr_root applied on a negative integer, -+ * which is converted to an unsigned integer), but the strange result -+ * is also due to a bug in MPFR. -+ */ -+static void -+bigint (void) -+{ -+ mpfr_t x, y; -+ -+ mpfr_inits2 (64, x, y, (mpfr_ptr) 0); -+ -+ mpfr_set_ui (x, 10, MPFR_RNDN); -+ if (sizeof (unsigned long) * CHAR_BIT == 64) -+ { -+ mpfr_root (x, x, ULONG_MAX, MPFR_RNDN); -+ mpfr_set_ui_2exp (y, 1, -63, MPFR_RNDN); -+ mpfr_add_ui (y, y, 1, MPFR_RNDN); -+ if (! mpfr_equal_p (x, y)) -+ { -+ printf ("Error in bigint for ULONG_MAX\n"); -+ printf ("Expected "); -+ mpfr_dump (y); -+ printf ("Got "); -+ mpfr_dump (x); -+ exit (1); -+ } -+ } -+ -+ mpfr_set_ui (x, 10, MPFR_RNDN); -+ mpfr_root (x, x, 1234567890, MPFR_RNDN); -+ mpfr_set_str_binary (y, -+ "1.00000000000000000000000000001000000000101011000101000110010001"); -+ if (! mpfr_equal_p (x, y)) -+ { -+ printf ("Error in bigint for 1234567890\n"); -+ printf ("Expected "); -+ mpfr_dump (y); -+ printf ("Got "); -+ mpfr_dump (x); -+ exit (1); -+ } -+ -+ mpfr_clears (x, y, (mpfr_ptr) 0); -+} -+ - #define TEST_FUNCTION mpfr_root - #define INTEGER_TYPE unsigned long --#define INT_RAND_FUNCTION() (INTEGER_TYPE) (randlimb () % 3 +2) -+#define INT_RAND_FUNCTION() \ -+ (INTEGER_TYPE) (randlimb () & 1 ? randlimb () : randlimb () % 3 + 2) - #include "tgeneric_ui.c" - -+static void -+exact_powers (unsigned long bmax, unsigned long kmax) -+{ -+ long b, k; -+ mpz_t z; -+ mpfr_t x, y; -+ int inex, neg; -+ -+ mpz_init (z); -+ for (b = 2; b <= bmax; b++) -+ for (k = 1; k <= kmax; k++) -+ { -+ mpz_ui_pow_ui (z, b, k); -+ mpfr_init2 (x, mpz_sizeinbase (z, 2)); -+ mpfr_set_ui (x, b, MPFR_RNDN); -+ mpfr_pow_ui (x, x, k, MPFR_RNDN); -+ mpz_set_ui (z, b); -+ mpfr_init2 (y, mpz_sizeinbase (z, 2)); -+ for (neg = 0; neg <= 1; neg++) -+ { -+ inex = mpfr_root (y, x, k, MPFR_RNDN); -+ if (inex != 0) -+ { -+ printf ("Error in exact_powers, b=%ld, k=%ld\n", b, k); -+ printf ("Expected inex=0, got %d\n", inex); -+ exit (1); -+ } -+ if (neg && (k & 1) == 0) -+ { -+ if (!MPFR_IS_NAN (y)) -+ { -+ printf ("Error in exact_powers, b=%ld, k=%ld\n", b, k); -+ printf ("Expected y=NaN\n"); -+ printf ("Got "); -+ mpfr_out_str (stdout, 10, 0, y, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ } -+ else if (MPFR_IS_NAN (y) || mpfr_cmp_si (y, b) != 0) -+ { -+ printf ("Error in exact_powers, b=%ld, k=%ld\n", b, k); -+ printf ("Expected y=%ld\n", b); -+ printf ("Got "); -+ mpfr_out_str (stdout, 10, 0, y, MPFR_RNDN); -+ printf ("\n"); -+ exit (1); -+ } -+ mpfr_neg (x, x, MPFR_RNDN); -+ b = -b; -+ } -+ mpfr_clear (x); -+ mpfr_clear (y); -+ } -+ mpz_clear (z); -+} -+ -+/* Compare root(x,2^h) with pow(x,2^(-h)). */ -+static void -+cmp_pow (void) -+{ -+ mpfr_t x, y1, y2; -+ int h; -+ -+ mpfr_inits2 (128, x, y1, y2, (mpfr_ptr) 0); -+ -+ for (h = 1; h < sizeof (unsigned long) * CHAR_BIT; h++) -+ { -+ unsigned long k = (unsigned long) 1 << h; -+ int i; -+ -+ for (i = 0; i < 10; i++) -+ { -+ mpfr_rnd_t rnd; -+ unsigned int flags1, flags2; -+ int inex1, inex2; -+ -+ tests_default_random (x, 0, __gmpfr_emin, __gmpfr_emax, 1); -+ rnd = RND_RAND (); -+ mpfr_set_ui_2exp (y1, 1, -h, MPFR_RNDN); -+ mpfr_clear_flags (); -+ inex1 = mpfr_pow (y1, x, y1, rnd); -+ flags1 = __gmpfr_flags; -+ mpfr_clear_flags (); -+ inex2 = mpfr_root (y2, x, k, rnd); -+ flags2 = __gmpfr_flags; -+ if (!(mpfr_equal_p (y1, y2) && SAME_SIGN (inex1, inex2) && -+ flags1 == flags2)) -+ { -+ printf ("Error in cmp_pow on h=%d, i=%d, rnd=%s\n", -+ h, i, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd)); -+ printf ("x = "); -+ mpfr_dump (x); -+ printf ("pow = "); -+ mpfr_dump (y1); -+ printf ("with inex = %d, flags =", inex1); -+ flags_out (flags1); -+ printf ("root = "); -+ mpfr_dump (y2); -+ printf ("with inex = %d, flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ } -+ -+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0); -+} -+ - int - main (void) - { -@@ -270,7 +415,10 @@ - - tests_start_mpfr (); - -+ exact_powers (3, 1000); - special (); -+ bigint (); -+ cmp_pow (); - - mpfr_init (x); - -@@ -329,6 +477,13 @@ - - test_generic_ui (2, 200, 30); - -+ bad_cases (root2, pow2, "mpfr_root[2]", 8, -256, 255, 4, 128, 800, 40); -+ bad_cases (root3, pow3, "mpfr_root[3]", 8, -256, 255, 4, 128, 800, 40); -+ bad_cases (root4, pow4, "mpfr_root[4]", 8, -256, 255, 4, 128, 800, 40); -+ bad_cases (root5, pow5, "mpfr_root[5]", 8, -256, 255, 4, 128, 800, 40); -+ bad_cases (root17, pow17, "mpfr_root[17]", 8, -256, 255, 4, 128, 800, 40); -+ bad_cases (root120, pow120, "mpfr_root[120]", 8, -256, 255, 4, 128, 800, 40); -+ - tests_end_mpfr (); - return 0; - } diff --git a/packages/mpfr/3.1.3/230-gamma.patch b/packages/mpfr/3.1.3/230-gamma.patch deleted file mode 100644 index 47d4e41..0000000 --- a/packages/mpfr/3.1.3/230-gamma.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:43:23.702095604 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:43:23.726095285 +0000 -@@ -0,0 +1 @@ -+gamma -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-15 15:20:51.306696441 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:43:23.726095285 +0000 -@@ -1 +1 @@ --3.1.3-p12 -+3.1.3-p13 -diff -Naurd mpfr-3.1.3-a/src/gamma.c mpfr-3.1.3-b/src/gamma.c ---- mpfr-3.1.3-a/src/gamma.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/gamma.c 2016-02-23 07:43:23.718095391 +0000 -@@ -70,6 +70,9 @@ - { - mpfr_t x, y; - unsigned long r, k; -+ MPFR_SAVE_EXPO_DECL (expo); -+ -+ MPFR_SAVE_EXPO_MARK (expo); - mpfr_init2 (x, 38); - mpfr_init2 (y, 38); - mpfr_set_ui (x, n, MPFR_RNDZ); -@@ -86,6 +89,8 @@ - r -= n / k; - mpfr_clear (x); - mpfr_clear (y); -+ MPFR_SAVE_EXPO_FREE (expo); -+ - return r; - } - -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:20:51.302696439 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:43:23.726095285 +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-p12" -+#define MPFR_VERSION_STRING "3.1.3-p13" - - /* 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:20:51.306696441 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:43:23.726095285 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p12"; -+ return "3.1.3-p13"; - } -diff -Naurd mpfr-3.1.3-a/tests/tgamma.c mpfr-3.1.3-b/tests/tgamma.c ---- mpfr-3.1.3-a/tests/tgamma.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tgamma.c 2016-02-23 07:43:23.718095391 +0000 -@@ -192,6 +192,18 @@ - exit (1); - } - -+ mpfr_set_prec (x, 2); -+ mpfr_set_prec (y, 2); -+ mpfr_set_ui (x, 2, MPFR_RNDN); -+ mpfr_clear_inexflag (); -+ mpfr_gamma (y, x, MPFR_RNDN); -+ if (mpfr_inexflag_p ()) -+ { -+ printf ("Wrong inexact flag for gamma(2)\n"); -+ printf ("expected 0, got 1\n"); -+ exit (1); -+ } -+ - mpfr_clear (x); - mpfr_clear (y); - } diff --git a/packages/mpfr/3.1.3/240-rem1.patch b/packages/mpfr/3.1.3/240-rem1.patch deleted file mode 100644 index 9d5e3c1..0000000 --- a/packages/mpfr/3.1.3/240-rem1.patch +++ /dev/null @@ -1,337 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:54:06.617533218 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:54:06.641532898 +0000 -@@ -0,0 +1 @@ -+rem1 -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-23 07:43:23.726095285 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:54:06.641532898 +0000 -@@ -1 +1 @@ --3.1.3-p13 -+3.1.3-p14 -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-23 07:43:23.726095285 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:54:06.641532898 +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-p13" -+#define MPFR_VERSION_STRING "3.1.3-p14" - - /* 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/rem1.c mpfr-3.1.3-b/src/rem1.c ---- mpfr-3.1.3-a/src/rem1.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/rem1.c 2016-02-23 07:54:06.633533004 +0000 -@@ -59,6 +59,7 @@ - mpfr_exp_t ex, ey; - int compare, inex, q_is_odd, sign, signx = MPFR_SIGN (x); - mpz_t mx, my, r; -+ int tiny = 0; - - MPFR_ASSERTD (rnd_q == MPFR_RNDN || rnd_q == MPFR_RNDZ); - -@@ -109,13 +110,27 @@ - if (ex <= ey) - { - /* q = x/y = mx/(my*2^(ey-ex)) */ -- mpz_mul_2exp (my, my, ey - ex); /* divide mx by my*2^(ey-ex) */ -- if (rnd_q == MPFR_RNDZ) -- /* 0 <= |r| <= |my|, r has the same sign as mx */ -- mpz_tdiv_qr (mx, r, mx, my); -+ -+ /* First detect cases where q=0, to avoid creating a huge number -+ my*2^(ey-ex): if sx = mpz_sizeinbase (mx, 2) and sy = -+ mpz_sizeinbase (my, 2), we have x < 2^(ex + sx) and -+ y >= 2^(ey + sy - 1), thus if ex + sx <= ey + sy - 1 -+ the quotient is 0 */ -+ if (ex + (mpfr_exp_t) mpz_sizeinbase (mx, 2) < -+ ey + (mpfr_exp_t) mpz_sizeinbase (my, 2)) -+ { -+ tiny = 1; -+ mpz_set (r, mx); -+ mpz_set_ui (mx, 0); -+ } - else -- /* 0 <= |r| <= |my|, r has the same sign as my */ -- mpz_fdiv_qr (mx, r, mx, my); -+ { -+ mpz_mul_2exp (my, my, ey - ex); /* divide mx by my*2^(ey-ex) */ -+ -+ /* since mx > 0 and my > 0, we can use mpz_tdiv_qr in all cases */ -+ mpz_tdiv_qr (mx, r, mx, my); -+ /* 0 <= |r| <= |my|, r has the same sign as mx */ -+ } - - if (rnd_q == MPFR_RNDN) - q_is_odd = mpz_tstbit (mx, 0); -@@ -181,7 +196,20 @@ - /* FIXME: the comparison 2*r < my could be done more efficiently - at the mpn level */ - mpz_mul_2exp (r, r, 1); -- compare = mpz_cmpabs (r, my); -+ /* if tiny=1, we should compare r with my*2^(ey-ex) */ -+ if (tiny) -+ { -+ if (ex + (mpfr_exp_t) mpz_sizeinbase (r, 2) < -+ ey + (mpfr_exp_t) mpz_sizeinbase (my, 2)) -+ compare = 0; /* r*2^ex < my*2^ey */ -+ else -+ { -+ mpz_mul_2exp (my, my, ey - ex); -+ compare = mpz_cmpabs (r, my); -+ } -+ } -+ else -+ compare = mpz_cmpabs (r, my); - mpz_fdiv_q_2exp (r, r, 1); - compare = ((compare > 0) || - ((rnd_q == MPFR_RNDN) && (compare == 0) && q_is_odd)); -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-23 07:43:23.726095285 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:54:06.641532898 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p13"; -+ return "3.1.3-p14"; - } -diff -Naurd mpfr-3.1.3-a/tests/tfmod.c mpfr-3.1.3-b/tests/tfmod.c ---- mpfr-3.1.3-a/tests/tfmod.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tfmod.c 2016-02-23 07:54:06.633533004 +0000 -@@ -137,89 +137,90 @@ - special (void) - { - int inexact; -- mpfr_t x, y, r, nan; -- mpfr_inits (x, y, r, nan, (mpfr_ptr) 0); -+ mpfr_t x, y, r, t; - -- mpfr_set_nan (nan); -+ mpfr_inits (x, y, r, t, (mpfr_ptr) 0); -+ -+ mpfr_set_nan (t); - - /* fmod (NaN, NaN) is NaN */ - mpfr_set_nan (x); - mpfr_set_nan (y); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (NaN, +0) is NaN */ - mpfr_set_ui (y, 0, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+1, 0) is NaN */ - mpfr_set_ui (x, 1, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (0, 0) is NaN */ - mpfr_set_ui (x, 0, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+inf, +0) is NaN */ - mpfr_set_inf (x, +1); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (-inf, +0) is NaN */ - mpfr_set_inf (x, -1); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (-inf, -0) is NaN */ - mpfr_neg (x, x, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (-inf, +1) is NaN */ - mpfr_set_ui (y, +1, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+inf, +1) is NaN */ - mpfr_neg (x, x, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+inf, -inf) is NaN */ - mpfr_set_inf (y, -1); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (-inf, -inf) is NaN */ - mpfr_neg (x, x, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (-inf, +inf) is NaN */ - mpfr_neg (y, y, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+inf, +inf) is NaN */ - mpfr_neg (x, x, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (x, +inf) = x, if x is finite */ - mpfr_set_ui (x, 1, MPFR_RNDN); -@@ -271,13 +272,13 @@ - mpfr_set_ui (y, 0, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+0, -0) is NaN */ - mpfr_neg (y, y, MPFR_RNDN); - inexact = mpfr_fmod (r, x, y, MPFR_RNDN); - if (!mpfr_nan_p (r) || inexact != 0) -- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN); -+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN); - - /* fmod (+0, +1) = +0 */ - mpfr_set_ui (y, 1, MPFR_RNDN); -@@ -303,7 +304,18 @@ - if (!mpfr_equal_p (r, x) || inexact != 0) - test_failed (r, x, 0, inexact, x, y, MPFR_RNDN); - -- mpfr_clears (x, y, r, nan, (mpfr_ptr) 0); -+ mpfr_set_prec (x, 380); -+ mpfr_set_prec (y, 385); -+ mpfr_set_str_binary (x, "0.11011010010110011101011000100100101100101011010001011100110001100101111001010100001011111110111100101110101010110011010101000100000100011101101100001011101110100111101111111010001001000010000110010110011100111000001110111010000100101001010111100100010001101001110100011110010000000001110001111001101100111011001000110110011100100011111110010100011001000001001011010111010000000000E0"); -+ mpfr_set_str_binary (y, "0.1100011000011101011010001100010111001110110111001101010010111100111100011010010011011101111101111001010111111110001001100001111101001000000010100101111001001110010110000111001000101010111001001000100101011111000010100110001111000110011011010101111101100110010101011010011101100001011101001000101111110110110110000001001101110111110110111110111111001001011110001110011111100000000000000E-1"); -+ mpfr_set_prec (r, 2); -+ inexact = mpfr_fmod (r, x, y, MPFR_RNDA); -+ mpfr_set_prec (t, 2); -+ mpfr_set_ui_2exp (t, 3, -5, MPFR_RNDN); -+ if (mpfr_cmp_ui_2exp (r, 3, -5) || inexact <= 0) -+ test_failed (r, t, 1, inexact, x, y, MPFR_RNDA); -+ -+ mpfr_clears (x, y, r, t, (mpfr_ptr) 0); - return; - } - -@@ -313,6 +325,7 @@ - { - mpfr_t x, y, r; - int inexact; -+ - mpfr_inits2 (100, x, y, r, (mpfr_ptr) 0); - - mpfr_set_prec (x, 3); -@@ -353,7 +366,46 @@ - mpfr_sin (y, y, MPFR_RNDN); - check (r, x, y, MPFR_RNDN); - -- mpfr_clears(r, x, y, (mpfr_ptr) 0); -+ mpfr_clears (x, y, r, (mpfr_ptr) 0); -+} -+ -+static void -+bug20160217 (void) -+{ -+ mpfr_t x, y, r; -+ int inexact, i; -+ mpfr_exp_t emin, emax; -+ -+ mpfr_inits2 (53, x, y, r, (mpfr_ptr) 0); -+ -+ emin = mpfr_get_emin (); -+ emax = mpfr_get_emax (); -+ -+ for (i = 0; i <= 1; i++) -+ { -+ mpfr_set_zero (x, 1); -+ mpfr_nextabove (x); -+ mpfr_set_inf (y, 1); -+ mpfr_nextbelow (y); -+ inexact = mpfr_fmod (r, x, y, MPFR_RNDN); -+ if (!mpfr_equal_p (r, x) || inexact != 0) -+ { -+ printf ("Error for mpfr_fmod (r, nextabove(0), nextbelow(+inf)," -+ " MPFR_RNDN)%s\n", i ? "extended exponent range" : ""); -+ printf ("Expected inex = 0, r = "); -+ mpfr_dump (x); -+ printf ("Got inex = %d, r = ", inexact); -+ mpfr_dump (r); -+ exit (1); -+ } -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ } -+ -+ set_emin (emin); -+ set_emax (emax); -+ -+ mpfr_clears (x, y, r, (mpfr_ptr) 0); - } - - int -@@ -362,6 +414,7 @@ - tests_start_mpfr (); - - bug20090519 (); -+ bug20160217 (); - - test_generic (2, 100, 100); - -diff -Naurd mpfr-3.1.3-a/tests/tremquo.c mpfr-3.1.3-b/tests/tremquo.c ---- mpfr-3.1.3-a/tests/tremquo.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tremquo.c 2016-02-23 07:54:06.633533004 +0000 -@@ -59,6 +59,7 @@ - { - mpfr_t x, y, r; - long q[1]; -+ int inex; - - if (argc == 3) /* usage: tremquo x y (rnd=MPFR_RNDN implicit) */ - { -@@ -281,6 +282,15 @@ - MPFR_ASSERTN (mpfr_zero_p (r) && MPFR_SIGN (r) > 0); - MPFR_ASSERTN (q[0] == 0); - -+ mpfr_set_prec (x, 380); -+ mpfr_set_prec (y, 385); -+ mpfr_set_str_binary (x, "0.11011010010110011101011000100100101100101011010001011100110001100101111001010100001011111110111100101110101010110011010101000100000100011101101100001011101110100111101111111010001001000010000110010110011100111000001110111010000100101001010111100100010001101001110100011110010000000001110001111001101100111011001000110110011100100011111110010100011001000001001011010111010000000000E-2"); -+ mpfr_set_str_binary (y, "0.1100011000011101011010001100010111001110110111001101010010111100111100011010010011011101111101111001010111111110001001100001111101001000000010100101111001001110010110000111001000101010111001001000100101011111000010100110001111000110011011010101111101100110010101011010011101100001011101001000101111110110110110000001001101110111110110111110111111001001011110001110011111100000000000000E-1"); -+ mpfr_set_prec (r, 2); -+ inex = mpfr_remainder (r, x, y, MPFR_RNDA); -+ MPFR_ASSERTN(mpfr_cmp_si_2exp (r, -3, -4) == 0); -+ MPFR_ASSERTN(inex < 0); -+ - mpfr_clear (x); - mpfr_clear (y); - mpfr_clear (r); diff --git a/packages/mpfr/3.1.3/250-agm-eq.patch b/packages/mpfr/3.1.3/250-agm-eq.patch deleted file mode 100644 index e59e914..0000000 --- a/packages/mpfr/3.1.3/250-agm-eq.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:55:17.208593082 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:55:17.232592762 +0000 -@@ -0,0 +1 @@ -+agm-eq -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-23 07:54:06.641532898 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:55:17.232592762 +0000 -@@ -1 +1 @@ --3.1.3-p14 -+3.1.3-p15 -diff -Naurd mpfr-3.1.3-a/src/agm.c mpfr-3.1.3-b/src/agm.c ---- mpfr-3.1.3-a/src/agm.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/agm.c 2016-02-23 07:55:17.224592868 +0000 -@@ -96,10 +96,7 @@ - /* b (op2) and a (op1) are the 2 operands but we want b >= a */ - compare = mpfr_cmp (op1, op2); - if (MPFR_UNLIKELY( compare == 0 )) -- { -- mpfr_set (r, op1, rnd_mode); -- MPFR_RET (0); /* exact */ -- } -+ return mpfr_set (r, op1, rnd_mode); - else if (compare > 0) - { - mpfr_srcptr t = op1; -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-23 07:54:06.641532898 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:55:17.232592762 +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-p14" -+#define MPFR_VERSION_STRING "3.1.3-p15" - - /* 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-23 07:54:06.641532898 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:55:17.232592762 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p14"; -+ return "3.1.3-p15"; - } -diff -Naurd mpfr-3.1.3-a/tests/tagm.c mpfr-3.1.3-b/tests/tagm.c ---- mpfr-3.1.3-a/tests/tagm.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tagm.c 2016-02-23 07:55:17.224592868 +0000 -@@ -169,6 +169,45 @@ - } - - static void -+check_eq (void) -+{ -+ mpfr_t a, b, agm; -+ int p; -+ -+ mpfr_init2 (a, 17); -+ mpfr_init2 (b, 9); -+ -+ mpfr_set_str_binary (b, "0.101000000E-3"); -+ mpfr_set (a, b, MPFR_RNDN); -+ -+ for (p = MPFR_PREC_MIN; p <= 2; p++) -+ { -+ int inex; -+ -+ mpfr_init2 (agm, p); -+ inex = mpfr_agm (agm, a, b, MPFR_RNDU); -+ if (mpfr_cmp_ui_2exp (agm, 5 - p, -5) != 0) -+ { -+ printf ("Error in check_eq for p = %d: expected %d*2^(-5), got ", -+ p, 5 - p); -+ mpfr_dump (agm); -+ exit (1); -+ } -+ if (inex <= 0) -+ { -+ printf ("Wrong ternary value in check_eq for p = %d\n", p); -+ printf ("expected 1\n"); -+ printf ("got %d\n", inex); -+ exit (1); -+ } -+ mpfr_clear (agm); -+ } -+ -+ mpfr_clear (a); -+ mpfr_clear (b); -+} -+ -+static void - check_nans (void) - { - mpfr_t x, y, m; -@@ -260,6 +299,7 @@ - check_nans (); - - check_large (); -+ check_eq (); - check4 ("2.0", "1.0", MPFR_RNDN, "1.456791031046906869", -1); - check4 ("6.0", "4.0", MPFR_RNDN, "4.949360872472608925", 1); - check4 ("62.0", "61.0", MPFR_RNDN, "61.498983718845075902", -1); diff --git a/packages/mpfr/3.1.3/260-sum.patch b/packages/mpfr/3.1.3/260-sum.patch deleted file mode 100644 index 6fae047..0000000 --- a/packages/mpfr/3.1.3/260-sum.patch +++ /dev/null @@ -1,223 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:55:54.028346753 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:55:54.052346433 +0000 -@@ -0,0 +1 @@ -+sum -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-23 07:55:17.232592762 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:55:54.052346433 +0000 -@@ -1 +1 @@ --3.1.3-p15 -+3.1.3-p16 -diff -Naurd mpfr-3.1.3-a/src/mpfr-impl.h mpfr-3.1.3-b/src/mpfr-impl.h ---- mpfr-3.1.3-a/src/mpfr-impl.h 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/mpfr-impl.h 2016-02-23 07:55:54.040346593 +0000 -@@ -1876,7 +1876,8 @@ - __MPFR_DECLSPEC int mpfr_check _MPFR_PROTO ((mpfr_srcptr)); - - __MPFR_DECLSPEC int mpfr_sum_sort _MPFR_PROTO ((mpfr_srcptr *const, -- unsigned long, mpfr_srcptr *)); -+ unsigned long, mpfr_srcptr *, -+ mpfr_prec_t *)); - - __MPFR_DECLSPEC int mpfr_get_cputime _MPFR_PROTO ((void)); - -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-23 07:55:17.232592762 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:55:54.052346433 +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-p15" -+#define MPFR_VERSION_STRING "3.1.3-p16" - - /* 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/sum.c mpfr-3.1.3-b/src/sum.c ---- mpfr-3.1.3-a/src/sum.c 2015-06-19 19:55:09.000000000 +0000 -+++ mpfr-3.1.3-b/src/sum.c 2016-02-23 07:55:54.040346593 +0000 -@@ -45,9 +45,13 @@ - mpfr_exp_t, mpfr_uexp_t); - - /* Either sort the tab in perm and returns 0 -- Or returns 1 for +INF, -1 for -INF and 2 for NAN */ -+ Or returns 1 for +INF, -1 for -INF and 2 for NAN. -+ Also set *maxprec to the maximal precision of tab[0..n-1] and of the -+ initial value of *maxprec. -+*/ - int --mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm) -+mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm, -+ mpfr_prec_t *maxprec) - { - mpfr_exp_t min, max; - mpfr_uexp_t exp_num; -@@ -79,6 +83,8 @@ - if (MPFR_GET_EXP (tab[i]) > max) - max = MPFR_GET_EXP(tab[i]); - } -+ if (MPFR_PREC (tab[i]) > *maxprec) -+ *maxprec = MPFR_PREC (tab[i]); - } - if (MPFR_UNLIKELY (sign_inf != 0)) - return sign_inf; -@@ -213,7 +219,8 @@ - - - /* Sum a list of float with order given by permutation perm, -- * intermediate size set to F. -+ * intermediate size set to F. Return non-zero if at least one of -+ * the operations is inexact (thus 0 implies that the sum is exact). - * Internal use function. - */ - static int -@@ -230,16 +237,19 @@ - for (i = 1; i < n - 1; i++) - { - MPFR_ASSERTD (!MPFR_IS_NAN (sum) && !MPFR_IS_INF (sum)); -- error_trap |= mpfr_add (sum, sum, tab[i], MPFR_RNDN); -+ if (mpfr_add (sum, sum, tab[i], MPFR_RNDN)) -+ error_trap = 1; - } -- error_trap |= mpfr_add (ret, sum, tab[n - 1], MPFR_RNDN); -+ if (mpfr_add (ret, sum, tab[n - 1], MPFR_RNDN)) -+ error_trap = 1; - mpfr_clear (sum); - return error_trap; - } - - /* Sum a list of floating-point numbers. -+ * If the return value is 0, then the sum is exact. -+ * Otherwise the return value gives no information. - */ -- - int - mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd) - { -@@ -266,7 +276,8 @@ - /* Sort and treat special cases */ - MPFR_TMP_MARK (marker); - perm = (mpfr_srcptr *) MPFR_TMP_ALLOC (n * sizeof *perm); -- error_trap = mpfr_sum_sort (tab, n, perm); -+ prec = MPFR_PREC (ret); -+ error_trap = mpfr_sum_sort (tab, n, perm, &prec); - /* Check if there was a NAN or a INF */ - if (MPFR_UNLIKELY (error_trap != 0)) - { -@@ -281,8 +292,7 @@ - MPFR_RET (0); - } - -- /* Initial precision */ -- prec = MAX (MPFR_PREC (tab[0]), MPFR_PREC (ret)); -+ /* Initial precision is max(prec(ret),prec(tab[0]),...,prec(tab[n-1])) */ - k = MPFR_INT_CEIL_LOG2 (n) + 1; - prec += k + 2; - mpfr_init2 (cur_sum, prec); -@@ -295,8 +305,7 @@ - error_trap = sum_once (cur_sum, perm, n, prec + k); - if (MPFR_LIKELY (error_trap == 0 || - (!MPFR_IS_ZERO (cur_sum) && -- mpfr_can_round (cur_sum, -- MPFR_GET_EXP (cur_sum) - prec + 2, -+ mpfr_can_round (cur_sum, prec - 2, - MPFR_RNDN, rnd, MPFR_PREC (ret))))) - break; - MPFR_ZIV_NEXT (loop, prec); -@@ -305,11 +314,13 @@ - MPFR_ZIV_FREE (loop); - MPFR_TMP_FREE (marker); - -- error_trap |= mpfr_set (ret, cur_sum, rnd); -+ if (mpfr_set (ret, cur_sum, rnd)) -+ error_trap = 1; - mpfr_clear (cur_sum); - - MPFR_SAVE_EXPO_FREE (expo); -- error_trap |= mpfr_check_range (ret, 0, rnd); -+ if (mpfr_check_range (ret, 0, rnd)) -+ error_trap = 1; - return error_trap; /* It doesn't return the ternary value */ - } - -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-23 07:55:17.232592762 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:55:54.052346433 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p15"; -+ return "3.1.3-p16"; - } -diff -Naurd mpfr-3.1.3-a/tests/tsum.c mpfr-3.1.3-b/tests/tsum.c ---- mpfr-3.1.3-a/tests/tsum.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tsum.c 2016-02-23 07:55:54.040346593 +0000 -@@ -126,6 +126,7 @@ - mpfr_ptr *tabtmp; - mpfr_srcptr *perm; - unsigned long i; -+ mpfr_prec_t prec = MPFR_PREC_MIN; - - /* Init stuff */ - tab = (mpfr_t *) (*__gmp_allocate_func) (n * sizeof (mpfr_t)); -@@ -140,7 +141,7 @@ - tabtmp[i] = tab[i]; - } - -- mpfr_sum_sort ((mpfr_srcptr *)tabtmp, n, perm); -+ mpfr_sum_sort ((mpfr_srcptr *)tabtmp, n, perm, &prec); - - if (check_is_sorted (n, perm) == 0) - { -@@ -300,6 +301,41 @@ - mpfr_clears (tab[0], tab[1], tab[2], r, (mpfr_ptr) 0); - } - -+/* bug reported by Joseph S. Myers on 2013-10-27 -+ https://sympa.inria.fr/sympa/arc/mpfr/2013-10/msg00015.html */ -+static void -+bug20131027 (void) -+{ -+ mpfr_t r, t[4]; -+ mpfr_ptr p[4]; -+ char *s[4] = { -+ "0x1p1000", -+ "-0x0.fffffffffffff80000000000000001p1000", -+ "-0x1p947", -+ "0x1p880" -+ }; -+ int i; -+ -+ mpfr_init2 (r, 53); -+ for (i = 0; i < 4; i++) -+ { -+ mpfr_init2 (t[i], i == 0 ? 53 : 1000); -+ mpfr_set_str (t[i], s[i], 0, MPFR_RNDN); -+ p[i] = t[i]; -+ } -+ mpfr_sum (r, p, 4, MPFR_RNDN); -+ -+ if (MPFR_NOTZERO (r)) -+ { -+ printf ("mpfr_sum incorrect in bug20131027: expected 0, got\n"); -+ mpfr_dump (r); -+ exit (1); -+ } -+ -+ for (i = 0; i < 4; i++) -+ mpfr_clear (t[i]); -+ mpfr_clear (r); -+} - - int - main (void) -@@ -310,6 +346,7 @@ - tests_start_mpfr (); - - check_special (); -+ bug20131027 (); - test_sort (1764, 1026); - for (p = 2 ; p < 444 ; p += 17) - for (n = 2 ; n < 1026 ; n += 42 + p) diff --git a/packages/mpfr/3.1.3/270-cmp_d.patch b/packages/mpfr/3.1.3/270-cmp_d.patch deleted file mode 100644 index f22e27a..0000000 --- a/packages/mpfr/3.1.3/270-cmp_d.patch +++ /dev/null @@ -1,219 +0,0 @@ -diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES ---- mpfr-3.1.3-a/PATCHES 2016-02-23 12:28:35.578442642 +0000 -+++ mpfr-3.1.3-b/PATCHES 2016-02-23 12:28:35.602442321 +0000 -@@ -0,0 +1 @@ -+cmp_d -diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION ---- mpfr-3.1.3-a/VERSION 2016-02-23 07:55:54.052346433 +0000 -+++ mpfr-3.1.3-b/VERSION 2016-02-23 12:28:35.602442321 +0000 -@@ -1 +1 @@ --3.1.3-p16 -+3.1.3-p17 -diff -Naurd mpfr-3.1.3-a/src/cmp_d.c mpfr-3.1.3-b/src/cmp_d.c ---- mpfr-3.1.3-a/src/cmp_d.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/cmp_d.c 2016-02-23 12:28:35.590442481 +0000 -@@ -27,12 +27,19 @@ - { - mpfr_t tmp; - int res; -+ MPFR_SAVE_EXPO_DECL (expo); -+ -+ MPFR_SAVE_EXPO_MARK (expo); - - mpfr_init2 (tmp, IEEE_DBL_MANT_DIG); - res = mpfr_set_d (tmp, d, MPFR_RNDN); - MPFR_ASSERTD (res == 0); -+ -+ mpfr_clear_flags (); - res = mpfr_cmp (b, tmp); -- mpfr_clear (tmp); -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - -+ mpfr_clear (tmp); -+ MPFR_SAVE_EXPO_FREE (expo); - return res; - } -diff -Naurd mpfr-3.1.3-a/src/cmp_ld.c mpfr-3.1.3-b/src/cmp_ld.c ---- mpfr-3.1.3-a/src/cmp_ld.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/src/cmp_ld.c 2016-02-23 12:28:35.590442481 +0000 -@@ -27,12 +27,19 @@ - { - mpfr_t tmp; - int res; -+ MPFR_SAVE_EXPO_DECL (expo); -+ -+ MPFR_SAVE_EXPO_MARK (expo); - - mpfr_init2 (tmp, MPFR_LDBL_MANT_DIG); - res = mpfr_set_ld (tmp, d, MPFR_RNDN); - MPFR_ASSERTD (res == 0); -+ -+ mpfr_clear_flags (); - res = mpfr_cmp (b, tmp); -- mpfr_clear (tmp); -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - -+ mpfr_clear (tmp); -+ MPFR_SAVE_EXPO_FREE (expo); - 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-23 07:55:54.052346433 +0000 -+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 12:28:35.598442376 +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-p16" -+#define MPFR_VERSION_STRING "3.1.3-p17" - - /* 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-23 07:55:54.052346433 +0000 -+++ mpfr-3.1.3-b/src/version.c 2016-02-23 12:28:35.598442376 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.3-p16"; -+ return "3.1.3-p17"; - } -diff -Naurd mpfr-3.1.3-a/tests/tcmp_d.c mpfr-3.1.3-b/tests/tcmp_d.c ---- mpfr-3.1.3-a/tests/tcmp_d.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tcmp_d.c 2016-02-23 12:28:35.590442481 +0000 -@@ -29,8 +29,10 @@ - main (void) - { - mpfr_t x; -+ mpfr_exp_t emin; - - tests_start_mpfr (); -+ emin = mpfr_get_emin (); - - mpfr_init2(x, IEEE_DBL_MANT_DIG); - -@@ -67,16 +69,31 @@ - exit (1); - } - -+ /* Test in reduced exponent range. */ -+ set_emin (1); -+ mpfr_set_ui (x, 1, MPFR_RNDN); -+ if (mpfr_cmp_d (x, 0.9) <= 0) -+ { -+ printf ("Error in reduced exponent range.\n"); -+ exit (1); -+ } -+ set_emin (emin); -+ - #if !defined(MPFR_ERRDIVZERO) - /* Check NAN */ - { - int c; - -- mpfr_clear_erangeflag (); -+ mpfr_clear_flags (); - c = mpfr_cmp_d (x, DBL_NAN); -- if (c != 0 || !mpfr_erangeflag_p ()) -+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE) - { - printf ("ERROR for NAN (1)\n"); -+ printf ("Expected 0, got %d\n", c); -+ printf ("Expected flags:"); -+ flags_out (MPFR_FLAGS_ERANGE); -+ printf ("Got flags: "); -+ flags_out (__gmpfr_flags); - #ifdef MPFR_NANISNAN - printf ("The reason is that NAN == NAN. Please look at the configure " - "output\nand Section \"In case of problem\" of the INSTALL " -@@ -84,12 +101,18 @@ - #endif - exit (1); - } -+ - mpfr_set_nan (x); -- mpfr_clear_erangeflag (); -+ mpfr_clear_flags (); - c = mpfr_cmp_d (x, 2.0); -- if (c != 0 || !mpfr_erangeflag_p ()) -+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE) - { - printf ("ERROR for NAN (2)\n"); -+ printf ("Expected 0, got %d\n", c); -+ printf ("Expected flags:"); -+ flags_out (MPFR_FLAGS_ERANGE); -+ printf ("Got flags: "); -+ flags_out (__gmpfr_flags); - #ifdef MPFR_NANISNAN - printf ("The reason is that NAN == NAN. Please look at the configure " - "output\nand Section \"In case of problem\" of the INSTALL " -diff -Naurd mpfr-3.1.3-a/tests/tcmp_ld.c mpfr-3.1.3-b/tests/tcmp_ld.c ---- mpfr-3.1.3-a/tests/tcmp_ld.c 2015-06-19 19:55:10.000000000 +0000 -+++ mpfr-3.1.3-b/tests/tcmp_ld.c 2016-02-23 12:28:35.590442481 +0000 -@@ -28,8 +28,10 @@ - main (void) - { - mpfr_t x; -+ mpfr_exp_t emin; - - tests_start_mpfr (); -+ emin = mpfr_get_emin (); - - mpfr_init2(x, MPFR_LDBL_MANT_DIG); - -@@ -66,16 +68,31 @@ - exit (1); - } - -+ /* Test in reduced exponent range. */ -+ set_emin (1); -+ mpfr_set_ui (x, 1, MPFR_RNDN); -+ if (mpfr_cmp_ld (x, 0.9) <= 0) -+ { -+ printf ("Error in reduced exponent range.\n"); -+ exit (1); -+ } -+ set_emin (emin); -+ - #if !defined(MPFR_ERRDIVZERO) - /* Check NAN */ - { - int c; - -- mpfr_clear_erangeflag (); -+ mpfr_clear_flags (); - c = mpfr_cmp_ld (x, DBL_NAN); -- if (c != 0 || !mpfr_erangeflag_p ()) -+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE) - { - printf ("ERROR for NAN (1)\n"); -+ printf ("Expected 0, got %d\n", c); -+ printf ("Expected flags:"); -+ flags_out (MPFR_FLAGS_ERANGE); -+ printf ("Got flags: "); -+ flags_out (__gmpfr_flags); - #ifdef MPFR_NANISNAN - printf ("The reason is that NAN == NAN. Please look at the configure " - "output\nand Section \"In case of problem\" of the INSTALL " -@@ -83,12 +100,18 @@ - #endif - exit (1); - } -+ - mpfr_set_nan (x); -- mpfr_clear_erangeflag (); -+ mpfr_clear_flags (); - c = mpfr_cmp_ld (x, 2.0); -- if (c != 0 || !mpfr_erangeflag_p ()) -+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE) - { - printf ("ERROR for NAN (2)\n"); -+ printf ("Expected 0, got %d\n", c); -+ printf ("Expected flags:"); -+ flags_out (MPFR_FLAGS_ERANGE); -+ printf ("Got flags: "); -+ flags_out (__gmpfr_flags); - #ifdef MPFR_NANISNAN - printf ("The reason is that NAN == NAN. Please look at the configure " - "output\nand Section \"In case of problem\" of the INSTALL " diff --git a/packages/mpfr/3.1.3/version.desc b/packages/mpfr/3.1.3/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/mpfr/3.1.3/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch b/packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch deleted file mode 100644 index ebbf69a..0000000 --- a/packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -dur strace-4.5.16.orig/process.c strace-4.5.16/process.c ---- strace-4.5.16.orig/process.c 2007-01-11 23:08:38.000000000 +0100 -+++ strace-4.5.16/process.c 2007-07-14 19:19:58.000000000 +0200 -@@ -2685,7 +2685,6 @@ - { 4*REG_GBR, "4*REG_GBR" }, - { 4*REG_MACH, "4*REG_MACH" }, - { 4*REG_MACL, "4*REG_MACL" }, -- { 4*REG_SYSCALL, "4*REG_SYSCALL" }, - { 4*REG_FPUL, "4*REG_FPUL" }, - { 4*REG_FPREG0, "4*REG_FPREG0" }, - { 4*(REG_FPREG0+1), "4*REG_FPREG1" }, diff --git a/packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch b/packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch deleted file mode 100644 index 2f47dc9..0000000 --- a/packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -dur strace-4.5.16.orig/syscall.c strace-4.5.16/syscall.c ---- strace-4.5.16.orig/syscall.c 2007-07-14 19:21:44.000000000 +0200 -+++ strace-4.5.16/syscall.c 2007-07-14 19:22:49.000000000 +0200 -@@ -125,6 +125,18 @@ - #define TP TRACE_PROCESS - #define TS TRACE_SIGNAL - -+#ifndef HAVE_STATFS64 -+/* -+ * Ugly hacks for systems that do not have LFS -+ */ -+ -+#define sys_truncate64 sys_truncate -+#define sys_ftruncate64 sys_ftruncate -+#define sys_getdents64 sys_getdents -+#define sys_statfs64 sys_statfs -+#define sys_fstatfs64 sys_fstatfs -+#endif -+ - static const struct sysent sysent0[] = { - #include "syscallent.h" - }; diff --git a/packages/strace/4.5.18/140-statfs64-check.patch b/packages/strace/4.5.18/140-statfs64-check.patch deleted file mode 100644 index 758966b..0000000 --- a/packages/strace/4.5.18/140-statfs64-check.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -dur strace-4.5.16.orig/acinclude.m4 strace-4.5.16/acinclude.m4 ---- strace-4.5.16.orig/acinclude.m4 2004-04-14 04:21:01.000000000 +0200 -+++ strace-4.5.16/acinclude.m4 2007-07-14 19:25:25.000000000 +0200 -@@ -210,6 +210,26 @@ - fi - ]) - -+dnl ### A macro to determine whether statfs64 is defined. -+AC_DEFUN([AC_STATFS64], -+[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h) -+AC_CACHE_VAL(ac_cv_type_statfs64, -+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX -+#include -+#include -+#else -+#include -+#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])]) -+AC_MSG_RESULT($ac_cv_type_statfs64) -+if test "$ac_cv_type_statfs64" = yes -+then -+ AC_DEFINE([HAVE_STATFS64], 1, -+[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.]) -+fi -+]) -+ -+ -+ - dnl ### A macro to determine if off_t is a long long - AC_DEFUN([AC_OFF_T_IS_LONG_LONG], - [AC_MSG_CHECKING(for long long off_t) -diff -dur strace-4.5.16.orig/configure.ac strace-4.5.16/configure.ac ---- strace-4.5.16.orig/configure.ac 2007-01-11 12:37:55.000000000 +0100 -+++ strace-4.5.16/configure.ac 2007-07-14 19:25:25.000000000 +0200 -@@ -169,6 +169,7 @@ - struct stat.st_level, - struct stat.st_rdev]) - AC_STAT64 -+AC_STATFS64 - - AC_TYPE_SIGNAL - AC_TYPE_UID_T -diff -dur strace-4.5.16.orig/file.c strace-4.5.16/file.c ---- strace-4.5.16.orig/file.c 2007-01-15 21:25:52.000000000 +0100 -+++ strace-4.5.16/file.c 2007-07-14 19:25:25.000000000 +0200 -@@ -1636,7 +1636,7 @@ - return 0; - } - --#ifdef LINUX -+#ifdef HAVE_STATFS64 - static void - printstatfs64(tcp, addr) - struct tcb *tcp; diff --git a/packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch b/packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch deleted file mode 100644 index e12b4e4..0000000 --- a/packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch +++ /dev/null @@ -1,19 +0,0 @@ -Dmitry V. Levin [Tue, 3 Nov 2009 16:49:49 +0000] - -Fix check for linux/netlink.h on Linux 2.6.32-rc5+ - -* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include - sys/socket.h instead of linux/socket.h beforehand. - -diff --git a/configure.ac b/configure.ac ---- a/configure.ac -+++ b/configure.ac -@@ -197,7 +197,7 @@ AC_CHECK_HEADERS([ \ - ], [], []) - AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], - [], [], [#include --#include ]) -+#include ]) - AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include ]) - AC_CHECK_TYPES([struct sigcontext_struct],,, [#include ]) - AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include ]) diff --git a/packages/strace/4.5.18/160-undef-syscall.patch b/packages/strace/4.5.18/160-undef-syscall.patch deleted file mode 100644 index c7dcb07..0000000 --- a/packages/strace/4.5.18/160-undef-syscall.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -dur strace-4.5.16.orig/linux/syscallent.h strace-4.5.16/linux/syscallent.h ---- strace-4.5.16.orig/linux/syscallent.h 2006-10-16 03:17:52.000000000 +0200 -+++ strace-4.5.16/linux/syscallent.h 2007-07-14 19:30:16.000000000 +0200 -@@ -130,7 +130,11 @@ - { 2, TF, sys_statfs, "statfs" }, /* 99 */ - { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ - { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ -- { 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */ -+ { 2, TD, sys_socketcall, "socketcall" -+#ifdef __NR_socketcall -+ , SYS_socketcall -+#endif -+ }, /* 102 */ - { 3, 0, sys_syslog, "syslog" }, /* 103 */ - { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ - { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ -@@ -145,7 +149,11 @@ - { 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */ - { 1, 0, sys_swapoff, "swapoff" }, /* 115 */ - { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ -- { 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */ -+ { 6, 0, sys_ipc, "ipc" -+#ifdef __NR_ipc -+ , SYS_ipc -+#endif -+ }, /* 117 */ - { 1, TD, sys_fsync, "fsync" }, /* 118 */ - { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */ - { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */ -@@ -282,7 +290,11 @@ - { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ - { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */ - { 5, 0, printargs, "SYS_251" }, /* 251 */ -- { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */ -+ { 1, TP, sys_exit, "exit_group" -+#ifdef __NR_exit_group -+ , __NR_exit_group -+#endif -+ }, /* 252 */ - { 4, 0, printargs, "lookup_dcookie"}, /* 253 */ - { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */ - { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ diff --git a/packages/strace/4.5.18/170-no_cachectl.patch b/packages/strace/4.5.18/170-no_cachectl.patch deleted file mode 100644 index a8fab23..0000000 --- a/packages/strace/4.5.18/170-no_cachectl.patch +++ /dev/null @@ -1,35 +0,0 @@ -This patch is needed on newer uclibc becuase the uclibc header generation -mechanism generates the sysnum.h properly NR_cacheflush is defined for ARM -but there is no cachectl.h file which is exported to userspace. Strace -assumes that if SYS_cacheflush is defined than it icludes asm/cachectl.h -which breaks the build for ARM now. - -This patch adds a check for ARM architecture. - --Khem - -Here is error - -| if ccache arm-angstrom-linux-uclibcgnueabi-gcc -march=armv5te -mtune=arm926ej-s -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/arm -I./linux/arm -Ilinux -I./linux -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -Wall -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -MT term.o -MD -MP -MF ".deps/term.Tpo" -c -o term.o term.c; \ -| then mv -f ".deps/term.Tpo" ".deps/term.Po"; else rm -f ".deps/term.Tpo"; exit 1; fi -| system.c:69:26: error: asm/cachectl.h: No such file or directory -| make[1]: *** [system.o] Error 1 -| make[1]: *** Waiting for unfinished jobs.... -| signal.c: In function 'sys_sigreturn': -| signal.c:1221: warning: passing argument 4 of 'ptrace' makes integer from pointer without a cast -| make[1]: Leaving directory `/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/work/armv5te-angstrom-linux-uclibcgnueabi/strace-4.5.14-r5/strace-4.5.14' -| make: *** [all] Error 2 -| FATAL: oe_runmake failed - -Index: strace-4.5.14/system.c -=================================================================== ---- strace-4.5.14.orig/system.c 2008-05-15 20:23:16.000000000 -0700 -+++ strace-4.5.14/system.c 2008-05-15 20:24:03.000000000 -0700 -@@ -65,7 +65,7 @@ - #include - #endif - --#ifdef SYS_cacheflush -+#if defined SYS_cacheflush && !defined ARM - #include - #endif diff --git a/packages/strace/4.5.18/180-arm-EABI-syscalls.patch b/packages/strace/4.5.18/180-arm-EABI-syscalls.patch deleted file mode 100644 index 1f28450..0000000 --- a/packages/strace/4.5.18/180-arm-EABI-syscalls.patch +++ /dev/null @@ -1,23 +0,0 @@ -Patch from upstream: -http://strace.cvs.sourceforge.net/viewvc/strace/strace/linux/arm/syscallent.h?r1=1.17&r2=1.18&sortby=file - -2008-11-13 Kirill A. Shutemov - - * linux/arm/syscallent.h: Fix build on ARM EABI which does not - provide syscalls socketcall and ipc. - ---- strace-4.5.18.orig/linux/arm/syscallent.h 2008/12/29 20:04:15 1.17 -+++ strace-4.5.18/linux/arm/syscallent.h 2009/01/01 23:20:38 1.18 -@@ -431,6 +431,7 @@ - { 5, 0, printargs, "SYS_398" }, /* 398 */ - { 5, 0, printargs, "SYS_399" }, /* 399 */ - -+#ifndef __ARM_EABI__ - #if SYS_socket_subcall != 400 - #error fix me - #endif -@@ -481,3 +482,4 @@ - { 4, TI, sys_shmdt, "shmdt" }, /* 440 */ - { 4, TI, sys_shmget, "shmget" }, /* 441 */ - { 4, TI, sys_shmctl, "shmctl" }, /* 442 */ -+#endif diff --git a/packages/strace/4.5.18/900-autoreconf.patch b/packages/strace/4.5.18/900-autoreconf.patch deleted file mode 100644 index cff775f..0000000 --- a/packages/strace/4.5.18/900-autoreconf.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -ruN strace-4.5.19.orig/config.h.in strace-4.5.19/config.h.in ---- strace-4.5.19.orig/config.h.in 2009-10-21 19:41:12.000000000 +0200 -+++ strace-4.5.19/config.h.in 2010-01-01 10:39:36.000000000 +0100 -@@ -143,6 +143,9 @@ - /* Define if stat64 is available in asm/stat.h. */ - #undef HAVE_STAT64 - -+/* Define if statfs64 is available in sys/statfs.h or sys/vfs.h. */ -+#undef HAVE_STATFS64 -+ - /* Define to 1 if stdbool.h conforms to C99. */ - #undef HAVE_STDBOOL_H - -diff -dur strace-4.5.16.orig/configure strace-4.5.16/configure ---- strace-4.5.16.orig/configure 2007-01-11 23:23:33.000000000 +0100 -+++ strace-4.5.16/configure 2007-07-14 19:18:43.000000000 +0200 -@@ -5994,6 +5994,73 @@ - - fi - -+echo "$as_me:$LINENO: checking for statfs64 in sys/(statfs|vfs).h" >&5 -+echo $ECHO_N "checking for statfs64 in sys/(statfs|vfs).h... $ECHO_C" >&6 -+if test "${ac_cv_type_statfs64+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#ifdef LINUX -+#include -+#include -+#else -+#include -+#endif -+int -+main () -+{ -+struct statfs64 st; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_type_statfs64=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ac_cv_type_statfs64=no -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+echo "$as_me:$LINENO: result: $ac_cv_type_statfs64" >&5 -+echo "${ECHO_T}$ac_cv_type_statfs64" >&6 -+if test "$ac_cv_type_statfs64" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_STATFS64 1 -+_ACEOF -+ -+fi -+ - - { echo "$as_me:$LINENO: checking return type of signal handlers" >&5 - echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } -@@ -7580,7 +7647,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include --#include -+#include - - #include <$ac_header> - _ACEOF diff --git a/packages/strace/4.5.18/version.desc b/packages/strace/4.5.18/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/strace/4.5.18/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch b/packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch deleted file mode 100644 index a555fc2..0000000 --- a/packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -durN strace-4.5.19.orig/syscall.c strace-4.5.19/syscall.c ---- strace-4.5.19.orig/syscall.c 2009-10-28 18:47:18.000000000 +0100 -+++ strace-4.5.19/syscall.c 2009-10-28 18:47:18.000000000 +0100 -@@ -110,6 +110,18 @@ - #define TP TRACE_PROCESS - #define TS TRACE_SIGNAL - -+#ifndef HAVE_STATFS64 -+/* -+ * Ugly hacks for systems that do not have LFS -+ */ -+ -+#define sys_truncate64 sys_truncate -+#define sys_ftruncate64 sys_ftruncate -+#define sys_getdents64 sys_getdents -+#define sys_statfs64 sys_statfs -+#define sys_fstatfs64 sys_fstatfs -+#endif -+ - static const struct sysent sysent0[] = { - #include "syscallent.h" - }; diff --git a/packages/strace/4.5.19/130-statfs64-check.patch b/packages/strace/4.5.19/130-statfs64-check.patch deleted file mode 100644 index 0959bdd..0000000 --- a/packages/strace/4.5.19/130-statfs64-check.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -durN strace-4.5.19.orig/acinclude.m4 strace-4.5.19/acinclude.m4 ---- strace-4.5.19.orig/acinclude.m4 2004-04-14 04:45:53.000000000 +0200 -+++ strace-4.5.19/acinclude.m4 2009-10-28 18:47:18.000000000 +0100 -@@ -210,6 +210,26 @@ - fi - ]) - -+dnl ### A macro to determine whether statfs64 is defined. -+AC_DEFUN([AC_STATFS64], -+[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h) -+AC_CACHE_VAL(ac_cv_type_statfs64, -+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX -+#include -+#include -+#else -+#include -+#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])]) -+AC_MSG_RESULT($ac_cv_type_statfs64) -+if test "$ac_cv_type_statfs64" = yes -+then -+ AC_DEFINE([HAVE_STATFS64], 1, -+[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.]) -+fi -+]) -+ -+ -+ - dnl ### A macro to determine if off_t is a long long - AC_DEFUN([AC_OFF_T_IS_LONG_LONG], - [AC_MSG_CHECKING(for long long off_t) -diff -durN strace-4.5.19.orig/configure.ac strace-4.5.19/configure.ac ---- strace-4.5.19.orig/configure.ac 2009-10-12 21:54:43.000000000 +0200 -+++ strace-4.5.19/configure.ac 2009-10-28 18:47:18.000000000 +0100 -@@ -187,6 +187,7 @@ - struct stat.st_level, - struct stat.st_rdev]) - AC_STAT64 -+AC_STATFS64 - - AC_TYPE_SIGNAL - AC_TYPE_UID_T -diff -durN strace-4.5.19.orig/file.c strace-4.5.19/file.c ---- strace-4.5.19.orig/file.c 2009-10-21 15:44:04.000000000 +0200 -+++ strace-4.5.19/file.c 2009-10-28 18:47:18.000000000 +0100 -@@ -1688,7 +1688,7 @@ - return 0; - } - --#ifdef LINUX -+#ifdef HAVE_STATFS64 - static void - printstatfs64(struct tcb *tcp, long addr) - { diff --git a/packages/strace/4.5.19/150-undef-syscall.patch b/packages/strace/4.5.19/150-undef-syscall.patch deleted file mode 100644 index 7d65e1d..0000000 --- a/packages/strace/4.5.19/150-undef-syscall.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -durN strace-4.5.19.orig/linux/syscallent.h strace-4.5.19/linux/syscallent.h ---- strace-4.5.19.orig/linux/syscallent.h 2009-09-01 21:53:29.000000000 +0200 -+++ strace-4.5.19/linux/syscallent.h 2009-10-28 18:47:18.000000000 +0100 -@@ -130,7 +130,11 @@ - { 2, TF, sys_statfs, "statfs" }, /* 99 */ - { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */ - { 3, 0, sys_ioperm, "ioperm" }, /* 101 */ -- { 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */ -+ { 2, TD, sys_socketcall, "socketcall" -+#ifdef __NR_socketcall -+ , SYS_socketcall -+#endif -+ }, /* 102 */ - { 3, 0, sys_syslog, "syslog" }, /* 103 */ - { 3, 0, sys_setitimer, "setitimer" }, /* 104 */ - { 2, 0, sys_getitimer, "getitimer" }, /* 105 */ -@@ -145,7 +149,11 @@ - { 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */ - { 1, 0, sys_swapoff, "swapoff" }, /* 115 */ - { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */ -- { 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */ -+ { 6, 0, sys_ipc, "ipc" -+#ifdef __NR_ipc -+ , SYS_ipc -+#endif -+ }, /* 117 */ - { 1, TD, sys_fsync, "fsync" }, /* 118 */ - { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */ - { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */ -@@ -282,7 +290,11 @@ - { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ - { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */ - { 5, 0, printargs, "SYS_251" }, /* 251 */ -- { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */ -+ { 1, TP, sys_exit, "exit_group" -+#ifdef __NR_exit_group -+ , __NR_exit_group -+#endif -+ }, /* 252 */ - { 4, 0, printargs, "lookup_dcookie"}, /* 253 */ - { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */ - { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ diff --git a/packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch b/packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch deleted file mode 100644 index d8c6b2a..0000000 --- a/packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch +++ /dev/null @@ -1,19 +0,0 @@ -Dmitry V. Levin [Tue, 3 Nov 2009 16:49:49 +0000] - -Fix check for linux/netlink.h on Linux 2.6.32-rc5+ - -* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include - sys/socket.h instead of linux/socket.h beforehand. - -diff --git a/configure.ac b/configure.ac ---- a/configure.ac -+++ b/configure.ac -@@ -258,7 +258,7 @@ AC_CHECK_HEADERS([ \ - ], [], []) - AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], - [], [], [#include --#include ]) -+#include ]) - AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include ]) - AC_CHECK_TYPES([struct sigcontext_struct, - struct sigcontext],,, [#include ]) diff --git a/packages/strace/4.5.19/170-update-configure.patch b/packages/strace/4.5.19/170-update-configure.patch deleted file mode 100644 index 5d12276..0000000 --- a/packages/strace/4.5.19/170-update-configure.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -ruN strace-4.5.19.orig/config.h.in strace-4.5.19/config.h.in ---- strace-4.5.19.orig/config.h.in 2009-10-21 19:41:12.000000000 +0200 -+++ strace-4.5.19/config.h.in 2010-01-01 10:39:36.000000000 +0100 -@@ -161,6 +161,9 @@ - /* Define if stat64 is available in asm/stat.h. */ - #undef HAVE_STAT64 - -+/* Define if statfs64 is available in sys/statfs.h or sys/vfs.h. */ -+#undef HAVE_STATFS64 -+ - /* Define to 1 if stdbool.h conforms to C99. */ - #undef HAVE_STDBOOL_H - -diff -ruN strace-4.5.19.orig/configure strace-4.5.19/configure ---- strace-4.5.19.orig/configure 2010-01-01 10:38:49.000000000 +0100 -+++ strace-4.5.19/configure 2010-01-01 10:39:36.000000000 +0100 -@@ -5374,6 +5374,44 @@ - - fi - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for statfs64 in sys/(statfs|vfs).h" >&5 -+$as_echo_n "checking for statfs64 in sys/(statfs|vfs).h... " >&6; } -+if test "${ac_cv_type_statfs64+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifdef LINUX -+#include -+#include -+#else -+#include -+#endif -+int -+main () -+{ -+struct statfs64 st; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_type_statfs64=yes -+else -+ ac_cv_type_statfs64=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_statfs64" >&5 -+$as_echo "$ac_cv_type_statfs64" >&6; } -+if test "$ac_cv_type_statfs64" = yes -+then -+ -+$as_echo "#define HAVE_STATFS64 1" >>confdefs.h -+ -+fi -+ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 - $as_echo_n "checking return type of signal handlers... " >&6; } -@@ -5880,7 +5851,7 @@ - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include --#include -+#include - " - eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : -diff -ruN strace-4.5.19.orig/Makefile.in strace-4.5.19/Makefile.in ---- strace-4.5.19.orig/Makefile.in 2009-10-21 19:41:14.000000000 +0200 -+++ strace-4.5.19/Makefile.in 2010-01-01 10:39:36.000000000 +0100 -@@ -42,8 +42,9 @@ - subdir = . - DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ -- $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS INSTALL \ -- NEWS TODO config.guess config.sub depcomp install-sh missing -+ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS \ -+ ChangeLog INSTALL NEWS TODO config.guess config.sub depcomp \ -+ install-sh missing - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac diff --git a/packages/strace/4.5.19/version.desc b/packages/strace/4.5.19/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/strace/4.5.19/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch b/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch deleted file mode 100644 index 3f8a518..0000000 --- a/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch ---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 13:02:51.385861492 -0800 -+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 19:08:53.150146970 -0800 -@@ -32,10 +32,11 @@ libpthread_arch_SOBJ = $(patsubst %.S,$( - libpthread_arch_OBJS = $(libpthread_subarch_OBJS) $(libpthread_arch_COBJ) $(libpthread_arch_SOBJ) - - libc_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_CSRC)) --libc_arch_SOBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC)) -+libc_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC)) - libc_arch_OBJS = $(libc_arch_COBJ) $(libc_arch_SOBJ) - libc_arch_a_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_CSRC)) --libc_arch_a_OBJS = $(libc_arch_a_COBJ) -+libc_arch_a_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_SSRC)) -+libc_arch_a_OBJS = $(libc_arch_a_COBJ) $(libc_arch_a_SOBJ) - - librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC)) - librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC)) -diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S ---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 1969-12-31 16:00:00.000000000 -0800 -+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 2016-12-06 19:08:53.150146970 -0800 -@@ -0,0 +1 @@ -+#include -diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch ---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 13:02:51.401861642 -0800 -+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 19:08:53.150146970 -0800 -@@ -20,7 +20,7 @@ - ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread - - libc_arch_a_CSRC = libc-tls.c --librt_arch_a_SSRC = dl-tlsdesc.S -+libc_arch_a_SSRC = libc-dl-tlsdesc.S - - CFLAGS-gen_tlsdesc.c = -S - $(libpthread_arch_OUT)/gen_tlsdesc.c: $(libpthread_arch_DIR)/tlsdesc.sym | $(libpthread_arch_OUT) diff --git a/packages/uClibc-ng/1.0.20/110-has-lfs.patch b/packages/uClibc-ng/1.0.20/110-has-lfs.patch deleted file mode 100644 index c5b90de..0000000 --- a/packages/uClibc-ng/1.0.20/110-has-lfs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Mon, 23 Jan 2017 14:21:54 -0800 -Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled". - -Otherwise, buildroot rejects uClibc-ng in an external toolchain. - -Signed-off-by: Alexey Neyman ---- - extra/Configs/Config.in | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in -index a9d62f5..b2cf977 100644 ---- a/extra/Configs/Config.in -+++ b/extra/Configs/Config.in -@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG - Support sending messages to the system logger. - This requires socket-support. - -+config UCLIBC_HAS_LFS -+ def_bool y -+ help -+ Large file support (always enabled; config symbol retained for -+ feature test to be compatible with uClibc). - choice - prompt "Malloc Implementation" - default MALLOC if ! ARCH_USE_MMU --- -2.9.3 - diff --git a/packages/uClibc-ng/1.0.20/500-no-install-D.patch b/packages/uClibc-ng/1.0.20/500-no-install-D.patch deleted file mode 100644 index 83d3ff6..0000000 --- a/packages/uClibc-ng/1.0.20/500-no-install-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in ---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 -+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 -@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch deleted file mode 100644 index 4338f9f..0000000 --- a/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c ---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 -@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt, NULL); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr - if (tpnt1 != NULL) - return tpnt1; - #endif -+ - /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/util/ldd.c */ - _dl_if_debug_dprint("\tsearching full lib path list\n"); -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in ---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 -@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - ifeq ($(TARGET_ARCH),arc) - CFLAGS-ldso.c += -mno-long-calls - endif diff --git a/packages/uClibc-ng/1.0.20/700-features.h-c11.patch b/packages/uClibc-ng/1.0.20/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/packages/uClibc-ng/1.0.20/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/packages/uClibc-ng/1.0.20/version.desc b/packages/uClibc-ng/1.0.20/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/uClibc-ng/1.0.20/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/uClibc-ng/1.0.21/110-has-lfs.patch b/packages/uClibc-ng/1.0.21/110-has-lfs.patch deleted file mode 100644 index c5b90de..0000000 --- a/packages/uClibc-ng/1.0.21/110-has-lfs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Mon, 23 Jan 2017 14:21:54 -0800 -Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled". - -Otherwise, buildroot rejects uClibc-ng in an external toolchain. - -Signed-off-by: Alexey Neyman ---- - extra/Configs/Config.in | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in -index a9d62f5..b2cf977 100644 ---- a/extra/Configs/Config.in -+++ b/extra/Configs/Config.in -@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG - Support sending messages to the system logger. - This requires socket-support. - -+config UCLIBC_HAS_LFS -+ def_bool y -+ help -+ Large file support (always enabled; config symbol retained for -+ feature test to be compatible with uClibc). - choice - prompt "Malloc Implementation" - default MALLOC if ! ARCH_USE_MMU --- -2.9.3 - diff --git a/packages/uClibc-ng/1.0.21/120-module.patch b/packages/uClibc-ng/1.0.21/120-module.patch deleted file mode 100644 index 2e8a989..0000000 --- a/packages/uClibc-ng/1.0.21/120-module.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit 03884934b32c79da545ef38a42835a6c257b125d -Author: Waldemar Brodkorb -Date: Tue Dec 27 09:24:24 2016 +0100 - - add init_module/delete_module syscall wrappers - - Add the wrappers unconditionally, because kmod package - still uses them. - -diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in -index 595074c..faed6fd 100644 ---- a/libc/sysdeps/linux/common/Makefile.in -+++ b/libc/sysdeps/linux/common/Makefile.in -@@ -31,6 +31,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \ - ioperm.c \ - iopl.c \ - modify_ldt.c \ -+ module.c \ - personality.c \ - pipe2.c \ - ppoll.c \ -diff --git a/libc/sysdeps/linux/common/module.c b/libc/sysdeps/linux/common/module.c -new file mode 100644 -index 0000000..146a43e ---- /dev/null -+++ b/libc/sysdeps/linux/common/module.c -@@ -0,0 +1,23 @@ -+/* -+ * init_module()/delete_module() for uClibc -+ * -+ * Copyright (C) 2000-2006 Erik Andersen -+ * -+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -+ */ -+ -+#include -+ -+#ifdef __NR_init_module -+int init_module(void *first, void *second, void *third, void *fourth, void *fifth); -+/* This may have 5 arguments (for old 2.0 kernels) or 2 arguments -+ * (for 2.2 and 2.4 kernels). Use the greatest common denominator, -+ * and let the kernel cope with whatever it gets. It's good at that. */ -+_syscall5(int, init_module, void *, first, void *, second, void *, third, -+ void *, fourth, void *, fifth) -+#endif -+ -+#ifdef __NR_delete_module -+int delete_module(const char *name, unsigned int flags); -+_syscall2(int, delete_module, const char *, name, unsigned int, flags) -+#endif diff --git a/packages/uClibc-ng/1.0.21/500-no-install-D.patch b/packages/uClibc-ng/1.0.21/500-no-install-D.patch deleted file mode 100644 index 83d3ff6..0000000 --- a/packages/uClibc-ng/1.0.21/500-no-install-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in ---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 -+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 -@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch deleted file mode 100644 index 4338f9f..0000000 --- a/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c ---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 -@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt, NULL); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr - if (tpnt1 != NULL) - return tpnt1; - #endif -+ - /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/util/ldd.c */ - _dl_if_debug_dprint("\tsearching full lib path list\n"); -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in ---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 -@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - ifeq ($(TARGET_ARCH),arc) - CFLAGS-ldso.c += -mno-long-calls - endif diff --git a/packages/uClibc-ng/1.0.21/700-features.h-c11.patch b/packages/uClibc-ng/1.0.21/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/packages/uClibc-ng/1.0.21/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/packages/uClibc-ng/1.0.21/version.desc b/packages/uClibc-ng/1.0.21/version.desc deleted file mode 100644 index fcfe389..0000000 --- a/packages/uClibc-ng/1.0.21/version.desc +++ /dev/null @@ -1 +0,0 @@ -obsolete='yes' diff --git a/packages/uClibc-ng/1.0.22/500-no-install-D.patch b/packages/uClibc-ng/1.0.22/500-no-install-D.patch deleted file mode 100644 index 83d3ff6..0000000 --- a/packages/uClibc-ng/1.0.22/500-no-install-D.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in ---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800 -+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800 -@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host : - install-y += utils_install - - # This installs both utils and hostutils, so doesn't depend on either. -+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin: -+ $(do_mkdir) -+ -+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin -+ifeq ($(HAVE_SHARED),y) -+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin -+endif - - utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf - ifeq ($(HAVE_SHARED),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig - endif - ifeq ($(UCLIBC_HAS_LOCALE),y) -- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv -+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv - $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale - endif - diff --git a/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch deleted file mode 100644 index 4338f9f..0000000 --- a/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c ---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700 -@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr - } - } - #endif -+ -+#ifdef LDSO_MULTILIB_DIR -+ /* If multilib directory is selected, search it before falling back to -+ standard lib directories. */ -+ _dl_if_debug_dprint("\tsearching multilib lib path list\n"); -+ tpnt1 = search_for_named_library(libname, rflags, -+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":" -+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR, -+ rpnt, NULL); -+ if (tpnt1 != NULL) -+ return tpnt1; -+#endif -+ - #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__ - /* Look for libraries wherever the shared library loader - * was installed */ -@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr - if (tpnt1 != NULL) - return tpnt1; - #endif -+ - /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/util/ldd.c */ - _dl_if_debug_dprint("\tsearching full lib path list\n"); -diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in ---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700 -+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700 -@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g - - CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" - -+# Search non-default multilib directories -+ifneq ($(MULTILIB_DIR),lib) -+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\" -+endif -+ - ifeq ($(TARGET_ARCH),arc) - CFLAGS-ldso.c += -mno-long-calls - endif diff --git a/packages/uClibc-ng/1.0.22/700-features.h-c11.patch b/packages/uClibc-ng/1.0.22/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/packages/uClibc-ng/1.0.22/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/packages/uClibc-ng/1.0.22/version.desc b/packages/uClibc-ng/1.0.22/version.desc deleted file mode 100644 index e69de29..0000000 diff --git a/packages/uClibc-ng/1.0.23/700-features.h-c11.patch b/packages/uClibc-ng/1.0.23/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/packages/uClibc-ng/1.0.23/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/packages/uClibc-ng/1.0.23/version.desc b/packages/uClibc-ng/1.0.23/version.desc deleted file mode 100644 index e69de29..0000000 diff --git a/packages/uClibc-ng/1.0.24/700-features.h-c11.patch b/packages/uClibc-ng/1.0.24/700-features.h-c11.patch deleted file mode 100644 index cb1d2a8..0000000 --- a/packages/uClibc-ng/1.0.24/700-features.h-c11.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001 -From: Waldemar Brodkorb -Date: Sun, 7 May 2017 16:28:14 +0200 -Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation - ---- - include/features.h | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/include/features.h b/include/features.h -index e76bbba..f982079 100644 ---- a/include/features.h -+++ b/include/features.h -@@ -55,6 +55,7 @@ - These are defined by this file and are used by the - header files to decide what to declare or define: - -+ __USE_ISOC11 Define ISO C11 things. - __USE_ISOC99 Define ISO C99 things. - __USE_ISOC95 Define ISO C90 AMD1 (C95) things. - __USE_POSIX Define IEEE Std 1003.1 things. -@@ -91,6 +92,7 @@ - - - /* Undefine everything, so we get a clean slate. */ -+#undef __USE_ISOC11 - #undef __USE_ISOC99 - #undef __USE_ISOC95 - #undef __USE_POSIX -@@ -151,6 +153,8 @@ - #ifdef _GNU_SOURCE - # undef _ISOC99_SOURCE - # define _ISOC99_SOURCE 1 -+# undef _ISOC11_SOURCE -+# define _ISOC11_SOURCE 1 - # undef _POSIX_SOURCE - # define _POSIX_SOURCE 1 - # undef _POSIX_C_SOURCE -@@ -223,11 +227,14 @@ - # define _SVID_SOURCE 1 - #endif - --/* This is to enable the ISO C99 extension. Also recognize the old macro -- which was used prior to the standard acceptance. This macro will -- eventually go away and the features enabled by default once the ISO C99 -- standard is widely adopted. */ --#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ -+/* This is to enable the ISO C11 extension. */ -+#if (defined _ISOC11_SOURCE \ -+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) -+# define __USE_ISOC11 1 -+#endif -+ -+/* This is to enable the ISO C99 extension. */ -+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - # define __USE_ISOC99 1 - #endif --- -cgit v0.11.2-3-g2eb4 - diff --git a/packages/uClibc-ng/1.0.24/version.desc b/packages/uClibc-ng/1.0.24/version.desc deleted file mode 100644 index e69de29..0000000 -- cgit v0.10.2-6-g49f6