Accepting request 1062392 from devel:libraries:c_c++

- tests-tsprintf.patch: Avoid testsuite failure with glibc >= 2.37

- Update to mpfr 4.2.0
  * New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
    mpfr_atanu and mpfr_atan2u.
  * New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi,
    mpfr_atanpi and mpfr_atan2pi.
  * New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
    mpfr_compound_si.
  * New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj
    and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for
    mpfr_pow_sj).
  * Bug fixes.
    In particular, for the formatted output functions (mpfr_printf, etc.),
    the case where the precision consists only of a period has been fixed
    to be like ".0" as specified in the ISO C standard, and the manual has
    been corrected and clarified.
    The macros of the custom interface have also been fixed: they now behave
    like functions (except a minor limitation for mpfr_custom_init_set).
- Remove mpfr-4.1.1-patch01.patch which is included in the new release.

OBS-URL: https://build.opensuse.org/request/show/1062392
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpfr?expand=0&rev=58
This commit is contained in:
Dominique Leuenberger 2023-02-02 17:06:46 +00:00 committed by Git OBS Bridge
commit bc177d9e84
8 changed files with 96 additions and 96 deletions

View File

@ -1,83 +0,0 @@
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. */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ffd195bd567dbaffc3b98b23fd00aad0537680c9896171e44fe3ff79e28ac33d
size 1429836

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQSlNL4/g+JB2RgoCutYMdEaDU2wKgUCY3Y8nQAKCRBYMdEaDU2w
Kl5VAP0RgeqbW7slZlfkxAtJ5FF4pM/cXzkc9BlLSqazc0vD2AEAuYw6eA5QmjjH
5Un62IrZMVzSmp98XqG18IF9k/J7RAM=
=pqz1
-----END PGP SIGNATURE-----

3
mpfr-4.2.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993
size 1477532

7
mpfr-4.2.0.tar.xz.asc Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQSlNL4/g+JB2RgoCutYMdEaDU2wKgUCY7gEFgAKCRBYMdEaDU2w
KvJAAP9ittAduZGXgjgIYT7detiVCnDpcyFUTIzkFh5NM3KmagEA5bEcwHjUQT8H
+KGcR9nBRBxqcvjHUX6qOHqNdHZTfwM=
=QJu5
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Jan 31 15:58:22 UTC 2023 - Andreas Schwab <schwab@suse.de>
- tests-tsprintf.patch: Avoid testsuite failure with glibc >= 2.37
-------------------------------------------------------------------
Mon Jan 9 08:22:17 UTC 2023 - Richard Biener <rguenther@suse.com>
- Update to mpfr 4.2.0
* New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
mpfr_atanu and mpfr_atan2u.
* New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi,
mpfr_atanpi and mpfr_atan2pi.
* New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
mpfr_compound_si.
* New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj
and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for
mpfr_pow_sj).
* Bug fixes.
In particular, for the formatted output functions (mpfr_printf, etc.),
the case where the precision consists only of a period has been fixed
to be like ".0" as specified in the ISO C standard, and the manual has
been corrected and clarified.
The macros of the custom interface have also been fixed: they now behave
like functions (except a minor limitation for mpfr_custom_init_set).
- Remove mpfr-4.1.1-patch01.patch which is included in the new release.
-------------------------------------------------------------------
Thu Nov 24 09:08:38 UTC 2022 - Richard Biener <rguenther@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package mpfr
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: mpfr
Version: 4.1.1
Version: 4.2.0
Release: 0
Summary: The GNU multiple-precision floating-point library
License: LGPL-3.0-or-later
@ -27,7 +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
Source2: %{name}.keyring
Source3: baselibs.conf
Patch0: mpfr-4.1.1-patch01.patch
Patch0: tests-tsprintf.patch
BuildRequires: gmp-devel
BuildRequires: pkgconfig

56
tests-tsprintf.patch Normal file
View File

@ -0,0 +1,56 @@
From 5172494c09718ffcb7ef1f19b3b211e3bce8781a Mon Sep 17 00:00:00 2001
From: Vincent Lefevre <vincent@vinc17.net>
Date: Tue, 10 Jan 2023 17:05:17 +0100
Subject: [PATCH] [tests/tsprintf.c] Modified a buggy test of the thousands
separator.
The test
check_vsprintf ("+01,234,567 :", "%0+ -'13.10Pd:", (mpfr_prec_t) 1234567);
is based on the output from glibc up to 2.36, which is incorrect:
https://sourceware.org/bugzilla/show_bug.cgi?id=23432
The GNU C Library has apparently been partially fixed in its Git
repository for the future 2.37, since a tsprintf failure has been
reported (this is a bug in this test, not in the MPFR library):
https://sympa.inria.fr/sympa/arc/mpfr/2023-01/msg00001.html
So, modified the test to avoid the particular case of leading zeros
due to the precision field larger than the number of digits. This
case has already been tested without the thousands separator (where
there are no issues with the C libraries), so that we do not miss
much testing. Added a comment explaining the issue and a possible
solution for future testing of this particular case (if need be).
---
tests/tsprintf.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/tsprintf.c b/tests/tsprintf.c
index c68b2ba71..c0182503b 100644
--- a/tests/tsprintf.c
+++ b/tests/tsprintf.c
@@ -1719,7 +1719,17 @@ test_locale (void)
check_sprintf ("000000001,000", "%'013.4Rg", x);
#ifdef PRINTF_GROUPFLAG
- check_vsprintf ("+01,234,567 :", "%0+ -'13.10Pd:", (mpfr_prec_t) 1234567);
+ /* Do not test the thousands separator with a precision field larger
+ than the number of digits (thus needing leading zeros), such as
+ "%0+ -'13.10Pd:" (used up to MPFR 4.2.0), since the GNU libc is
+ buggy: https://sourceware.org/bugzilla/show_bug.cgi?id=23432
+ We don't know about the other implementations.
+ If we wanted to check that and avoid a failure of the test because of
+ a buggy C library (while MPFR would be consistent with the C library),
+ we could compare the MPFR output with both the correct output and the
+ output from the C library (possibly buggy). But to do that in a clean
+ way, this would require a change in the check_vsprintf() call. */
+ check_vsprintf ("+1,234,567 :", "%0+ -'13Pd:", (mpfr_prec_t) 1234567);
#endif
mpfr_clear (x);
--
2.39.1