From 58e00a0f991e45f3ef8ae08b7660aab46f43fefc Mon Sep 17 00:00:00 2001 From: Thomas Maeder Date: Sun, 24 May 2020 17:13:00 +0200 Subject: [PATCH] make snprintf.c compile again with the more strict compiler options we have adopted since the relase of 4.83 --- platform/windows32/snprintf.c | 5 +++-- platform/windows64/snprintf.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/platform/windows32/snprintf.c b/platform/windows32/snprintf.c index 37408bbbd8..ab014f25b5 100644 --- a/platform/windows32/snprintf.c +++ b/platform/windows32/snprintf.c @@ -3,11 +3,12 @@ * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 */ -#ifdef _MSC_VER - +/* these #includes are placed here rather than below the #ifdef because empty translation units are not allowed */ #include #include +#ifdef _MSC_VER + static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) { int result = -1; diff --git a/platform/windows64/snprintf.c b/platform/windows64/snprintf.c index 37408bbbd8..ab014f25b5 100755 --- a/platform/windows64/snprintf.c +++ b/platform/windows64/snprintf.c @@ -3,11 +3,12 @@ * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 */ -#ifdef _MSC_VER - +/* these #includes are placed here rather than below the #ifdef because empty translation units are not allowed */ #include #include +#ifdef _MSC_VER + static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) { int result = -1;