summaryrefslogtreecommitdiff
path: root/rts/StgCRun.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-21 09:16:48 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-28 22:35:04 -0400
commit945c45ad50ed31e3acb96fdaafb21640c4669f12 (patch)
treeae2e59ba8d3a49bbd3c3dcece39d53aef691ed44 /rts/StgCRun.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/StgCRun.c')
-rw-r--r--rts/StgCRun.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 5f7f2b910f..2166249c2a 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -59,12 +59,12 @@
#include "StgRun.h"
#include "Capability.h"
-#ifdef DEBUG
+#if defined(DEBUG)
#include "RtsUtils.h"
#include "Printer.h"
#endif
-#ifdef USE_MINIINTERPRETER
+#if defined(USE_MINIINTERPRETER)
/* -----------------------------------------------------------------------------
any architecture (using miniinterpreter)
@@ -90,7 +90,7 @@ StgFunPtr StgReturn(void)
#else /* !USE_MINIINTERPRETER */
-#ifdef LEADING_UNDERSCORE
+#if defined(LEADING_UNDERSCORE)
#define STG_RUN "_StgRun"
#define STG_RETURN "_StgReturn"
#else
@@ -114,7 +114,7 @@ StgWord8 *win32AllocStack(void)
x86 architecture
-------------------------------------------------------------------------- */
-#ifdef i386_HOST_ARCH
+#if defined(i386_HOST_ARCH)
#if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
#define STG_GLOBAL ".globl "
@@ -241,7 +241,7 @@ StgRunIsImplementedInAssembler(void)
enough space. Oh well, it's not much harder this way.
------------------------------------------------------------------------- */
-#ifdef x86_64_HOST_ARCH
+#if defined(x86_64_HOST_ARCH)
#define STG_GLOBAL ".globl "
@@ -360,7 +360,7 @@ StgRunIsImplementedInAssembler(void)
Updated info (GHC 4.08.2): not saving %i7 any more (see below).
-------------------------------------------------------------------------- */
-#ifdef sparc_HOST_ARCH
+#if defined(sparc_HOST_ARCH)
StgRegTable *
StgRun(StgFunPtr f, StgRegTable *basereg) {
@@ -409,7 +409,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
Everything is in assembler, so we don't have to deal with GCC...
-------------------------------------------------------------------------- */
-#ifdef powerpc_HOST_ARCH
+#if defined(powerpc_HOST_ARCH)
#define STG_GLOBAL ".globl "
@@ -538,9 +538,9 @@ StgRunIsImplementedInAssembler(void)
Everything is in assembler, so we don't have to deal with GCC...
-------------------------------------------------------------------------- */
-#ifdef powerpc64_HOST_ARCH
+#if defined(powerpc64_HOST_ARCH)
-#ifdef linux_HOST_OS
+#if defined(linux_HOST_OS)
static void GNUC3_ATTRIBUTE(used)
StgRunIsImplementedInAssembler(void)
{
@@ -668,7 +668,7 @@ StgRunIsImplementedInAssembler(void)
#endif
-#ifdef powerpc64le_HOST_ARCH
+#if defined(powerpc64le_HOST_ARCH)
/* -----------------------------------------------------------------------------
PowerPC 64 little endian architecture
@@ -680,7 +680,7 @@ StgRunIsImplementedInAssembler(void)
ARM architecture
-------------------------------------------------------------------------- */
-#ifdef arm_HOST_ARCH
+#if defined(arm_HOST_ARCH)
#if defined(__thumb__)
#define THUMB_FUNC ".thumb\n\t.thumb_func\n\t"
@@ -757,7 +757,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
}
#endif
-#ifdef aarch64_HOST_ARCH
+#if defined(aarch64_HOST_ARCH)
StgRegTable *
StgRun(StgFunPtr f, StgRegTable *basereg) {