Don't have CPP macros expanding to 'defined'.
authorShea Levy <shea@shealevy.com>
Tue, 13 Dec 2016 19:53:50 +0000 (14:53 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 13 Dec 2016 20:38:32 +0000 (15:38 -0500)
Reviewers: austin, simonmar, erikd, bgamari

Reviewed By: erikd, bgamari

Subscribers: angerman, thomie

Differential Revision: https://phabricator.haskell.org/D2823

includes/rts/storage/ClosureMacros.h

index 90198f2..c8c270f 100644 (file)
@@ -520,8 +520,17 @@ INLINE_HEADER StgWord8 *mutArrPtrsCard (StgMutArrPtrs *a, W_ n)
 
    -------------------------------------------------------------------------- */
 
-#define ZERO_SLOP_FOR_LDV_PROF     (defined(PROFILING))
-#define ZERO_SLOP_FOR_SANITY_CHECK (defined(DEBUG) && !defined(THREADED_RTS))
+#if defined(PROFILING)
+#define ZERO_SLOP_FOR_LDV_PROF 1
+#else
+#define ZERO_SLOP_FOR_LDV_PROF 0
+#endif
+
+#if defined(DEBUG) && !defined(THREADED_RTS)
+#define ZERO_SLOP_FOR_SANITY_CHECK 1
+#else
+#define ZERO_SLOP_FOR_SANITY_CHECK 0
+#endif
 
 #if ZERO_SLOP_FOR_LDV_PROF || ZERO_SLOP_FOR_SANITY_CHECK
 #define OVERWRITING_CLOSURE(c) overwritingClosure(c)