From 1bc709a8adaf0f71d30efd013549a2fa28a0fec6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 30 Jul 2020 11:17:21 +0200 Subject: Request that FFTW uses "double[2]", not "complex" for fftw_complex Normally, FFTW uses the C99 "complex" type for fftw_complex, if complex.h is included before fftw3.h. We do not use complex.h, and want the double[2] version otherwise the code breaks horribly. Unfortunatley, under certain build scenarios, complex.h seems to get included via the GSL headers. Adding #define FFTW_NO_Complex prevents this. --- libcrystfel/src/asdf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c index e583aae3..77bd0d13 100644 --- a/libcrystfel/src/asdf.c +++ b/libcrystfel/src/asdf.c @@ -42,7 +42,6 @@ #include #include #include -#include #include "image.h" #include "dirax.h" @@ -57,6 +56,13 @@ #ifdef HAVE_FFTW +#define FFTW_NO_Complex /* Please use "double[2]", not C99 "complex", + * despite complex.h possibly already being + * included. For more information, refer to: + * http://www.fftw.org/doc/Complex-numbers.html */ + +#include + struct fftw_vars { int N; fftw_plan p; -- cgit v1.2.3