diff options
author | Erik de Castro Lopo <erik.decastrolopo@ambiata.com> | 2017-04-05 05:53:46 +1000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-28 22:35:04 -0400 |
commit | e5b3492f23c2296d0d8221e1787ee585331f726e (patch) | |
tree | e1d6797dadc265db7f97615ff71c65c3d83db9c0 /includes/rts/OSThreads.h | |
parent | 6d14c1485cb570cbd183bcdc0f858d9a6dc1eb31 (diff) | |
download | haskell-e5b3492f23c2296d0d8221e1787ee585331f726e.tar.gz |
Enable new warning for fragile/incorrect CPP #if usage
The C code in the RTS now gets built with `-Wundef` and the Haskell code
(stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever
`#if` is used on undefined identifiers.
Test Plan: Validate on Linux and Windows
Reviewers: austin, angerman, simonmar, bgamari, Phyx
Reviewed By: bgamari
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3278
Diffstat (limited to 'includes/rts/OSThreads.h')
-rw-r--r-- | includes/rts/OSThreads.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h index 05e52d919a..520d592ec6 100644 --- a/includes/rts/OSThreads.h +++ b/includes/rts/OSThreads.h @@ -16,7 +16,7 @@ #if defined(HAVE_PTHREAD_H) && !defined(mingw32_HOST_OS) -#if CMINUSMINUS +#ifdef CMINUSMINUS #define OS_ACQUIRE_LOCK(mutex) foreign "C" pthread_mutex_lock(mutex) #define OS_RELEASE_LOCK(mutex) foreign "C" pthread_mutex_unlock(mutex) @@ -75,7 +75,7 @@ EXTERN_INLINE int TRY_ACQUIRE_LOCK(pthread_mutex_t *mutex) # elif defined(HAVE_WINDOWS_H) -#if CMINUSMINUS +#ifdef CMINUSMINUS /* We jump through a hoop here to get a CCall EnterCriticalSection and LeaveCriticalSection, as that's what C-- wants. */ |