diff options
author | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2011-04-02 20:54:08 +0000 |
---|---|---|
committer | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2011-04-02 20:54:08 +0000 |
commit | 519b72700430b84c99db73a832c4c58f3e52ebcd (patch) | |
tree | bc25b3e8fdc07d9fb99f0af50066589710caaf3f /configure.ac | |
parent | b69a1998bedfabc32cd541408bffdef05bd01e45 (diff) | |
download | libtiff-git-519b72700430b84c99db73a832c4c58f3e52ebcd.tar.gz |
* configure.ac: Support configuring TIFF_INT64_FORMAT and
TIFF_UINT64_FORMAT appropriately for MinGW32.
* tools/tiffdump.c (ReadDirectory): MinGW32 needs to use WIN32
printf conventions for 64-bit types because it uses the WIN32 CRT.
* libtiff/{tif_dumpmode.c,tif_luv.c,tif_lzw.c,tif_print.c,
tif_read.c,tif_strip.c,tif_thunder.c}: MinGW32 needs to use WIN32
printf conventions for 64-bit types because it uses the WIN32 CRT.
* tools/tiff2pdf.c (t2p_write_pdf_string): Fix printf syntax not
understood by WIN32 CRT.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index c8140868..71004707 100644 --- a/configure.ac +++ b/configure.ac @@ -248,9 +248,19 @@ then INT64_FORMAT='"%ld"' elif test $ac_cv_sizeof_signed_long_long -eq 8 then - INT64_FORMAT='"%lld"' INT64_T='signed long long' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'long long', but uses printf from WIN32 CRT + INT64_FORMAT='"%I64d"' + ;; + *) + INT64_FORMAT='"%lld"' + ;; + esac fi + + AC_MSG_RESULT($INT64_T) AC_DEFINE_UNQUOTED(TIFF_INT64_T,$INT64_T,[Signed 64-bit type]) AC_DEFINE_UNQUOTED(TIFF_INT64_FORMAT,$INT64_FORMAT,[Signed 64-bit type formatter]) @@ -265,7 +275,15 @@ then elif test $ac_cv_sizeof_unsigned_long_long -eq 8 then UINT64_T='unsigned long long' - UINT64_FORMAT='"%llu"' + case "${host_os}" in + mingw32*) + # MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT + UINT64_FORMAT='"%I64u"' + ;; + *) + UINT64_FORMAT='"%llu"' + ;; + esac fi AC_MSG_RESULT($UINT64_T) AC_DEFINE_UNQUOTED(TIFF_UINT64_T,$UINT64_T,[Unsigned 64-bit type]) |