浏览代码

Merge pull request #4561 from vnen/pr-fix-win64-build

Fix build for Windows 64-bits with GCC
Rémi Verschelde 9 年之前
父节点
当前提交
78a616eab0
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/gl_context/glew.h

+ 4 - 0
drivers/gl_context/glew.h

@@ -153,7 +153,11 @@ typedef unsigned short wchar_t;
 #endif
 #endif
 #if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_)
 #if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_)
 #  ifdef _WIN64
 #  ifdef _WIN64
+#    ifdef _MSC_VER // Using MSVC
 typedef __int64 ptrdiff_t;
 typedef __int64 ptrdiff_t;
+#    else // Using GCC
+typedef long int ptrdiff_t;
+#    endif
 #  else
 #  else
 typedef _W64 int ptrdiff_t;
 typedef _W64 int ptrdiff_t;
 #  endif
 #  endif