summaryrefslogtreecommitdiff
path: root/includes/Cmm.h
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-11-29 16:51:30 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-29 16:51:30 -0500
commit428e152be6bb0fd3867e41cee82a6d5968a11a26 (patch)
treee43d217c10c052704f872cd7e1df4d335c12d376 /includes/Cmm.h
parent56d74515396c8b6360ba7898cbc4b68f0f1fb2ea (diff)
downloadhaskell-428e152be6bb0fd3867e41cee82a6d5968a11a26.tar.gz
Use C99's bool
Test Plan: Validate on lots of platforms Reviewers: erikd, simonmar, austin Reviewed By: erikd, simonmar Subscribers: michalt, thomie Differential Revision: https://phabricator.haskell.org/D2699
Diffstat (limited to 'includes/Cmm.h')
-rw-r--r--includes/Cmm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 9b7a4e4608..0623c3eeb6 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -50,6 +50,7 @@
CInt has the same size as an int in C on this platform
CLong has the same size as a long in C on this platform
+ CBool has the same size as a bool in C on this platform
--------------------------------------------------------------------------- */
@@ -95,6 +96,8 @@
#error Unknown long size
#endif
+#define CBool bits8
+
#define F_ float32
#define D_ float64
#define L_ bits64
@@ -229,7 +232,7 @@
* Note the syntax is slightly different to the C version of this macro.
*/
#ifdef DEBUG
-#define IF_DEBUG(c,s) if (RtsFlags_DebugFlags_##c(RtsFlags) != 0::I32) { s; }
+#define IF_DEBUG(c,s) if (RtsFlags_DebugFlags_##c(RtsFlags) != 0::CBool) { s; }
#else
#define IF_DEBUG(c,s) /* nothing */
#endif