jani Tue May 5 01:22:31 2009 UTC Modified files: /php-src/ext/imap config.m4 php_imap.c php_imap.h Log: - Fix build (modified utf7 stuff is rather new..) http://cvs.php.net/viewvc.cgi/php-src/ext/imap/config.m4?r1=1.79&r2=1.80&diff_format=u Index: php-src/ext/imap/config.m4 diff -u php-src/ext/imap/config.m4:1.79 php-src/ext/imap/config.m4:1.80 --- php-src/ext/imap/config.m4:1.79 Sat Apr 4 16:58:39 2009 +++ php-src/ext/imap/config.m4 Tue May 5 01:22:31 2009 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.79 2009/04/04 16:58:39 sean Exp $ +dnl $Id: config.m4,v 1.80 2009/05/05 01:22:31 jani Exp $ dnl AC_DEFUN([IMAP_INC_CHK],[if test -r "$i$1/c-client.h"; then @@ -228,13 +228,10 @@ AC_DEFINE(HAVE_IMAP_AUTH_GSS, 1, [ ]) ], [], $TST_LIBS) - AC_MSG_CHECKING(whether build with IMAP works) - PHP_IMAP_TEST_BUILD(mail_newbody, [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - AC_MSG_ERROR([build test failed. Please check the config.log for details.]) - ], $TST_LIBS) + dnl Check if utf8_to_mutf7 exists + PHP_IMAP_TEST_BUILD(utf8_to_mutf7, [ + AC_DEFINE(HAVE_IMAP_MUTF7, 1, [ ]) + ], [], $TST_LIBS) AC_MSG_CHECKING(whether rfc822_output_address_list function present) PHP_TEST_BUILD(foobar, [ @@ -271,4 +268,11 @@ char foobar () {f = rfc822_output_address_list;} ]) + AC_MSG_CHECKING(whether build with IMAP works) + PHP_IMAP_TEST_BUILD(mail_newbody, [ + AC_MSG_RESULT(yes) + ], [ + AC_MSG_RESULT(no) + AC_MSG_ERROR([build test failed. Please check the config.log for details.]) + ], $TST_LIBS) fi http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.286&r2=1.287&diff_format=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.286 php-src/ext/imap/php_imap.c:1.287 --- php-src/ext/imap/php_imap.c:1.286 Sat May 2 17:32:35 2009 +++ php-src/ext/imap/php_imap.c Tue May 5 01:22:31 2009 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <z...@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.286 2009/05/02 17:32:35 pajoye Exp $ */ +/* $Id: php_imap.c,v 1.287 2009/05/05 01:22:31 jani Exp $ */ #define IMAP41 @@ -351,6 +351,7 @@ ZEND_ARG_INFO(0, buf) ZEND_END_ARG_INFO() +#ifdef HAVE_IMAP_MUTF7 ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_utf8_to_mutf7, 0, 0, 1) ZEND_ARG_INFO(0, in) ZEND_END_ARG_INFO() @@ -358,6 +359,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_mutf7_to_utf8, 0, 0, 1) ZEND_ARG_INFO(0, in) ZEND_END_ARG_INFO() +#endif ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setflag_full, 0, 0, 3) ZEND_ARG_INFO(0, stream_id) @@ -517,8 +519,10 @@ PHP_FE(imap_search, arginfo_imap_search) PHP_FE(imap_utf7_decode, arginfo_imap_utf7_decode) PHP_FE(imap_utf7_encode, arginfo_imap_utf7_encode) +#ifdef HAVE_IMAP_MUTF7 PHP_FE(imap_utf8_to_mutf7, arginfo_imap_utf8_to_mutf7) PHP_FE(imap_mutf7_to_utf8, arginfo_imap_mutf7_to_utf8) +#endif PHP_FE(imap_mime_header_decode, arginfo_imap_mime_header_decode) PHP_FE(imap_thread, arginfo_imap_thread) PHP_FE(imap_timeout, arginfo_imap_timeout) @@ -2338,7 +2342,7 @@ IMAPG(gets_stream) = writer; mail_parameters(NIL, SET_GETS, (void *) php_mail_gets); mail_fetchbody_full(imap_ptr->imap_stream, msgno, section, NULL, flags); - mail_parameters(NIL, SET_GETS, (void *) NIL); + mail_parameters(NIL, SET_GETS, (void *) NULL); IMAPG(gets_stream) = NULL; if (close_stream) { @@ -2891,6 +2895,7 @@ #undef B64 #undef UNB64 +#ifdef HAVE_IMAP_MUTF7 static void php_imap_mutf7(INTERNAL_FUNCTION_PARAMETERS, int mode) { char *in; @@ -2937,6 +2942,7 @@ { php_imap_mutf7(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } +#endif /* {{{ proto string imap_mutf7_to_utf8(string in) Decode a modified UTF-7 string to UTF-8 */ http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.h?r1=1.40&r2=1.41&diff_format=u Index: php-src/ext/imap/php_imap.h diff -u php-src/ext/imap/php_imap.h:1.40 php-src/ext/imap/php_imap.h:1.41 --- php-src/ext/imap/php_imap.h:1.40 Sat May 2 17:32:35 2009 +++ php-src/ext/imap/php_imap.h Tue May 5 01:22:31 2009 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_imap.h,v 1.40 2009/05/02 17:32:35 pajoye Exp $ */ +/* $Id: php_imap.h,v 1.41 2009/05/05 01:22:31 jani Exp $ */ #ifndef PHP_IMAP_H #define PHP_IMAP_H @@ -165,8 +165,10 @@ PHP_FUNCTION(imap_utf8); PHP_FUNCTION(imap_utf7_decode); PHP_FUNCTION(imap_utf7_encode); +#ifdef HAVE_IMAP_MUTF7 PHP_FUNCTION(imap_utf8_to_mutf7); PHP_FUNCTION(imap_mutf7_to_utf8); +#endif PHP_FUNCTION(imap_mime_header_decode); PHP_FUNCTION(imap_thread); PHP_FUNCTION(imap_timeout);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php