summaryrefslogtreecommitdiff
path: root/libraries/base/cbits
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 /libraries/base/cbits
parente5b3492f23c2296d0d8221e1787ee585331f726e (diff)
downloadhaskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'libraries/base/cbits')
-rw-r--r--libraries/base/cbits/SetEnv.c4
-rw-r--r--libraries/base/cbits/iconv.c2
-rw-r--r--libraries/base/cbits/primFloat.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/libraries/base/cbits/SetEnv.c b/libraries/base/cbits/SetEnv.c
index 38f0ed52b8..7b6d2b584e 100644
--- a/libraries/base/cbits/SetEnv.c
+++ b/libraries/base/cbits/SetEnv.c
@@ -1,7 +1,7 @@
#include "HsBase.h"
-#ifdef HAVE_UNSETENV
+#if defined(HAVE_UNSETENV)
int __hsbase_unsetenv(const char *name) {
-#ifdef UNSETENV_RETURNS_VOID
+#if defined(UNSETENV_RETURNS_VOID)
unsetenv(name);
return 0;
#else
diff --git a/libraries/base/cbits/iconv.c b/libraries/base/cbits/iconv.c
index 2246ca67db..e1123a43a1 100644
--- a/libraries/base/cbits/iconv.c
+++ b/libraries/base/cbits/iconv.c
@@ -1,4 +1,4 @@
-#ifndef _WIN32
+#if !defined(_WIN32)
#include <stdlib.h>
#include <iconv.h>
diff --git a/libraries/base/cbits/primFloat.c b/libraries/base/cbits/primFloat.c
index 4bee4d0ded..f0746775d3 100644
--- a/libraries/base/cbits/primFloat.c
+++ b/libraries/base/cbits/primFloat.c
@@ -109,7 +109,7 @@ union stg_ieee754_dbl
*/
/* In case you don't support IEEE, you'll just get dummy defs.. */
-#ifdef IEEE_FLOATING_POINT
+#if defined(IEEE_FLOATING_POINT)
HsInt
isDoubleFinite(HsDouble d)