From e5e391411f79673117c0d1a4367d1235e49ba8da Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Mon, 7 Jul 2014 16:53:14 +0000 Subject: [PATCH] Reorder and includes In order to fix the build on gcc-4.8, reorder the include to always be first, followed by undefinition of the "complex" symbol, and then finally include the C++ . --- src/libiir++/000_TopSource.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libiir++/000_TopSource.cc b/src/libiir++/000_TopSource.cc index 621942d..6daa3bf 100644 --- a/src/libiir++/000_TopSource.cc +++ b/src/libiir++/000_TopSource.cc @@ -5,13 +5,16 @@ * License: GPLv3 */ -#include "iir++.h" +// we need to include "iir.h" first, as it pulls in , which we need +// to take effect before "iir++.h" pulls in #include "iir.h" -// iir.h includes , which #defines complex to _Complex. That's fine -// for the C header above, but will mess with our code definitions below. +// now remove the preprocessor definition of complex to _Complex, which is fine +// for the C header but not good for the C++ header #undef complex +#include "iir++.h" + // Below are all the includes used throughout the library. namespace IIR {