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.
Approved by: portmgr (build fix blanket)
PR: 297562
MFH: 2026Q3
(cherry picked from commit 03ce372d3e188c27fe745c974c23dfe42695782d)