diff options
author | bfriesen <bfriesen> | 2011-04-02 20:54:08 +0000 |
---|---|---|
committer | bfriesen <bfriesen> | 2011-04-02 20:54:08 +0000 |
commit | 0e39daddb5be01f6be28d5302a5dcd901e8dfc22 (patch) | |
tree | 6d9110ce51abd49cd54b0053ddbd5222830b95af /configure.ac | |
parent | a599d3a74eb11cfae234a9a9c5c949430a10ea92 (diff) | |
download | libtiff-0e39daddb5be01f6be28d5302a5dcd901e8dfc22.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]) |