Skip to content

Commit

Permalink
msvc: Move stdarg.h include ahead of __PHYSFS_msvc_vsnprintf declarat…
Browse files Browse the repository at this point in the history
…ion.

(transplanted from e0346f4349265b4e483b987a0694740474942bb0)
  • Loading branch information
icculus committed Apr 29, 2021
1 parent 48ffe8d commit 911e253
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions src/physfs.c
Expand Up @@ -12,8 +12,6 @@
#include "physfs_internal.h"

#if defined(_MSC_VER)
#include <stdarg.h>

/* this code came from https://stackoverflow.com/a/8712996 */
int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
{
Expand Down
1 change: 1 addition & 0 deletions src/physfs_internal.h
Expand Up @@ -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 <stdarg.h>
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
Expand Down

0 comments on commit 911e253

Please sign in to comment.