C99 checks depend on stddef.h and stdarg.h. Those headers are usually shipped with compilers (and another copy of them as part of mingw-w64 for targets that use it), but some providers skip them. We use our own version during the build anyway, so we may use them for configure checks as well.
From: Jacek Caban jacek@codeweavers.com
C99 checks depend on stddef.h and stdarg.h. Those headers are usually shipped with compilers (and another copy of them as part of mingw-w64 for targets that use it), but some providers skip them. We use our own version during the build anyway, so we may use them for configure checks as well. --- configure.ac | 1 + 1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac index 26bcc3f6c21..0dc083bec86 100644 --- a/configure.ac +++ b/configure.ac @@ -924,6 +924,7 @@ This is an error since --enable-archs=$wine_arch was requested.])]) continue fi
+ CFLAGS="$CFLAGS -I$srcdir/include/msvcrt/ -I$srcdir/include/" AS_VAR_PUSHDEF([wine_cv_crosscc_c99],[ac_cv_${wine_arch}_crosscc_c99]) AC_MSG_CHECKING([for $CC option to enable C99 features]) AC_CACHE_VAL([wine_cv_crosscc_c99],
On FreeBSD, this enables LLVM from ports to be used as the mingw cross-compiler:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274542
``` $ export PATH=/usr/local/llvm17/bin:$PATH $ ./configure --enable-win64 --with-mingw=clang CC=clang CXX=clang++ CPPFLAGS=-I/usr/local/include ```
I filed [a bug report](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274542) for FreeBSD excluding these header files, and [am starting](https://github.com/freebsd/freebsd-src/pull/915) to fix it.