Re: git: cd0727ec709b - main - libc: Add <stdio.h> C23 feature test macro
Date: Sat, 15 Aug 2026 18:09:28 UTC
On 15 Aug 2026, at 20:00, Robert Clausecker <fuz@fuz.su> 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