summaryrefslogtreecommitdiff
path: root/rts/Printer.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/Printer.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/Printer.c')
-rw-r--r--rts/Printer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/rts/Printer.c b/rts/Printer.c
index 87b11e80d8..f077814ba9 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -17,13 +17,13 @@
#include "Printer.h"
#include "RtsUtils.h"
-#ifdef PROFILING
+#if defined(PROFILING)
#include "Profiling.h"
#endif
#include <string.h>
-#ifdef DEBUG
+#if defined(DEBUG)
#include "Disassembler.h"
#include "Apply.h"
@@ -61,7 +61,7 @@ printStdObjHdr( const StgClosure *obj, char* tag )
{
debugBelch("%s(",tag);
printPtr((StgPtr)obj->header.info);
-#ifdef PROFILING
+#if defined(PROFILING)
debugBelch(", %s", obj->header.prof.ccs->cc->label);
#endif
}
@@ -146,7 +146,7 @@ printClosure( const StgClosure *obj )
case FUN_STATIC:
debugBelch("FUN/%d(",(int)itbl_to_fun_itbl(info)->f.arity);
printPtr((StgPtr)obj->header.info);
-#ifdef PROFILING
+#if defined(PROFILING)
debugBelch(", %s", obj->header.prof.ccs->cc->label);
#endif
printStdObjPayload(obj);
@@ -169,7 +169,7 @@ printClosure( const StgClosure *obj )
case THUNK_1_1: case THUNK_0_2: case THUNK_2_0:
case THUNK_STATIC:
/* ToDo: will this work for THUNK_STATIC too? */
-#ifdef PROFILING
+#if defined(PROFILING)
printThunkObject((StgThunk *)obj,GET_PROF_DESC(info));
#else
printThunkObject((StgThunk *)obj,"THUNK");
@@ -520,7 +520,7 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
debugBelch("stg_ap_ppppp_info\n" );
} else if (c == (StgWord)&stg_ap_pppppp_info) {
debugBelch("stg_ap_pppppp_info\n" );
-#ifdef PROFILING
+#if defined(PROFILING)
} else if (c == (StgWord)&stg_restore_cccs_info) {
debugBelch("stg_restore_cccs_info\n" );
fprintCCS(stderr, (CostCentreStack*)sp[1]);
@@ -624,7 +624,7 @@ const char *lookupGHCName( void *addr )
/* Causing linking trouble on Win32 plats, so I'm
disabling this for now.
*/
-#ifdef USING_LIBBFD
+#if defined(USING_LIBBFD)
# define PACKAGE 1
# define PACKAGE_VERSION 1
/* Those PACKAGE_* defines are workarounds for bfd: