瀏覽代碼

Hack to make this compile with Mingw32.

Ryan C. Gordon 24 年之前
父節點
當前提交
2193cd81b7
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      platform/win32.c

+ 4 - 2
platform/win32.c

@@ -23,8 +23,10 @@
 #define __PHYSICSFS_INTERNAL__
 #define __PHYSICSFS_INTERNAL__
 #include "physfs_internal.h"
 #include "physfs_internal.h"
 
 
-#ifdef _MSC_VER /* for Cygwin, etc. */
-#define alloca _alloca
+#if (defined _MSC_VER)
+    #define alloca(x) _alloca(x)
+#elif (defined MINGW)  /* scary...hopefully this is okay. */
+    #define alloca(x) __builtin_alloca(x) 
 #endif
 #endif
 
 
 #define LOWORDER_UINT64(pos)       (PHYSFS_uint32)(pos & 0x00000000FFFFFFFF)
 #define LOWORDER_UINT64(pos)       (PHYSFS_uint32)(pos & 0x00000000FFFFFFFF)