Re: git: cd0727ec709b - main - libc: Add <stdio.h> C23 feature test macro

Dimitry Andric <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.current.scm
Message-ID <[email protected]>
On 15 Aug 2026, at 20:00, Robert Clausecker <[email protected]> wrote:
> 
> Hi Dimitry,
> 
> The test used by this package seems defective.
> I don't think we should try to support such defective code.
> Perhaps the gmp source can be patched to check for
> __STDC_VERSION_STDIO_H__?

Of course it could, and the patch is pretty simple. But I do not agree
that the code is "defective". Before C23, there was no standard way of
checking whether you had FILE declared.

So this part of gmp, while admittedly ugly, is a fine way to work around
the fact there was no standard. It simply enumerates defines which have
been available for years, or even decades. I would call it "effective",
not "defective". :-)

That said, I have applied such a patch locally, and it seems to work.
But obviously a maintainer of a port would say "this has worked for 20
years, why change it now" ? :)

-Dimitry
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.