Ticket #17936: tif_fix.patch

File tif_fix.patch, 748 bytes (added by NewPagodi, 3 years ago)

Fix compilation with latest MinGW32

  • libtiff/tif_config.h

    diff --git a/libtiff/tif_config.h b/libtiff/tif_config.h
    index b9fcb850..d54bb88a 100644
    a b  
    384384/* Set the native cpu bit order */
    385385#define HOST_FILLORDER FILLORDER_LSB2MSB
    386386
    387 /* MSVC 14 does have snprintf() and doesn't allow defining it */
    388 #if !defined(_MSC_VER) || _MSC_VER < 1900
     387/* MSVC 14 does have snprintf() and doesn't allow defining it.  Also MinGW32
     388   starting with GCC 6.3 has changed _snprintf so that it is no longer suitable.
     389   It does have snprintf, so just use it. */
     390#if defined (__MINGW32__) && (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ > 2))
     391  /* do nothing*/
     392#elif !defined(_MSC_VER) || _MSC_VER < 1900
    389393# define snprintf _snprintf
    390394#endif
    391395