aboutsummaryrefslogtreecommitdiff
path: root/ports/fftw3/aligned_malloc.patch
diff options
context:
space:
mode:
authorMikhaylov Anton <anion155@gmail.com>2020-02-04 13:40:15 +0500
committerMikhaylov Anton <anion155@gmail.com>2020-02-04 13:40:15 +0500
commitd56ed7ee7613e969a3f304b3377438cc5a9064d4 (patch)
treed352eee837443f070bbf5d6c5fdd9a6f22f4f8c2 /ports/fftw3/aligned_malloc.patch
parentab5b74c797f5a2bd6b28915908355e2b32876dfa (diff)
parent85bf9d9d792e379e973d66c8af9f39d65d1d6d42 (diff)
downloadvcpkg-d56ed7ee7613e969a3f304b3377438cc5a9064d4.tar.gz
vcpkg-d56ed7ee7613e969a3f304b3377438cc5a9064d4.zip
Merge branch 'master' into patch-1
Diffstat (limited to 'ports/fftw3/aligned_malloc.patch')
-rw-r--r--ports/fftw3/aligned_malloc.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/ports/fftw3/aligned_malloc.patch b/ports/fftw3/aligned_malloc.patch
new file mode 100644
index 000000000..447ded62b
--- /dev/null
+++ b/ports/fftw3/aligned_malloc.patch
@@ -0,0 +1,38 @@
+diff --git a/cmake.config.h.in b/cmake.config.h.in
+index 1f4c505..fd763cc 100644
+--- a/cmake.config.h.in
++++ b/cmake.config.h.in
+@@ -112,6 +112,10 @@
+ you don't. */
+ #cmakedefine01 HAVE_DECL_POSIX_MEMALIGN
+
++/* Define to 1 if you have the declaration of `_aligned_malloc', and to 0 if you
++ don't. */
++#cmakedefine01 HAVE_DECL_ALIGNED_MALLOC
++
+ /* Define to 1 if you have the declaration of `sinl', and to 0 if you don't.
+ */
+ #cmakedefine01 HAVE_DECL_SINL
+@@ -184,6 +188,9 @@
+ /* Define to 1 if you have the `memalign' function. */
+ #cmakedefine HAVE_MEMALIGN 1
+
++/* Define to 1 if you have the `_aligned_malloc' function. */
++#cmakedefine HAVE_ALIGNED_MALLOC 1
++
+ /* Define to 1 if you have the `memmove' function. */
+ #cmakedefine HAVE_MEMMOVE 1
+
+diff --git a/kernel/kalloc.c b/kernel/kalloc.c
+index e42f6f3..ffc2257 100644
+--- a/kernel/kalloc.c
++++ b/kernel/kalloc.c
+@@ -103,7 +103,7 @@ void *X(kernel_malloc)(size_t n)
+ # undef real_free
+ # define real_free _mm_free
+
+-# elif defined(_MSC_VER)
++# elif defined(_MSC_VER) || defined (HAVE_ALIGNED_MALLOC)
+ /* MS Visual C++ 6.0 with a "Processor Pack" supports SIMD
+ and _aligned_malloc/free (uses malloc.h) */
+ p = (void *) _aligned_malloc(n, MIN_ALIGNMENT);