replace: Use #ifdef instead of #if for config.h definitions
authorAndreas Schneider <asn@samba.org>
Tue, 20 Nov 2018 12:57:48 +0000 (13:57 +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>
lib/replace/getifaddrs.c
lib/replace/system/dir.h
lib/replace/system/filesys.h
lib/replace/system/gssapi.h
lib/replace/system/kerberos.h

index 9e377e5edc05429f5fb4eb4060fcf7ebb61ce92e..a55ef7e30feeb1e73f1b0d9730e12408729b1eee 100644 (file)
@@ -73,7 +73,7 @@ static struct sockaddr *sockaddr_dup(struct sockaddr *sa)
 }
 #endif
 
-#if HAVE_IFACE_IFCONF
+#ifdef HAVE_IFACE_IFCONF
 
 /* this works for Linux 2.2, Solaris 2.5, SunOS4, HPUX 10.20, OSF1
    V4.0, Ultrix 4.4, SCO Unix 3.2, IRIX 6.4 and FreeBSD 3.2.
index 0955b193958bc243def9fef5d092421f3ef8d31c..497b5a7c0fabaf2d2a5277d565e88ae29754ff4b 100644 (file)
@@ -25,7 +25,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#if HAVE_DIRENT_H
+#ifdef HAVE_DIRENT_H
 # include <dirent.h>
 # define NAMLEN(dirent) strlen((dirent)->d_name)
 #else
@@ -46,7 +46,7 @@
 #define mkdir(dir, mode) mkdir(dir)
 #endif
 
-#if HAVE_LIBGEN_H
+#ifdef HAVE_LIBGEN_H
 # include <libgen.h>
 #endif
 
index faa94c73f2662ef2ff939ae2d7c7ab2ccb5f38ff..b9ce41a4b38bbf75086e4464077d4cd1a7af322b 100644 (file)
 #define VXFS_QUOTA
 #endif
 
-#if HAVE_SYS_ATTRIBUTES_H
+#if defined(HAVE_SYS_ATTRIBUTES_H)
 #include <sys/attributes.h>
-#elif HAVE_ATTR_ATTRIBUTES_H
+#elif defined(HAVE_ATTR_ATTRIBUTES_H)
 #include <attr/attributes.h>
 #endif
 
 /* mutually exclusive (SuSE 8.2) */
-#if HAVE_ATTR_XATTR_H
+#if defined(HAVE_ATTR_XATTR_H)
 #include <attr/xattr.h>
-#elif HAVE_SYS_XATTR_H
+#elif defined(HAVE_SYS_XATTR_H)
 #include <sys/xattr.h>
 #endif
 
index 6386c7b21a3ec73e4645177c2014ae6461a7e6bb..9e68dcc1c8874d23959ebb09cd73863ba4ce617d 100644 (file)
 #include <gssapi.h>
 #endif
 
-#if HAVE_GSSAPI_GSSAPI_KRB5_H
+#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
 #include <gssapi/gssapi_krb5.h>
 #endif
 
-#if HAVE_GSSAPI_GSSAPI_SPNEGO_H
+#ifdef HAVE_GSSAPI_GSSAPI_SPNEGO_H
 #include <gssapi/gssapi_spnego.h>
 #elif HAVE_GSSAPI_SPNEGO_H
 #include <gssapi_spnego.h>
index 636ce0f2e0bff273b332f3704abf7501854845e6..ebd8657e6121fb67d76e8bf0681fdbecafab9707 100644 (file)
 
 #ifdef HAVE_KRB5
 
-#if HAVE_KRB5_H
+#ifdef HAVE_KRB5_H
 #include <krb5.h>
 #endif
 
-#if HAVE_COM_ERR_H
+#ifdef HAVE_COM_ERR_H
 #include <com_err.h>
 #endif