ctdb: Use #ifdef instead of #if for config.h definitions
authorAndreas Schneider <asn@samba.org>
Tue, 20 Nov 2018 12:55:49 +0000 (13:55 +0100)
committerGary Lockyer <gary@samba.org>
Wed, 28 Nov 2018 22:19:21 +0000 (23:19 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
ctdb/common/system.c

index 51149edbaf5d8e16c50d544fa4bc8624f0502efc..ab1941124d7ed4c661cb8f1a163c8a3ae0636edb 100644 (file)
 #include "common/logging.h"
 #include "common/system.h"
 
-#if HAVE_SCHED_H
+#ifdef HAVE_SCHED_H
 #include <sched.h>
 #endif
 
-#if HAVE_PROCINFO_H
+#ifdef HAVE_PROCINFO_H
 #include <procinfo.h>
 #endif
 
@@ -49,7 +49,7 @@
 bool set_scheduler(void)
 {
 #ifdef _AIX_
-#if HAVE_THREAD_SETSCHED
+#ifdef HAVE_THREAD_SETSCHED
        struct thrdentry64 te;
        tid64_t ti;
 
@@ -68,7 +68,7 @@ bool set_scheduler(void)
        }
 #endif
 #else /* no AIX */
-#if HAVE_SCHED_SETSCHEDULER
+#ifdef HAVE_SCHED_SETSCHEDULER
        struct sched_param p;
 
        p.sched_priority = 1;
@@ -92,7 +92,7 @@ bool set_scheduler(void)
 void reset_scheduler(void)
 {
 #ifdef _AIX_
-#if HAVE_THREAD_SETSCHED
+#ifdef HAVE_THREAD_SETSCHED
        struct thrdentry64 te;
        tid64_t ti;
 
@@ -105,7 +105,7 @@ void reset_scheduler(void)
        }
 #endif
 #else /* no AIX */
-#if HAVE_SCHED_SETSCHEDULER
+#ifdef HAVE_SCHED_SETSCHEDULER
        struct sched_param p;
 
        p.sched_priority = 0;