From 812c913cdd01bdb8cfd44284b808012cb7e9f72c Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 1 May 2018 08:34:28 -0700 Subject: [PATCH] use C99 pragma Signed-off-by: Nikolaj Bjorner --- src/util/util.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/util/util.h b/src/util/util.h index e087f552c..a9f28e133 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -191,16 +191,22 @@ bool is_threaded(); } \ } } ((void) 0) +#ifdef _MSC_VER +#define DO_PRAGMA(x) __pragma(x) +#else +#define DO_PRAGMA(x) _Pragma(x) +#endif + #ifdef _NO_OMP_ #define LOCK_CODE(CODE) CODE; #else #define LOCK_CODE(CODE) \ { \ - __pragma(omp critical (verbose_lock)) \ + DO_PRAGMA(omp critical (verbose_lock)) \ { \ CODE; \ } \ - } + } #endif template