]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/fteqcc-src/qcc_cmdlib.c
Update fteqcc source
[voretournament/voretournament.git] / misc / source / fteqcc-src / qcc_cmdlib.c
index f93e3e9c19683e8e884803e36543417f135d8eb0..b3c4b6b843e91af03bfc27a4199256cb1d669a99 100644 (file)
 extern jmp_buf qcccompileerror;
 #endif
 
-// I put the following here to resolve "undefined reference to `__imp__vsnprintf'" with MinGW64 ~ Moodles
-#ifdef __MINGW64__
-#ifndef QCCONLY
-       #if (_MSC_VER >= 1400)
-               //with MSVC 8, use MS extensions
-               #define snprintf linuxlike_snprintf_vc8
-               int VARGS linuxlike_snprintf_vc8(char *buffer, int size, const char *format, ...) LIKEPRINTF(3);
-               #define vsnprintf(a, b, c, d) vsnprintf_s(a, b, _TRUNCATE, c, d)
-       #else
-               //msvc crap
+#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
-#endif
 
 // set these before calling CheckParm
 int myargc;
@@ -44,7 +36,7 @@ const unsigned int            type_size[12] = {1,     //void
                                                sizeof(func_t)/4,//function
                                                1,  //pointer (its an int index)
                                                1,      //integer
-                                               1,      //fixme: how big should a variant be?
+                                               3,      //fixme: how big should a variant be?
                                                0,      //ev_struct. variable sized.
                                                0       //ev_union. variable sized.
                                                };