summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2013-09-09 15:40:12 +0200
committerSylvain Munaut <tnt@246tNt.com>2013-09-09 15:40:12 +0200
commitde99fa6d22b8dab03a50b951296a096560843ebe (patch)
treeb42e2b31d61c2b83618a423d953a89ddd9c64c06
parent27c5af81f9bdc2835309869f9298a5a5513b725e (diff)
lib: hack to make "float complex" works on newer GCC
I _like_ the "float complex" syntax and it's valid in C and I won't go change all my C project to make it work with C++ ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--lib/optimize_c.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/optimize_c.cc b/lib/optimize_c.cc
index 318a996..2cad998 100644
--- a/lib/optimize_c.cc
+++ b/lib/optimize_c.cc
@@ -25,6 +25,17 @@
#include <gnuradio/io_signature.h>
#include <gnuradio/iqbalance/optimize_c.h>
+#define GCC_VERSION ( \
+ __GNUC__ * 10000 + \
+ __GNUC_MINOR__ * 100 + \
+ __GNUC_PATCHLEVEL__ \
+ )
+
+#if GCC_VERSION >= 40800
+# define complex _Complex
+# undef _GLIBCXX_HAVE_COMPLEX_H
+#endif
+
extern "C" {
#include <osmocom/dsp/cxvec.h>
#include <osmocom/dsp/iqbal.h>