summaryrefslogtreecommitdiff
path: root/rts/RtsUtils.c
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-10-23 08:30:19 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2017-03-04 17:16:12 +1100
commit8bc809b7d3bc416d63eba96013553498c95ecc6f (patch)
tree685963d18a1e9eed2d8ee98484646b192435a8f8 /rts/RtsUtils.c
parent96f5656d2ae885fa4b0227c4650b1c375e16dd00 (diff)
downloadhaskell-wip/erikd/rts.tar.gz
Enable new warning for bad CPP #if usagewip/erikd/rts
The C code in the RTS now gets built with `-Wundef` and the Haskell code (stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever `#if` is used on undefined identifiers.
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r--rts/RtsUtils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index 31dc060244..51453fd6fd 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -22,7 +22,7 @@
/* HACK: On Mac OS X 10.4 (at least), time.h doesn't declare ctime_r with
* _POSIX_C_SOURCE. If this is the case, we declare it ourselves.
*/
-#if HAVE_CTIME_R && !HAVE_DECL_CTIME_R
+#if defined HAVE_CTIME_R && !HAVE_DECL_CTIME_R
extern char *ctime_r(const time_t *, char *);
#endif
@@ -171,7 +171,7 @@ time_str(void)
if (now == 0) {
time(&now);
-#if HAVE_CTIME_R
+#if defined HAVE_CTIME_R
ctime_r(&now, nowstr);
#else
strcpy(nowstr, ctime(&now));