diff options
| author | Ben Gamari <ben@smart-cactus.org> | 2017-04-21 09:16:48 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-28 22:35:04 -0400 |
| commit | 945c45ad50ed31e3acb96fdaafb21640c4669f12 (patch) | |
| tree | ae2e59ba8d3a49bbd3c3dcece39d53aef691ed44 /rts/posix/itimer/Pthread.c | |
| parent | e5b3492f23c2296d0d8221e1787ee585331f726e (diff) | |
| download | haskell-945c45ad50ed31e3acb96fdaafb21640c4669f12.tar.gz | |
Prefer #if defined to #ifdef
Our new CPP linter enforces this.
Diffstat (limited to 'rts/posix/itimer/Pthread.c')
| -rw-r--r-- | rts/posix/itimer/Pthread.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index 5c708ecf4d..a4f55527dd 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -44,18 +44,18 @@ #include "posix/Clock.h" /* As recommended in the autoconf manual */ -# ifdef TIME_WITH_SYS_TIME +# if defined(TIME_WITH_SYS_TIME) # include <sys/time.h> # include <time.h> # else -# ifdef HAVE_SYS_TIME_H +# if defined(HAVE_SYS_TIME_H) # include <sys/time.h> # else # include <time.h> # endif # endif -#ifdef HAVE_SIGNAL_H +#if defined(HAVE_SIGNAL_H) # include <signal.h> #endif @@ -65,7 +65,7 @@ #include <unistd.h> #include <fcntl.h> -#ifdef HAVE_SYS_TIMERFD_H +#if defined(HAVE_SYS_TIMERFD_H) #include <sys/timerfd.h> #define USE_TIMERFD_FOR_ITIMER 1 #else @@ -76,7 +76,7 @@ * TFD_CLOEXEC has been added in Linux 2.6.26. * If it is not available, we use fcntl(F_SETFD). */ -#ifndef TFD_CLOEXEC +#if !defined(TFD_CLOEXEC) #define TFD_CLOEXEC 0 #endif @@ -169,7 +169,7 @@ initTicker (Time interval, TickProc handle_tick) * to the thread we create so we can later join to it if requested */ if (! pthread_create(&thread, NULL, itimer_thread_func, (void*)handle_tick)) { -#ifdef HAVE_PTHREAD_SETNAME_NP +#if defined(HAVE_PTHREAD_SETNAME_NP) pthread_setname_np(thread, "ghc_ticker"); #endif } else { |
