summaryrefslogtreecommitdiff
path: root/core/mpfr
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-20 11:12:20 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-20 11:12:20 -0300
commit5c0a5f2b9fa7f1683f279728342aa7f5f0cf90a3 (patch)
treea55da6178b48e7abe9508505d3e92cf02a03da52 /core/mpfr
parentc56b2c50f5748090efb9f10f2a021e57a2455764 (diff)
parent1a136cf48dd7f710f38ff998182508f5a0d41c35 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/comix/PKGBUILD community/geany/PKGBUILD community/gnome-do-docklets/PKGBUILD community/gnome-do-plugins/PKGBUILD community/gnome-system-tools/PKGBUILD community/gnustep-make/PKGBUILD community/gtweakui/PKGBUILD community/hwinfo/PKGBUILD community/kungfu/PKGBUILD community/liboauth/PKGBUILD community/liboobs/PKGBUILD community/lua-lzlib/PKGBUILD community/mcdp/PKGBUILD community/mingw32-gcc-base/PKGBUILD community/mingw32-runtime/PKGBUILD community/mplayer2/PKGBUILD community/pdf2svg/PKGBUILD community/perl-data-dumper/PKGBUILD community/perl-digest-md5/PKGBUILD community/perl-perlio-eol/PKGBUILD community/perl-xml-libxslt/PKGBUILD community/python-cherrypy/PKGBUILD community/python-pexpect/PKGBUILD community/python-pyro/PKGBUILD community/python2-cherrypy/PKGBUILD community/rexima/PKGBUILD community/shp2svg/PKGBUILD community/system-tools-backends/PKGBUILD community/tracker/PKGBUILD community/virtualbox/PKGBUILD core/bridge-utils/PKGBUILD extra/avidemux/PKGBUILD extra/beagle/PKGBUILD extra/bug-buddy/PKGBUILD extra/dssi/PKGBUILD extra/evolution-sharp/PKGBUILD extra/evolution-webcal/PKGBUILD extra/feh/PKGBUILD extra/ffmpeg/PKGBUILD extra/gnome-mag/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/gnutls/PKGBUILD extra/gok/PKGBUILD extra/gpsd/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/hyphen/PKGBUILD extra/kdelibs/PKGBUILD extra/keytouch-editor/PKGBUILD extra/keytouch/PKGBUILD extra/koffice/PKGBUILD extra/krusader/PKGBUILD extra/libbeagle/PKGBUILD extra/libffi/PKGBUILD extra/libgnomeuimm/PKGBUILD extra/libreoffice/PKGBUILD extra/m17n-lib/PKGBUILD extra/mtr/PKGBUILD extra/openbabel/PKGBUILD extra/poppler/PKGBUILD extra/pulseaudio/PKGBUILD extra/rox/PKGBUILD extra/transmission/PKGBUILD extra/xf86-input-synaptics/PKGBUILD extra/xorg-server/PKGBUILD extra/xorg-xinit/PKGBUILD kde-unstable/calligra/PKGBUILD libre/icecat/PKGBUILD libre/linux-libre/PKGBUILD multilib/lib32-ncurses/PKGBUILD multilib/lib32-openssl/PKGBUILD multilib/lib32-talloc/PKGBUILD multilib/wine/PKGBUILD
Diffstat (limited to 'core/mpfr')
-rw-r--r--core/mpfr/PKGBUILD17
-rw-r--r--core/mpfr/mpfr-3.0.1.p4.patch367
-rw-r--r--core/mpfr/mpfr-3.1.0.p1.patch50
3 files changed, 59 insertions, 375 deletions
diff --git a/core/mpfr/PKGBUILD b/core/mpfr/PKGBUILD
index 8fd636c86..0ed1392cb 100644
--- a/core/mpfr/PKGBUILD
+++ b/core/mpfr/PKGBUILD
@@ -1,13 +1,12 @@
-# $Id: PKGBUILD 139750 2011-10-04 21:10:35Z allan $
+# $Id: PKGBUILD 140252 2011-10-11 00:43:43Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: damir <damir@archlinux.org>
pkgname=mpfr
_pkgver=3.1.0
-pkgver=${_pkgver}
-#_patchlevel=p4
-#pkgver=${_pkgver}.${_patchlevel}
-pkgrel=2
+_patchlevel=p1
+pkgver=${_pkgver}.${_patchlevel}
+pkgrel=1
pkgdesc="Multiple-precision floating-point library"
license=('LGPL')
arch=('i686' 'x86_64' 'mips64el')
@@ -16,12 +15,14 @@ license=('LGPL')
depends=('gmp>=5.0')
options=('!libtool')
install=mpfr.install
-source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz)
-md5sums=('6e495841bb026481567006cec0f821c3')
+source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz
+ mpfr-${_pkgver}.${_patchlevel}.patch)
+md5sums=('6e495841bb026481567006cec0f821c3'
+ 'ec988293368d4988c76f50d6a3460166')
build() {
cd "${srcdir}/${pkgname}-${_pkgver}"
- #patch -Np1 -i $srcdir/mpfr-${_pkgver}.${_patchlevel}.patch
+ patch -Np1 -i $srcdir/mpfr-${_pkgver}.${_patchlevel}.patch
./configure --prefix=/usr --enable-thread-safe --enable-shared
make
}
diff --git a/core/mpfr/mpfr-3.0.1.p4.patch b/core/mpfr/mpfr-3.0.1.p4.patch
deleted file mode 100644
index 9604635a2..000000000
--- a/core/mpfr/mpfr-3.0.1.p4.patch
+++ /dev/null
@@ -1,367 +0,0 @@
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-04-12 10:50:02.000000000 +0000
-@@ -0,0 +1 @@
-+asin_exprange
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-04-12 10:50:02.000000000 +0000
-@@ -1 +1 @@
--3.0.1
-+3.0.1-p1
-diff -Naurd mpfr-3.0.1-a/asin.c mpfr-3.0.1-b/asin.c
---- mpfr-3.0.1-a/asin.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/asin.c 2011-04-12 10:50:02.000000000 +0000
-@@ -63,11 +63,14 @@
-
- compared = mpfr_cmp_ui (xp, 1);
-
-+ MPFR_SAVE_EXPO_MARK (expo);
-+
- if (MPFR_UNLIKELY (compared >= 0))
- {
- mpfr_clear (xp);
- if (compared > 0) /* asin(x) = NaN for |x| > 1 */
- {
-+ MPFR_SAVE_EXPO_FREE (expo);
- MPFR_SET_NAN (asin);
- MPFR_RET_NAN;
- }
-@@ -80,13 +83,11 @@
- inexact = -mpfr_const_pi (asin, MPFR_INVERT_RND(rnd_mode));
- MPFR_CHANGE_SIGN (asin);
- }
-- mpfr_div_2ui (asin, asin, 1, rnd_mode); /* May underflow */
-- return inexact;
-+ mpfr_div_2ui (asin, asin, 1, rnd_mode);
- }
- }
--
-- MPFR_SAVE_EXPO_MARK (expo);
--
-+ else
-+ {
- /* Compute exponent of 1 - ABS(x) */
- mpfr_ui_sub (xp, 1, xp, MPFR_RNDD);
- MPFR_ASSERTD (MPFR_GET_EXP (xp) <= 0);
-@@ -115,6 +116,7 @@
- inexact = mpfr_set (asin, xp, rnd_mode);
-
- mpfr_clear (xp);
-+ }
-
- MPFR_SAVE_EXPO_FREE (expo);
- return mpfr_check_range (asin, inexact, rnd_mode);
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-04-12 10:50:02.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1"
-+#define MPFR_VERSION_STRING "3.0.1-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/tests/tasin.c mpfr-3.0.1-b/tests/tasin.c
---- mpfr-3.0.1-a/tests/tasin.c 2011-04-04 10:19:17.000000000 +0000
-+++ mpfr-3.0.1-b/tests/tasin.c 2011-04-12 10:50:02.000000000 +0000
-@@ -219,6 +219,49 @@
- mpfr_clear (y);
- }
-
-+static void
-+reduced_expo_range (void)
-+{
-+ mpfr_exp_t emin, emax;
-+ mpfr_t x, y, ex_y;
-+ int inex, ex_inex;
-+ unsigned int flags, ex_flags;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ mpfr_inits2 (4, x, y, ex_y, (mpfr_ptr) 0);
-+ mpfr_set_str (x, "-0.1e1", 2, MPFR_RNDN);
-+
-+ mpfr_set_emin (1);
-+ mpfr_set_emax (1);
-+ mpfr_clear_flags ();
-+ inex = mpfr_asin (y, x, MPFR_RNDA);
-+ flags = __gmpfr_flags;
-+ mpfr_set_emin (emin);
-+ mpfr_set_emax (emax);
-+
-+ mpfr_set_str (ex_y, "-0.1101e1", 2, MPFR_RNDN);
-+ ex_inex = -1;
-+ ex_flags = MPFR_FLAGS_INEXACT;
-+
-+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
-+ ! mpfr_equal_p (y, ex_y))
-+ {
-+ printf ("Error in reduced_expo_range\non x = ");
-+ mpfr_dump (x);
-+ printf ("Expected y = ");
-+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
-+ printf ("Got y = ");
-+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
-+ exit (1);
-+ }
-+
-+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
-+}
-+
- int
- main (void)
- {
-@@ -226,6 +269,7 @@
-
- special ();
- special_overflow ();
-+ reduced_expo_range ();
-
- test_generic (2, 100, 15);
-
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-04-12 10:50:02.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1";
-+ return "3.0.1-p1";
- }
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-05-04 11:18:33.000000000 +0000
-@@ -0,0 +1 @@
-+rec_sqrt-carry
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-05-04 11:18:33.000000000 +0000
-@@ -1 +1 @@
--3.0.1-p1
-+3.0.1-p2
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-05-04 11:18:33.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1-p1"
-+#define MPFR_VERSION_STRING "3.0.1-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/rec_sqrt.c mpfr-3.0.1-b/rec_sqrt.c
---- mpfr-3.0.1-a/rec_sqrt.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/rec_sqrt.c 2011-05-04 11:18:33.000000000 +0000
-@@ -375,20 +375,37 @@
- MPFR_ASSERTD(un == ln + 1 || un == ln + 2);
- /* the high un-ln limbs of u will overlap the low part of {x+ln,xn},
- we need to add or subtract the overlapping part {u + ln, un - ln} */
-+ /* Warning! th may be 0, in which case the mpn_add_1 and mpn_sub_1
-+ below (with size = th) mustn't be used. In such a case, the limb
-+ (carry) will be 0, so that this is semantically a no-op, but if
-+ mpn_add_1 and mpn_sub_1 are used, GMP (currently) still does a
-+ non-atomic read/write in a place that is not always allocated,
-+ with the possible consequences: a crash if the corresponding
-+ address is not mapped, or (rather unlikely) memory corruption
-+ if another process/thread writes at the same place; things may
-+ be worse with future GMP versions. Hence the tests carry != 0. */
- if (neg == 0)
- {
- if (ln > 0)
- MPN_COPY (x, u, ln);
- cy = mpn_add (x + ln, x + ln, xn, u + ln, un - ln);
- /* add cu at x+un */
-- cy += mpn_add_1 (x + un, x + un, th, cu);
-+ if (cu != 0)
-+ {
-+ MPFR_ASSERTD (th != 0);
-+ cy += mpn_add_1 (x + un, x + un, th, cu);
-+ }
- }
- else /* negative case */
- {
- /* subtract {u+ln, un-ln} from {x+ln,un} */
- cy = mpn_sub (x + ln, x + ln, xn, u + ln, un - ln);
- /* carry cy is at x+un, like cu */
-- cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
-+ if (cy + cu != 0)
-+ {
-+ MPFR_ASSERTD (th != 0);
-+ cy = mpn_sub_1 (x + un, x + un, th, cy + cu); /* n - un = th */
-+ }
- /* cy cannot be zero, since the most significant bit of Xh is 1,
- and the correction is bounded by 2^{-h+3} */
- MPFR_ASSERTD(cy == 0);
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-04-12 10:50:02.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-05-04 11:18:33.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1-p1";
-+ return "3.0.1-p2";
- }
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-05-05 00:00:35.000000000 +0000
-@@ -0,0 +1 @@
-+atan-expo-range
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-05-05 00:00:35.000000000 +0000
-@@ -1 +1 @@
--3.0.1-p2
-+3.0.1-p3
-diff -Naurd mpfr-3.0.1-a/atan.c mpfr-3.0.1-b/atan.c
---- mpfr-3.0.1-a/atan.c 2011-04-04 10:19:18.000000000 +0000
-+++ mpfr-3.0.1-b/atan.c 2011-05-05 00:00:35.000000000 +0000
-@@ -431,5 +431,5 @@
- MPFR_GROUP_CLEAR (group);
-
- MPFR_SAVE_EXPO_FREE (expo);
-- return mpfr_check_range (arctgt, inexact, rnd_mode);
-+ return mpfr_check_range (atan, inexact, rnd_mode);
- }
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-05-05 00:00:35.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1-p2"
-+#define MPFR_VERSION_STRING "3.0.1-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/tests/tatan.c mpfr-3.0.1-b/tests/tatan.c
---- mpfr-3.0.1-a/tests/tatan.c 2011-04-04 10:19:17.000000000 +0000
-+++ mpfr-3.0.1-b/tests/tatan.c 2011-05-05 00:00:35.000000000 +0000
-@@ -535,6 +535,52 @@
- mpfr_clears (a, x, y, (mpfr_ptr) 0);
- }
-
-+/* http://websympa.loria.fr/wwsympa/arc/mpfr/2011-05/msg00008.html
-+ * Incorrect flags (in debug mode on a 32-bit machine, assertion failure).
-+ */
-+static void
-+reduced_expo_range (void)
-+{
-+ mpfr_exp_t emin, emax;
-+ mpfr_t x, y, ex_y;
-+ int inex, ex_inex;
-+ unsigned int flags, ex_flags;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ mpfr_inits2 (12, x, y, ex_y, (mpfr_ptr) 0);
-+ mpfr_set_str (x, "0.1e-5", 2, MPFR_RNDN);
-+
-+ mpfr_set_emin (-5);
-+ mpfr_set_emax (-5);
-+ mpfr_clear_flags ();
-+ inex = mpfr_atan (y, x, MPFR_RNDN);
-+ flags = __gmpfr_flags;
-+ mpfr_set_emin (emin);
-+ mpfr_set_emax (emax);
-+
-+ mpfr_set_str (ex_y, "0.1e-5", 2, MPFR_RNDN);
-+ ex_inex = 1;
-+ ex_flags = MPFR_FLAGS_INEXACT;
-+
-+ if (SIGN (inex) != ex_inex || flags != ex_flags ||
-+ ! mpfr_equal_p (y, ex_y))
-+ {
-+ printf ("Error in reduced_expo_range\non x = ");
-+ mpfr_dump (x);
-+ printf ("Expected y = ");
-+ mpfr_out_str (stdout, 2, 0, ex_y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", ex_inex, ex_flags);
-+ printf ("Got y = ");
-+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
-+ printf ("\n inex = %d, flags = %u\n", SIGN (inex), flags);
-+ exit (1);
-+ }
-+
-+ mpfr_clears (x, y, ex_y, (mpfr_ptr) 0);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -546,6 +592,7 @@
- smallvals_atan2 ();
- atan2_bug_20071003 ();
- atan2_different_prec ();
-+ reduced_expo_range ();
-
- test_generic_atan (2, 200, 17);
- test_generic_atan2 (2, 200, 17);
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-05-04 11:18:33.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-05-05 00:00:35.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1-p2";
-+ return "3.0.1-p3";
- }
-diff -Naurd mpfr-3.0.1-a/PATCHES mpfr-3.0.1-b/PATCHES
---- mpfr-3.0.1-a/PATCHES 2011-05-09 14:48:24.000000000 +0000
-+++ mpfr-3.0.1-b/PATCHES 2011-05-09 14:48:24.000000000 +0000
-@@ -0,0 +1 @@
-+texp-zero
-diff -Naurd mpfr-3.0.1-a/VERSION mpfr-3.0.1-b/VERSION
---- mpfr-3.0.1-a/VERSION 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/VERSION 2011-05-09 14:48:24.000000000 +0000
-@@ -1 +1 @@
--3.0.1-p3
-+3.0.1-p4
-diff -Naurd mpfr-3.0.1-a/mpfr.h mpfr-3.0.1-b/mpfr.h
---- mpfr-3.0.1-a/mpfr.h 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/mpfr.h 2011-05-09 14:48:24.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.0.1-p3"
-+#define MPFR_VERSION_STRING "3.0.1-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.1-a/tests/texp.c mpfr-3.0.1-b/tests/texp.c
---- mpfr-3.0.1-a/tests/texp.c 2011-04-04 10:19:17.000000000 +0000
-+++ mpfr-3.0.1-b/tests/texp.c 2011-05-09 14:48:24.000000000 +0000
-@@ -170,7 +170,9 @@
- mpfr_set_prec (x, prec);
- mpfr_set_prec (y, prec);
- mpfr_set_prec (z, prec);
-- mpfr_urandomb (x, RANDS);
-+ do
-+ mpfr_urandomb (x, RANDS);
-+ while (MPFR_IS_ZERO (x)); /* 0 is handled by mpfr_exp only */
- rnd = RND_RAND ();
- mpfr_exp_2 (y, x, rnd);
- mpfr_exp_3 (z, x, rnd);
-diff -Naurd mpfr-3.0.1-a/version.c mpfr-3.0.1-b/version.c
---- mpfr-3.0.1-a/version.c 2011-05-05 00:00:35.000000000 +0000
-+++ mpfr-3.0.1-b/version.c 2011-05-09 14:48:24.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.1-p3";
-+ return "3.0.1-p4";
- }
diff --git a/core/mpfr/mpfr-3.1.0.p1.patch b/core/mpfr/mpfr-3.1.0.p1.patch
new file mode 100644
index 000000000..437b1a278
--- /dev/null
+++ b/core/mpfr/mpfr-3.1.0.p1.patch
@@ -0,0 +1,50 @@
+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";
+ }