From 47c3a6873be59fe8a4fcdb7ecc011d12793e1a51 Mon Sep 17 00:00:00 2001 From: Lance Date: Sun, 19 Dec 2010 03:51:37 +0000 Subject: [PATCH] MinGW64 fixes, unbreaking FTEQCC too git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3703 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_cmdlib.c | 4 +++- engine/qclib/qcc_pr_lex.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/qclib/qcc_cmdlib.c b/engine/qclib/qcc_cmdlib.c index 61be4805f..f93e3e9c1 100644 --- a/engine/qclib/qcc_cmdlib.c +++ b/engine/qclib/qcc_cmdlib.c @@ -11,7 +11,8 @@ extern jmp_buf qcccompileerror; #endif // I put the following here to resolve "undefined reference to `__imp__vsnprintf'" with MinGW64 ~ Moodles -#ifdef _WIN32 +#ifdef __MINGW64__ +#ifndef QCCONLY #if (_MSC_VER >= 1400) //with MSVC 8, use MS extensions #define snprintf linuxlike_snprintf_vc8 @@ -25,6 +26,7 @@ extern jmp_buf qcccompileerror; int VARGS linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr); #endif #endif +#endif // set these before calling CheckParm int myargc; diff --git a/engine/qclib/qcc_pr_lex.c b/engine/qclib/qcc_pr_lex.c index afad3f1b2..6e5f42001 100644 --- a/engine/qclib/qcc_pr_lex.c +++ b/engine/qclib/qcc_pr_lex.c @@ -7,7 +7,8 @@ #include "time.h" // I put the following here to resolve "undefined reference to `__imp__vsnprintf'" with MinGW64 ~ Moodles -#ifdef _WIN32 +#ifdef __MINGW64__ +#ifndef QCCONLY #if (_MSC_VER >= 1400) //with MSVC 8, use MS extensions #define snprintf linuxlike_snprintf_vc8 @@ -21,6 +22,7 @@ int VARGS linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr); #endif #endif +#endif #define MEMBERFIELDNAME "__m%s"