From: Ilia Alshanetsky Date: Sun, 24 Sep 2006 18:06:37 +0000 (+0000) Subject: Fixed bug #38941 (imap extension does not compile against new version of X-Git-Tag: php-5.2.0RC5~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e55036a346c3bf60a79f106ce8cce2283299b5cb;p=php Fixed bug #38941 (imap extension does not compile against new version of the imap library). --- diff --git a/NEWS b/NEWS index 541bafa14d..651ba32540 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS - Fixed mess with CGI/CLI -d option (now it works with cgi; constants are working exactly like in php.ini; with FastCGI -d affects all requests). (Dmitry) +- Fixed bug #38941 (imap extension does not compile against new version of + the imap library). (Ilia) - Fixed bug #38844 (curl_easy_strerror() is defined only since cURL 7.12.0). (Tony) - Fixed bug #38623 (leaks in a tricky code with switch() and exceptions). diff --git a/ext/imap/config.m4 b/ext/imap/config.m4 index e2782e3265..bd23b22398 100644 --- a/ext/imap/config.m4 +++ b/ext/imap/config.m4 @@ -114,6 +114,11 @@ if test "$PHP_IMAP" != "no"; then AC_EGREP_HEADER(mail_fetch_overview_sequence, $IMAP_INC_DIR/mail.h, [ AC_DEFINE(HAVE_IMAP2004,1,[ ]) ]) + + dnl Check for new version of the utf8_mime2text() function + AC_EGREP_HEADER(mail_append_set, $IMAP_INC_DIR/mail.h, [ + AC_DEFINE(HAVE_NEW_MIME2TEXT,1,[ ]) + ]) dnl Check for c-client version 2001 old_CPPFLAGS=$CPPFLAGS diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index a4e7b7ae0f..05cf6c2b74 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -75,7 +75,11 @@ static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, GETS_DA void rfc822_date(char *date); char *cpystr(const char *str); char *cpytxt(SIZEDTEXT *dst, char *text, unsigned long size); +#ifndef HAVE_NEW_MIME2TEXT long utf8_mime2text(SIZEDTEXT *src, SIZEDTEXT *dst); +#else +long utf8_mime2text (SIZEDTEXT *src, SIZEDTEXT *dst, long flags); +#endif unsigned long find_rightmost_bit(unsigned long *valptr); void fs_give(void **block); void *fs_get(size_t size);