s3:modules: Use #ifdef instead of #if for config.h definitions
authorAndreas Schneider <asn@samba.org>
Tue, 20 Nov 2018 14:54:28 +0000 (15:54 +0100)
committerGary Lockyer <gary@samba.org>
Wed, 28 Nov 2018 22:19:23 +0000 (23:19 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/modules/getdate.c
source3/modules/getdate.y
source3/modules/vfs_commit.c
source3/modules/vfs_zfsacl.c

index ccc9b10e6f7dfd76f754c89c08a743fe26a3bf4d..10e46789ccf9df291515609685a2108cccdb78d3 100644 (file)
 #include <ctype.h>
 #include <string.h>
 
-#if HAVE_STDLIB_H
+#ifdef HAVE_STDLIB_H
 # include <stdlib.h> /* for `free'; used by Bison 1.27 */
 #endif
 
@@ -2535,7 +2535,7 @@ get_date (const char *p, const time_t *now)
   pc.local_zones_seen = 0;
   pc.zones_seen = 0;
 
-#if HAVE_STRUCT_TM_TM_ZONE
+#ifdef HAVE_STRUCT_TM_TM_ZONE
   pc.local_time_zone_table[0].name = tmp->tm_zone;
   pc.local_time_zone_table[0].type = tLOCAL_ZONE;
   pc.local_time_zone_table[0].value = tmp->tm_isdst;
@@ -2563,7 +2563,7 @@ get_date (const char *p, const time_t *now)
       }
   }
 #else
-#if HAVE_TZNAME
+#ifdef HAVE_TZNAME
   {
 # ifndef tzname
     extern char *tzname[];
index 3ac9f26abfc32b789c6846b8c08305f4c9152d36..90b54a865cc18054ba266747c2986d540324fdd5 100644 (file)
@@ -44,7 +44,7 @@
 #include <ctype.h>
 #include <string.h>
 
-#if HAVE_STDLIB_H
+#ifdef HAVE_STDLIB_H
 # include <stdlib.h> /* for `free'; used by Bison 1.27 */
 #endif
 
@@ -911,7 +911,7 @@ get_date (const char *p, const time_t *now)
   pc.local_zones_seen = 0;
   pc.zones_seen = 0;
 
-#if HAVE_STRUCT_TM_TM_ZONE
+#ifdef HAVE_STRUCT_TM_TM_ZONE
   pc.local_time_zone_table[0].name = tmp->tm_zone;
   pc.local_time_zone_table[0].type = tLOCAL_ZONE;
   pc.local_time_zone_table[0].value = tmp->tm_isdst;
@@ -939,7 +939,7 @@ get_date (const char *p, const time_t *now)
       }
   }
 #else
-#if HAVE_TZNAME
+#ifdef HAVE_TZNAME
   {
 # ifndef tzname
     extern char *tzname[];
index a11f9e2f131a906e65f84f9ebd37d513833424c8..408c90c46a018686a51f8acfcf3bb7fa1b3d20fd 100644 (file)
@@ -86,9 +86,9 @@ static int commit_do(
                ("%s: flushing %lu dirty bytes\n",
                 MODULE, (unsigned long)c->dbytes));
 
-#if HAVE_FDATASYNC
+#if defined(HAVE_FDATASYNC)
         result = fdatasync(fd);
-#elif HAVE_FSYNC
+#elif defined(HAVE_FSYNC)
         result = fsync(fd);
 #else
        DEBUG(0, ("%s: WARNING: no commit support on this platform\n",
index 43e41f95c1aa39b3da3d4765ad1e198621605ab9..2c5d82ae207d01b1337c6fcbb8a5002ab9f53a91 100644 (file)
@@ -27,7 +27,7 @@
 #include "smbd/smbd.h"
 #include "nfs4_acls.h"
 
-#if HAVE_FREEBSD_SUNACL_H
+#ifdef HAVE_FREEBSD_SUNACL_H
 #include "sunacl.h"
 #endif