Skip to content

Commit

Permalink
Only add -D__USE_MINGW_ANSI_STDIO=1 for MINGW64/32
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Aug 17, 2024
1 parent cba2417 commit 6f743cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,16 @@ case "${host}" in
CFLAGS="-mieee $CFLAGS"
;;
*-*-mingw*)
CXXFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $CXXFLAGS"
CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $CFLAGS"
# 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

Expand Down

0 comments on commit 6f743cd

Please sign in to comment.