Only add -D__USE_MINGW_ANSI_STDIO=1 for MINGW64/32

This commit is contained in:
Cary R 2024-08-16 18:35:56 -07:00
parent cba2417db5
commit 6f743cd8db
1 changed files with 10 additions and 2 deletions

View File

@ -240,8 +240,16 @@ case "${host}" in
CFLAGS="-mieee $CFLAGS"
;;
*-*-mingw*)
# The MINGW64/32 environments link to MSVCRT which has stdio issues
# so use the slower, but functional mingw versions for this case.
case "${MSYSTEM}" in
MINGW*)
CXXFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $CXXFLAGS"
CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $CFLAGS"
AC_MSG_NOTICE([${MSYSTEM} needs -D__USE_MINGW_ANSI_STDIO=1])
;;
esac
;;
esac