From 0a41db1140e3e605adf87e4998405e83d2e1eb69 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. --- 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 775a34b5f278..5683cf8c7869 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). */