From 108fe0c6609cc5fce6822a141110083b13794b1d Mon Sep 17 00:00:00 2001 From: Bob Friesenhahn Date: Sat, 20 Jun 2015 20:33:17 +0000 Subject: [PATCH] * 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. --- ChangeLog | 4 ++++ configure | 10 +++++++++- configure.ac | 10 +++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) 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])