From c06c8edb5a275682f16a44a048b9de79332e2b5f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 8 May 2015 02:16:53 +0200 Subject: [PATCH] Don't redefine snprintf() for MSVC 14 in libtiff. This MSVC version does add snprintf(), finally, and doesn't allow pre-#defining it before including its stdio.h, so don't do this. See #16854. (this is a backport of 0a41db1 from master) --- src/tiff/libtiff/tif_config.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tiff/libtiff/tif_config.h b/src/tiff/libtiff/tif_config.h index 6e4ecfee31..4b61352732 100644 --- a/src/tiff/libtiff/tif_config.h +++ b/src/tiff/libtiff/tif_config.h @@ -364,7 +364,10 @@ /* Set the native cpu bit order */ #define HOST_FILLORDER FILLORDER_LSB2MSB -#define snprintf _snprintf +/* MSVC 14 does have snprintf() and doesn't allow defining it */ +#if !defined(_MSC_VER) || _MSC_VER < 1900 +# define snprintf _snprintf +#endif /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */