Module: wine Branch: master Commit: 8101d25118db9c35fc84980c1b342a1f515316f9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=8101d25118db9c35fc84980c1...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sun Nov 17 13:43:14 2019 +0100
include: Windows SDK C headers have snprintf.
And it is a function prototype, so we can't use #ifndef.
Signed-off-by: Stefan Dösinger stefan@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/wine/port.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/wine/port.h b/include/wine/port.h index b3ef4b905a..264f282837 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -69,7 +69,13 @@ #endif #define popen _popen #define pclose _pclose -#define snprintf _snprintf +/* The UCRT headers in the Windows SDK #error out if we #define snprintf. + * The C headers that came with previous Visual Studio versions do not have + * snprintf. Check for VS 2015, which appears to be the first version to + * use the UCRT headers by default. */ +#if _MSC_VER < 1900 +# define snprintf _snprintf +#endif #define strtoll _strtoi64 #define strtoull _strtoui64 #define strncasecmp _strnicmp