From 5ea6ba7557619c33531f90686ba32706bcccee0b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 29 Apr 2021 15:00:16 -0400 Subject: [PATCH] msvc: Move stdarg.h include ahead of __PHYSFS_msvc_vsnprintf declaration. --- src/physfs.c | 2 -- src/physfs_internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/physfs.c b/src/physfs.c index 4c23d08..7fd4456 100644 --- a/src/physfs.c +++ b/src/physfs.c @@ -12,8 +12,6 @@ #include "physfs_internal.h" #if defined(_MSC_VER) -#include - /* this code came from https://stackoverflow.com/a/8712996 */ int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { diff --git a/src/physfs_internal.h b/src/physfs_internal.h index 2912623..b86a41d 100644 --- a/src/physfs_internal.h +++ b/src/physfs_internal.h @@ -95,6 +95,7 @@ extern const PHYSFS_Archiver __PHYSFS_Archiver_VDF; /* a real C99-compliant snprintf() is in Visual Studio 2015, but just use this everywhere for binary compatibility. */ #if defined(_MSC_VER) +#include int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap); int __PHYSFS_msvc_snprintf(char *outBuf, size_t size, const char *format, ...); #define vsnprintf __PHYSFS_msvc_vsnprintf