- Add mpfr-4.1.1-patch01.patch to fix bug with code using
the mpfr_custom_get_kind macro. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/mpfr?expand=0&rev=72
This commit is contained in:
parent
5d4d6e7626
commit
d070d154cc
83
mpfr-4.1.1-patch01.patch
Normal file
83
mpfr-4.1.1-patch01.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
diff -Naurd mpfr-4.1.1-a/PATCHES mpfr-4.1.1-b/PATCHES
|
||||||
|
--- mpfr-4.1.1-a/PATCHES 2022-11-23 11:45:26.800476079 +0000
|
||||||
|
+++ mpfr-4.1.1-b/PATCHES 2022-11-23 11:45:26.844475966 +0000
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+mpfr_custom_get_kind
|
||||||
|
diff -Naurd mpfr-4.1.1-a/VERSION mpfr-4.1.1-b/VERSION
|
||||||
|
--- mpfr-4.1.1-a/VERSION 2022-11-17 13:28:44.000000000 +0000
|
||||||
|
+++ mpfr-4.1.1-b/VERSION 2022-11-23 11:45:26.844475966 +0000
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-4.1.1
|
||||||
|
+4.1.1-p1
|
||||||
|
diff -Naurd mpfr-4.1.1-a/src/mpfr.h mpfr-4.1.1-b/src/mpfr.h
|
||||||
|
--- mpfr-4.1.1-a/src/mpfr.h 2022-11-17 13:28:44.000000000 +0000
|
||||||
|
+++ mpfr-4.1.1-b/src/mpfr.h 2022-11-23 11:45:26.840475978 +0000
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
#define MPFR_VERSION_MAJOR 4
|
||||||
|
#define MPFR_VERSION_MINOR 1
|
||||||
|
#define MPFR_VERSION_PATCHLEVEL 1
|
||||||
|
-#define MPFR_VERSION_STRING "4.1.1"
|
||||||
|
+#define MPFR_VERSION_STRING "4.1.1-p1"
|
||||||
|
|
||||||
|
/* User macros:
|
||||||
|
MPFR_USE_FILE: Define it to make MPFR define functions dealing
|
||||||
|
@@ -1027,7 +1027,7 @@
|
||||||
|
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 95
|
||||||
|
#define mpfr_custom_get_kind(x) \
|
||||||
|
__extension__ ({ \
|
||||||
|
- mpfr_ptr _x = (x); \
|
||||||
|
+ mpfr_srcptr _x = (x); \
|
||||||
|
_x->_mpfr_exp > __MPFR_EXP_INF ? \
|
||||||
|
(mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (_x) \
|
||||||
|
: _x->_mpfr_exp == __MPFR_EXP_INF ? \
|
||||||
|
diff -Naurd mpfr-4.1.1-a/src/version.c mpfr-4.1.1-b/src/version.c
|
||||||
|
--- mpfr-4.1.1-a/src/version.c 2022-11-17 13:28:44.000000000 +0000
|
||||||
|
+++ mpfr-4.1.1-b/src/version.c 2022-11-23 11:45:26.844475966 +0000
|
||||||
|
@@ -25,5 +25,5 @@
|
||||||
|
const char *
|
||||||
|
mpfr_get_version (void)
|
||||||
|
{
|
||||||
|
- return "4.1.1";
|
||||||
|
+ return "4.1.1-p1";
|
||||||
|
}
|
||||||
|
diff -Naurd mpfr-4.1.1-a/tests/tstckintc.c mpfr-4.1.1-b/tests/tstckintc.c
|
||||||
|
--- mpfr-4.1.1-a/tests/tstckintc.c 2022-05-06 13:47:17.000000000 +0000
|
||||||
|
+++ mpfr-4.1.1-b/tests/tstckintc.c 2022-11-23 11:45:26.836475987 +0000
|
||||||
|
@@ -295,14 +295,16 @@
|
||||||
|
test_nan_inf_zero (void)
|
||||||
|
{
|
||||||
|
mpfr_ptr val;
|
||||||
|
+ mpfr_srcptr sval; /* for compilation error checking */
|
||||||
|
int sign;
|
||||||
|
int kind;
|
||||||
|
|
||||||
|
reset_stack ();
|
||||||
|
|
||||||
|
val = new_mpfr (MPFR_PREC_MIN);
|
||||||
|
+ sval = val;
|
||||||
|
mpfr_set_nan (val);
|
||||||
|
- kind = (mpfr_custom_get_kind) (val);
|
||||||
|
+ kind = (mpfr_custom_get_kind) (sval);
|
||||||
|
if (kind != MPFR_NAN_KIND)
|
||||||
|
{
|
||||||
|
printf ("mpfr_custom_get_kind error: ");
|
||||||
|
@@ -380,7 +382,8 @@
|
||||||
|
dummy_set_si (long si)
|
||||||
|
{
|
||||||
|
mpfr_t x;
|
||||||
|
- long * r = dummy_new ();
|
||||||
|
+ mpfr_srcptr px; /* for compilation error checking */
|
||||||
|
+ long *r = dummy_new ();
|
||||||
|
int i1, i2, i3, i4, i5;
|
||||||
|
|
||||||
|
/* Check that the type "void *" can be used, like with the function.
|
||||||
|
@@ -405,7 +408,8 @@
|
||||||
|
MPFR_ASSERTN (i5 == 1);
|
||||||
|
|
||||||
|
mpfr_set_si (x, si, MPFR_RNDN);
|
||||||
|
- r[0] = mpfr_custom_get_kind (x);
|
||||||
|
+ px = x;
|
||||||
|
+ r[0] = mpfr_custom_get_kind (px);
|
||||||
|
|
||||||
|
/* Check that the type "void *" can be used in C, like with the function
|
||||||
|
(forbidden in C++). Also check side effects. */
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 24 09:08:38 UTC 2022 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Add mpfr-4.1.1-patch01.patch to fix bug with code using
|
||||||
|
the mpfr_custom_get_kind macro.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Nov 19 12:57:57 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
Sat Nov 19 12:57:57 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ Source0: https://www.mpfr.org/mpfr-%{version}/mpfr-%{version}.tar.xz
|
|||||||
Source1: https://www.mpfr.org/mpfr-%{version}/mpfr-%{version}.tar.xz.asc
|
Source1: https://www.mpfr.org/mpfr-%{version}/mpfr-%{version}.tar.xz.asc
|
||||||
Source2: %{name}.keyring
|
Source2: %{name}.keyring
|
||||||
Source3: baselibs.conf
|
Source3: baselibs.conf
|
||||||
|
Patch0: mpfr-4.1.1-patch01.patch
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
|
||||||
@ -67,6 +68,7 @@ based on the GMP multiple-precision library.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
|
Loading…
Reference in New Issue
Block a user