diff --git a/engine/qclib/qcc_cmdlib.c b/engine/qclib/qcc_cmdlib.c index 61be4805..f93e3e9c 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 afad3f1b..6e5f4200 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"