Skip to content

Commit ed23794

Browse files
committed
Fix [-Wundef] warning in IMAP extension
1 parent 1be64b3 commit ed23794

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

ext/imap/php_imap.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ PHP_MINIT_FUNCTION(imap)
409409
#ifndef PHP_WIN32
410410
auth_link(&auth_log); /* link in the log authenticator */
411411
auth_link(&auth_md5); /* link in the cram-md5 authenticator */
412-
#if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
412+
#if defined(HAVE_IMAP_KRB) && defined(HAVE_IMAP_AUTH_GSS)
413413
auth_link(&auth_gss); /* link in the gss authenticator */
414414
#endif
415415
auth_link(&auth_pla); /* link in the plain authenticator */
@@ -665,26 +665,26 @@ PHP_RSHUTDOWN_FUNCTION(imap)
665665
}
666666
/* }}} */
667667

668-
#if !defined(CCLIENTVERSION)
669-
#if HAVE_IMAP2007e
670-
#define CCLIENTVERSION "2007e"
671-
#elif HAVE_IMAP2007d
672-
#define CCLIENTVERSION "2007d"
673-
#elif HAVE_IMAP2007b
674-
#define CCLIENTVERSION "2007b"
675-
#elif HAVE_IMAP2007a
676-
#define CCLIENTVERSION "2007a"
677-
#elif HAVE_IMAP2004
678-
#define CCLIENTVERSION "2004"
679-
#elif HAVE_IMAP2001
680-
#define CCLIENTVERSION "2001"
681-
#elif HAVE_IMAP2000
682-
#define CCLIENTVERSION "2000"
683-
#elif defined(IMAP41)
684-
#define CCLIENTVERSION "4.1"
685-
#else
686-
#define CCLIENTVERSION "4.0"
687-
#endif
668+
#ifndef CCLIENTVERSION
669+
# if defined(HAVE_IMAP2007e)
670+
# define CCLIENTVERSION "2007e"
671+
# elif defined(HAVE_IMAP2007d)
672+
# define CCLIENTVERSION "2007d"
673+
# elif defined(HAVE_IMAP2007b)
674+
# define CCLIENTVERSION "2007b"
675+
# elif defined(HAVE_IMAP2007a)
676+
# define CCLIENTVERSION "2007a"
677+
# elif defined(HAVE_IMAP2004)
678+
# define CCLIENTVERSION "2004"
679+
# elif defined(HAVE_IMAP2001)
680+
# define CCLIENTVERSION "2001"
681+
# elif defined(HAVE_IMAP2000)
682+
# define CCLIENTVERSION "2000"
683+
# elif defined(IMAP41)
684+
# define CCLIENTVERSION "4.1"
685+
# else
686+
# define CCLIENTVERSION "4.0"
687+
# endif
688688
#endif
689689

690690
/* {{{ PHP_MINFO_FUNCTION
@@ -693,10 +693,10 @@ PHP_MINFO_FUNCTION(imap)
693693
{
694694
php_info_print_table_start();
695695
php_info_print_table_row(2, "IMAP c-Client Version", CCLIENTVERSION);
696-
#if HAVE_IMAP_SSL
696+
#ifdef HAVE_IMAP_SSL
697697
php_info_print_table_row(2, "SSL Support", "enabled");
698698
#endif
699-
#if HAVE_IMAP_KRB && HAVE_IMAP_AUTH_GSS
699+
#if defined(HAVE_IMAP_KRB) && defined(HAVE_IMAP_AUTH_GSS)
700700
php_info_print_table_row(2, "Kerberos Support", "enabled");
701701
#endif
702702
php_info_print_table_end();

ext/imap/php_imap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#ifndef PHP_IMAP_H
2929
#define PHP_IMAP_H
3030

31-
#if HAVE_IMAP
31+
#ifdef HAVE_IMAP
3232

3333
#if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
3434

0 commit comments

Comments
 (0)