summaryrefslogtreecommitdiff
path: root/utils/hp2ps
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 /utils/hp2ps
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'utils/hp2ps')
-rw-r--r--utils/hp2ps/HpFile.c2
-rw-r--r--utils/hp2ps/Main.c2
-rw-r--r--utils/hp2ps/Main.h6
3 files changed, 5 insertions, 5 deletions
diff --git a/utils/hp2ps/HpFile.c b/utils/hp2ps/HpFile.c
index deef58201d..e21acf3f91 100644
--- a/utils/hp2ps/HpFile.c
+++ b/utils/hp2ps/HpFile.c
@@ -8,7 +8,7 @@
#include "HpFile.h"
#include "Utilities.h"
-#ifndef atof
+#if !defined(atof)
double atof PROTO((const char *));
#endif
diff --git a/utils/hp2ps/Main.c b/utils/hp2ps/Main.c
index 7731d4c8f0..a44e41c862 100644
--- a/utils/hp2ps/Main.c
+++ b/utils/hp2ps/Main.c
@@ -244,7 +244,7 @@ Fp(char *rootname, char **filename, char *suffix, char *mode)
return(OpenFile(*filename, mode));
}
-#ifdef DEBUG
+#if defined(DEBUG)
void
_stgAssert (filename, linenum)
char *filename;
diff --git a/utils/hp2ps/Main.h b/utils/hp2ps/Main.h
index b023d42656..1eea93f0a2 100644
--- a/utils/hp2ps/Main.h
+++ b/utils/hp2ps/Main.h
@@ -3,14 +3,14 @@
#include "ghcconfig.h"
#include <stdio.h>
-#ifdef __STDC__
+#if defined(__STDC__)
#define PROTO(x) x
#else
#define PROTO(x) ()
#endif
/* our own ASSERT macro (for C) */
-#ifndef DEBUG
+#if !defined(DEBUG)
#define ASSERT(predicate) /*nothing*/
#else
@@ -34,7 +34,7 @@ typedef int boolish;
/* Use "long long" if we have it: the numbers in profiles can easily
* overflow 32 bits after a few seconds execution.
*/
-#ifdef HAVE_LONG_LONG
+#if defined(HAVE_LONG_LONG)
typedef long long int intish;
#else
typedef long int intish;