aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Memory.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-04-24 11:26:51 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-04-24 11:26:51 +0200
commitde18cd413d27eca1fea9818349543e390f577cc1 (patch)
treeaf1802c56bbeaf126335e915f67b3427cc7ac4c3 /Eigen/src/Core/util/Memory.h
parent1681a665d9bae18c2c907c7bc69f2f71a128918d (diff)
Disable posix_memalign on Solaris and SunOS, and allows to by-pass built-in posix_memalign detection rules.
Diffstat (limited to 'Eigen/src/Core/util/Memory.h')
-rw-r--r--Eigen/src/Core/util/Memory.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h
index 16f8cc1b0..62f329984 100644
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -59,18 +59,20 @@
#endif
-// See bug 554 (http://eigen.tuxfamily.org/bz/show_bug.cgi?id=554)
-// It seems to be unsafe to check _POSIX_ADVISORY_INFO without including unistd.h first.
-// Currently, let's include it only on unix systems:
-#if EIGEN_OS_UNIX
- #include <unistd.h>
- #if (EIGEN_OS_QNX || (defined _GNU_SOURCE) || EIGEN_COMP_PGI || ((defined _XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600))) && (defined _POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO > 0)
- #define EIGEN_HAS_POSIX_MEMALIGN 1
+#ifndef EIGEN_HAS_POSIX_MEMALIGN
+ // See bug 554 (http://eigen.tuxfamily.org/bz/show_bug.cgi?id=554)
+ // It seems to be unsafe to check _POSIX_ADVISORY_INFO without including unistd.h first.
+ // Currently, let's include it only on unix systems:
+ #if EIGEN_OS_UNIX && !(EIGEN_OS_SUN || EIGEN_OS_SOLARIS)
+ #include <unistd.h>
+ #if (EIGEN_OS_QNX || (defined _GNU_SOURCE) || EIGEN_COMP_PGI || ((defined _XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600))) && (defined _POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO > 0)
+ #define EIGEN_HAS_POSIX_MEMALIGN 1
+ #endif
#endif
-#endif
-#ifndef EIGEN_HAS_POSIX_MEMALIGN
- #define EIGEN_HAS_POSIX_MEMALIGN 0
+ #ifndef EIGEN_HAS_POSIX_MEMALIGN
+ #define EIGEN_HAS_POSIX_MEMALIGN 0
+ #endif
#endif
#if defined EIGEN_VECTORIZE_SSE || defined EIGEN_VECTORIZE_AVX