[PATCH] diagnostics: only MinGW 10.0.0 and later ships afunix.h

Jonathan Yong 10walls@gmail.com
Fri Jan 30 02:16:39 GMT 2026


On 1/29/26 7:56 PM, Andrew Pinski wrote:
> 
> Both works for me but I am not sure which way is better. For our users
> having the workaround is definitely better. But cleanliness of the
> code having it disabled is better. Maybe folks with more mingw
> knowledge than me can say if requiring a new enough mingw is ok here
> or not?
> I suspect yes since this is more for a new feature of diagnostic to
> IDEs (or IDE like programs) and people on older mingw are less likely
> to use this feature.
> But I am not sure.
> 
> Thanks,
> Andrew
> 

I would prefer a mingw header check or compile test in gcc/configure.ac 
so backported afunix.h to older versions of mingw would work. The header 
itself is rather simple:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/afunix.h

If the header is not detected, declare the required definitions.

I am also fine for configure to emit an error suggesting to the user to 
upgrade mingw-w64.



More information about the Gcc-patches mailing list