diff --git a/ChangeLog b/ChangeLog index f0f855a3..cb8b22d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-06-20 Bob Friesenhahn + * configure.ac: For 64-bit MinGW, fix SSIZE_FORMAT formatting + specifier. 64-bit MinGW supports 'long long' but support for + 'lld' is not assured by the run-time DLLs. + * test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32 and boolean in MinGW build due to including jpeglib.h. diff --git a/configure b/configure index ef72e024..290eaddd 100755 --- a/configure +++ b/configure @@ -17692,7 +17692,15 @@ then elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p then SSIZE_T='signed long long' - SSIZE_FORMAT='"%lld"' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'long long', but uses printf from WIN32 CRT + SSIZE_FORMAT='"%I64d"' + ;; + *) + SSIZE_FORMAT='"%lld"' + ;; + esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSIZE_T" >&5 $as_echo "$SSIZE_T" >&6; } diff --git a/configure.ac b/configure.ac index 608d41e0..7dd42e3d 100644 --- a/configure.ac +++ b/configure.ac @@ -332,7 +332,15 @@ then elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p then SSIZE_T='signed long long' - SSIZE_FORMAT='"%lld"' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'long long', but uses printf from WIN32 CRT + SSIZE_FORMAT='"%I64d"' + ;; + *) + SSIZE_FORMAT='"%lld"' + ;; + esac fi AC_MSG_RESULT($SSIZE_T) AC_DEFINE_UNQUOTED(TIFF_SSIZE_T,$SSIZE_T,[Signed size type])