From 9d2eb460fa3569342044b6f3e61d52d86ca8cbb6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 24 Apr 2015 18:07:19 +0300 Subject: fix compilation warnings. --- src/localconsts.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/localconsts.h') diff --git a/src/localconsts.h b/src/localconsts.h index 4c4827d70..7cddefdcd 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -81,17 +81,26 @@ #define gnu_printf printf #endif +#ifdef ENABLE_CILKPLUS +#include +#endif + #ifdef __GNUC__ #ifdef ENABLE_CILKPLUS -#if GCC_VERSION < 50000 -#define cilk_for for -#elif GCC_VERSION < 49000 +#if GCC_VERSION < 40900 #define cilk_for for #define cilk_spawn -#endif // GCC_VERSION < 50000 +#define cilk_sync +#elif GCC_VERSION < 50000 +#ifdef cilk_for +#undef cilk_for +#endif // cilk_for +#define cilk_for for +#endif // GCC_VERSION < 40900 #else // ENABLE_CILKPLUS #define cilk_for for #define cilk_spawn +#define cilk_sync #endif // ENABLE_CILKPLUS #endif // __GNUC__ @@ -157,7 +166,3 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif - -#ifdef ENABLE_CILKPLUS -#include -#endif -- cgit v1.2.3-60-g2f50