Proper fix to my previous failed fix

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3955 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2012-01-04 16:51:50 +00:00
parent 5c52aa9975
commit 0b7e5ce3e6
2 changed files with 17 additions and 8 deletions

View file

@ -10,6 +10,16 @@
extern jmp_buf qcccompileerror;
#endif
#ifdef _WIN64
#ifdef _SDL
#define snprintf linuxlike_snprintf
int VARGS linuxlike_snprintf(char *buffer, int size, const char *format, ...) LIKEPRINTF(3);
#define vsnprintf linuxlike_vsnprintf
int VARGS linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr);
void *__imp__vsnprintf = vsnprintf;
#endif
#endif
// set these before calling CheckParm
int myargc;
char **myargv;

View file

@ -6,15 +6,14 @@
#endif
#include "time.h"
// Win64 + SDL = undfined reference to vsnprintf
#ifdef _WIN64
#ifdef SDL_MAJOR_VERSION
//msvc crap
#define snprintf linuxlike_snprintf
int VARGS linuxlike_snprintf(char *buffer, int size, const char *format, ...) LIKEPRINTF(3);
#define vsnprintf linuxlike_vsnprintf
int VARGS linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr);
#endif
#ifdef _SDL
#define snprintf linuxlike_snprintf
int VARGS linuxlike_snprintf(char *buffer, int size, const char *format, ...) LIKEPRINTF(3);
#define vsnprintf linuxlike_vsnprintf
int VARGS linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr);
//void *__imp__vsnprintf = vsnprintf;
#endif
#endif
#define MEMBERFIELDNAME "__m%s"