summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-12 23:29:04 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-16 15:31:18 +0200
commitc19887496e9a3d3516368aa3cd8219e48e4fdca4 (patch)
tree313c19e9c73107e267c5ba1971a55eaf915df458
parent2cf24ff923d27443581743f836e49aa81947c694 (diff)
downloadphp-git-c19887496e9a3d3516368aa3cd8219e48e4fdca4.tar.gz
Fix [-Wundef] warning in IMAP extension
-rw-r--r--ext/imap/php_imap.c46
-rw-r--r--ext/imap/php_imap.h2
2 files changed, 24 insertions, 24 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index d2c418e95a..ccdf34047d 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -409,7 +409,7 @@ PHP_MINIT_FUNCTION(imap)
#ifndef PHP_WIN32
auth_link(&auth_log); /* link in the log authenticator */
auth_link(&auth_md5); /* link in the cram-md5 authenticator */
-#if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
+#if defined(HAVE_IMAP_KRB) && defined(HAVE_IMAP_AUTH_GSS)
auth_link(&auth_gss); /* link in the gss authenticator */
#endif
auth_link(&auth_pla); /* link in the plain authenticator */
@@ -665,26 +665,26 @@ PHP_RSHUTDOWN_FUNCTION(imap)
}
/* }}} */
-#if !defined(CCLIENTVERSION)
-#if HAVE_IMAP2007e
-#define CCLIENTVERSION "2007e"
-#elif HAVE_IMAP2007d
-#define CCLIENTVERSION "2007d"
-#elif HAVE_IMAP2007b
-#define CCLIENTVERSION "2007b"
-#elif HAVE_IMAP2007a
-#define CCLIENTVERSION "2007a"
-#elif HAVE_IMAP2004
-#define CCLIENTVERSION "2004"
-#elif HAVE_IMAP2001
-#define CCLIENTVERSION "2001"
-#elif HAVE_IMAP2000
-#define CCLIENTVERSION "2000"
-#elif defined(IMAP41)
-#define CCLIENTVERSION "4.1"
-#else
-#define CCLIENTVERSION "4.0"
-#endif
+#ifndef CCLIENTVERSION
+# if defined(HAVE_IMAP2007e)
+# define CCLIENTVERSION "2007e"
+# elif defined(HAVE_IMAP2007d)
+# define CCLIENTVERSION "2007d"
+# elif defined(HAVE_IMAP2007b)
+# define CCLIENTVERSION "2007b"
+# elif defined(HAVE_IMAP2007a)
+# define CCLIENTVERSION "2007a"
+# elif defined(HAVE_IMAP2004)
+# define CCLIENTVERSION "2004"
+# elif defined(HAVE_IMAP2001)
+# define CCLIENTVERSION "2001"
+# elif defined(HAVE_IMAP2000)
+# define CCLIENTVERSION "2000"
+# elif defined(IMAP41)
+# define CCLIENTVERSION "4.1"
+# else
+# define CCLIENTVERSION "4.0"
+# endif
#endif
/* {{{ PHP_MINFO_FUNCTION
@@ -693,10 +693,10 @@ PHP_MINFO_FUNCTION(imap)
{
php_info_print_table_start();
php_info_print_table_row(2, "IMAP c-Client Version", CCLIENTVERSION);
-#if HAVE_IMAP_SSL
+#ifdef HAVE_IMAP_SSL
php_info_print_table_row(2, "SSL Support", "enabled");
#endif
-#if HAVE_IMAP_KRB && HAVE_IMAP_AUTH_GSS
+#if defined(HAVE_IMAP_KRB) && defined(HAVE_IMAP_AUTH_GSS)
php_info_print_table_row(2, "Kerberos Support", "enabled");
#endif
php_info_print_table_end();
diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h
index ae5dfe7b94..0ba2306ede 100644
--- a/ext/imap/php_imap.h
+++ b/ext/imap/php_imap.h
@@ -28,7 +28,7 @@
#ifndef PHP_IMAP_H
#define PHP_IMAP_H
-#if HAVE_IMAP
+#ifdef HAVE_IMAP
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)