summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.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/RtsStartup.c
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r--rts/RtsStartup.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index 36a99d7a56..71a842d0a9 100644
--- a/rts/RtsStartup.c
+++ b/rts/RtsStartup.c
@@ -53,10 +53,10 @@
#include "posix/TTY.h"
#endif
-#ifdef HAVE_UNISTD_H
+#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
-#ifdef HAVE_LOCALE_H
+#if defined(HAVE_LOCALE_H)
#include <locale.h>
#endif
@@ -111,7 +111,7 @@ void _fpreset(void)
x86_init_fpu();
}
-#ifdef __GNUC__
+#if defined(__GNUC__)
void __attribute__((alias("_fpreset"))) fpreset(void);
#else
void fpreset(void) {
@@ -186,7 +186,7 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
setFullProgArgv(*argc,*argv);
setupRtsFlags(argc, *argv, rts_config);
-#ifdef DEBUG
+#if defined(DEBUG)
/* load debugging symbols for current binary */
DEBUG_LoadSymbols((*argv)[0]);
#endif /* DEBUG */
@@ -196,7 +196,7 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
initStats1();
/* initTracing must be after setupRtsFlags() */
-#ifdef TRACING
+#if defined(TRACING)
initTracing();
#endif
@@ -243,7 +243,7 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
getStablePtr((StgPtr)runSparks_closure);
getStablePtr((StgPtr)ensureIOManagerIsRunning_closure);
getStablePtr((StgPtr)ioManagerCapabilitiesChanged_closure);
-#ifndef mingw32_HOST_OS
+#if !defined(mingw32_HOST_OS)
getStablePtr((StgPtr)blockedOnBadFD_closure);
getStablePtr((StgPtr)runHandlersPtr_closure);
#endif
@@ -431,14 +431,14 @@ hs_exit_(bool wait_foreign)
endProfiling();
freeProfiling();
-#ifdef PROFILING
+#if defined(PROFILING)
// Originally, this was in report_ccs_profiling(). Now, retainer
// profiling might tack some extra stuff on to the end of this file
// during endProfiling().
if (prof_file != NULL) fclose(prof_file);
#endif
-#ifdef TRACING
+#if defined(TRACING)
endTracing();
freeTracing();
#endif
@@ -515,7 +515,7 @@ shutdownHaskellAndExit(int n, int fastExit)
stg_exit(n);
}
-#ifndef mingw32_HOST_OS
+#if !defined(mingw32_HOST_OS)
static void exitBySignal(int sig) GNUC3_ATTRIBUTE(__noreturn__);
void