diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-08-03 11:28:19 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-03 17:20:29 -0400 |
commit | 6ad25367fbd44579591e3c287ea88db618d57891 (patch) | |
tree | a579edab7adbeeb0af8dae9c2095fe007fe5bed6 | |
parent | 3403c028d69e4a4fae93b2ced95fc58b6fa8aeee (diff) | |
download | haskell-6ad25367fbd44579591e3c287ea88db618d57891.tar.gz |
Fix ASSERTS_ENABLED CPP
-rw-r--r-- | includes/Cmm.h | 2 | ||||
-rw-r--r-- | includes/Rts.h | 2 | ||||
-rw-r--r-- | rts/posix/OSThreads.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h index 9b17e9f400..94951bc9f8 100644 --- a/includes/Cmm.h +++ b/includes/Cmm.h @@ -217,7 +217,7 @@ #undef ASSERTS_ENABLED #endif -#if ASSERTS_ENABLED +#if defined(ASSERTS_ENABLED) #define ASSERT(predicate) \ if (predicate) { \ /*null*/; \ diff --git a/includes/Rts.h b/includes/Rts.h index 82fd48fcbf..e3471cf333 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -138,7 +138,7 @@ void _assertFail(const char *filename, unsigned int linenum) #undef ASSERTS_ENABLED #endif -#if ASSERTS_ENABLED +#if defined(ASSERTS_ENABLED) #define ASSERT(predicate) \ do { CHECK(predicate); } while(0) #define ASSERTM(predicate,msg,...) \ diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 980080731f..b05d5cbd03 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -223,7 +223,7 @@ osThreadIsAlive(OSThreadId id STG_UNUSED) void initMutex(Mutex* pMut) { -#if ASSERTS_ENABLED +#if defined(ASSERTS_ENABLED) pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_ERRORCHECK); |