bug #1012: Enable alloca on Mac OS or if alloca is defined as macro

This commit is contained in:
Christoph Hertzberg 2015-05-06 13:24:48 +02:00
parent a08df3ff34
commit 7713b29084

View File

@ -523,7 +523,7 @@ template<typename T> struct smart_copy_helper<T,false> {
// you can overwrite Eigen's default behavior regarding alloca by defining EIGEN_ALLOCA
// to the appropriate stack allocation function
#ifndef EIGEN_ALLOCA
#if (defined __linux__)
#if (defined __linux__) || (defined __APPLE__) || (defined alloca)
#define EIGEN_ALLOCA alloca
#elif defined(_MSC_VER)
#define EIGEN_ALLOCA _alloca