https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297562
Bug ID: 297562
Summary: math/gmp: fix build after base cd0727ec709b
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: [email protected]
Reporter: [email protected]
Assignee: [email protected]
Flags: maintainer-feedback?([email protected])
math/gmp: fix build after base cd0727ec709b
After base cd0727ec709bb54f8f82104f6113284a15dd3464 ("libc: Add
<stdio.h> C23 feature test macro"), math/gmp fails to build with errors
similar to:
inp_str.c:63:10: warning: call to undeclared function
'__gmpz_inp_str_nowhite'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
63 | return mpz_inp_str_nowhite (x, stream, base, c, nread);
| ^
../gmp-impl.h:1782:29: note: expanded from macro 'mpz_inp_str_nowhite'
1782 | #define mpz_inp_str_nowhite __gmpz_inp_str_nowhite
| ^
inp_str.c:68:1: error: conflicting types for '__gmpz_inp_str_nowhite'
68 | mpz_inp_str_nowhite (mpz_ptr x, FILE *stream, int base, int c, size_t
nread)
| ^
../gmp-impl.h:1782:29: note: expanded from macro 'mpz_inp_str_nowhite'
1782 | #define mpz_inp_str_nowhite __gmpz_inp_str_nowhite
| ^
inp_str.c:63:10: note: previous implicit declaration is here
63 | return mpz_inp_str_nowhite (x, stream, base, c, nread);
| ^
../gmp-impl.h:1782:29: note: expanded from macro 'mpz_inp_str_nowhite'
1782 | #define mpz_inp_str_nowhite __gmpz_inp_str_nowhite
| ^
1 warning and 1 error generated.
This is because mpz_inp_str_nowhite() is only declared with the right
prototype, if _GMP_H_HAVE_FILE is defined. In turn, _GMP_H_HAVE_FILE is
defined only if _STDIO_H_ is defined, as it used to be in our stdio.h.
Since base cd0727ec709bb54f8f82104f6113284a15dd3464 removed the
_STDIO_H_ macro, and replaced it with __STDC_VERSION_STDIO_H__ for C23
support, add it to the list of checks in gmp-h.in, and mini-gmp.h.
--
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.