add include so alloca() is found on mingw.

This commit is contained in:
Campbell Barton
2012-12-13 11:59:07 +00:00
parent 97bea740f8
commit 0f97d53c74

View File

@@ -203,6 +203,10 @@
# define alloca _alloca
#endif
#if defined(__MINGW32__)
# include <malloc.h> /* mingw needs for alloca() */
#endif
#if defined(__GNUC__) || defined(__clang__)
#define BLI_array_alloca(arr, realsize) \
(typeof(arr))alloca(sizeof(*arr) * (realsize))
@@ -219,3 +223,4 @@
alloca(sizeof(*arr) * (realsize)); \
const int _##arr##_count = (realsize)
#endif