crosstool-ng/patches/mpfr/3.1.3/190-si-ops.patch
Kirill K. Smirnov 2e6a56d1cc patches: add patches for mpfr
This changeset adds official patches published on
mpfr website.

Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
2016-09-18 00:01:42 +03:00

108 lines
3.6 KiB
Diff

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";
}