Skip to content

Commit 436948e

Browse files
author
Release Manager
committed
gh-40225: Complete function prototype gmp for C23 compatibility Adapted from https://src.fedoraproject.org/rpms/gmp/blob/rawhide/f/gmp- 6.3.0-c23.patch Allows building gmp on Fedora 42 URL: #40225 Reported by: Volker Braun Reviewer(s): Dima Pasechnik
2 parents ff0b614 + d2a474f commit 436948e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Complete function prototype in acinclude.m4 & configure for C23 compatibility
2+
3+
diff --git a/acinclude.m4 b/acinclude.m4
4+
index fddb5fb07..4fca12de2 100644
5+
--- a/acinclude.m4
6+
+++ b/acinclude.m4
7+
@@ -609,7 +609,7 @@ GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 1],
8+
9+
#if defined (__GNUC__) && ! defined (__cplusplus)
10+
typedef unsigned long long t1;typedef t1*t2;
11+
-void g(){}
12+
+void g(int,t1 const*,t1,t2,t1 const*,int){}
13+
void h(){}
14+
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
15+
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
16+
diff --git a/configure b/configure
17+
index 7910aa0..2794260 100755
18+
--- a/configure
19+
+++ b/configure
20+
@@ -6568,7 +6568,7 @@ if test "$gmp_prog_cc_works" = yes; then
21+
22+
#if defined (__GNUC__) && ! defined (__cplusplus)
23+
typedef unsigned long long t1;typedef t1*t2;
24+
-void g(){}
25+
+void g(int,t1 const*,t1,t2,t1 const*,int){}
26+
void h(){}
27+
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
28+
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}

0 commit comments

Comments
 (0)