[mpfr] Update to 4.2.0 (#28910)

This commit is contained in:
Cheney Wang 2023-01-19 17:59:49 -08:00 committed by GitHub
parent d1366382d3
commit 79c9b3074a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 87 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

@ -3,7 +3,7 @@ vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_download_distfile(ARCHIVE
URLS "http://www.mpfr.org/mpfr-${VERSION}/mpfr-${VERSION}.tar.xz" "https://ftp.gnu.org/gnu/mpfr/mpfr-${VERSION}.tar.xz"
FILENAME "mpfr-${VERSION}.tar.xz"
SHA512 be468749bd88870dec37be35e544983a8fb7bda638eb9414c37334b9d553099ea2aa067045f51ae2c8ab86d852ef833e18161d173e414af0928e9a438c9b91f1
SHA512 58e843125884ca58837ae5159cd4092af09e8f21931a2efd19c15de057c9d1dc0753ae95c592e2ce59a727fbc491af776db8b00a055320413cdcf2033b90505c
)
vcpkg_extract_source_archive(
@ -12,7 +12,6 @@ vcpkg_extract_source_archive(
PATCHES
dll.patch
src-only.patch
4.1.1-p1.patch # https://www.mpfr.org/mpfr-4.1.1/#bugs
)
vcpkg_configure_make(

View File

@ -1,6 +1,6 @@
{
"name": "mpfr",
"version": "4.1.1",
"version": "4.2.0",
"description": "The MPFR library is a C library for multiple-precision floating-point computations with correct rounding",
"homepage": "https://www.mpfr.org",
"license": "LGPL-3.0-or-later",

View File

@ -5085,7 +5085,7 @@
"port-version": 2
},
"mpfr": {
"baseline": "4.1.1",
"baseline": "4.2.0",
"port-version": 0
},
"mpg123": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "843923d6f0b86ada254232a971968923c83bc1b5",
"version": "4.2.0",
"port-version": 0
},
{
"git-tree": "e03248f0a54aa99977a77f1a3d7e4be91c1048ec",
"version": "4.1.1",