|
|
@@ -0,0 +1,355 @@
|
|
|
+Index: ext/pdf/pdf.c
|
|
|
+--- ext/pdf/pdf.c.orig 2004-09-13 19:12:13 +0200
|
|
|
++++ ext/pdf/pdf.c 2005-04-01 07:52:31 +0200
|
|
|
+@@ -240,6 +240,16 @@
|
|
|
+ ZEND_GET_MODULE(pdf)
|
|
|
+ #endif
|
|
|
+
|
|
|
++ZEND_BEGIN_MODULE_GLOBALS(pdf)
|
|
|
++FILE *fp;
|
|
|
++ZEND_END_MODULE_GLOBALS(pdf)
|
|
|
++ZEND_DECLARE_MODULE_GLOBALS(pdf)
|
|
|
++#ifdef ZTS
|
|
|
++#define PDF_G(v) TSRMG(pdf_globals_id, zend_pdf_globals *, v)
|
|
|
++#else
|
|
|
++#define PDF_G(v) (pdf_globals.v)
|
|
|
++#endif
|
|
|
++
|
|
|
+ /* {{{ _free_pdf_doc
|
|
|
+ */
|
|
|
+ static void _free_pdf_doc(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
|
|
+@@ -305,6 +315,15 @@
|
|
|
+ }
|
|
|
+ /* }}} */
|
|
|
+
|
|
|
++/* {{{ pdf_flushwrite_fp
|
|
|
++ */
|
|
|
++static size_t pdf_flushwrite_fp(PDF *p, void *data, size_t size)
|
|
|
++{
|
|
|
++ FILE *fp = PDF_G(fp);
|
|
|
++ return fwrite(data, size, 1, fp);
|
|
|
++}
|
|
|
++/* }}} */
|
|
|
++
|
|
|
+ /* {{{ pdf_flushwrite
|
|
|
+ */
|
|
|
+ static size_t pdf_flushwrite(PDF *p, void *data, size_t size)
|
|
|
+@@ -339,8 +358,13 @@
|
|
|
+
|
|
|
+ /* {{{ PHP_MINIT_FUNCTION
|
|
|
+ */
|
|
|
++static void php_pdf_init_globals (zend_pdf_globals *g)
|
|
|
++{
|
|
|
++ g->fp = NULL;
|
|
|
++}
|
|
|
+ PHP_MINIT_FUNCTION(pdf)
|
|
|
+ {
|
|
|
++ ZEND_INIT_MODULE_GLOBALS(pdf, php_pdf_init_globals, NULL);
|
|
|
+ if ((PDF_get_majorversion() != PDFLIB_MAJORVERSION) ||
|
|
|
+ (PDF_get_minorversion() != PDFLIB_MINORVERSION)) {
|
|
|
+ php_error(E_ERROR,"PDFlib error: Version mismatch in wrapper code");
|
|
|
+@@ -469,9 +493,8 @@
|
|
|
+ pdf = PDF_new2(custom_errorhandler, pdf_emalloc, pdf_realloc, pdf_efree, NULL);
|
|
|
+
|
|
|
+ if(fp) {
|
|
|
+- if (PDF_open_fp(pdf, fp) < 0) {
|
|
|
+- RETURN_FALSE;
|
|
|
+- }
|
|
|
++ PDF_G(fp) = fp;
|
|
|
++ PDF_begin_document_callback(pdf, pdf_flushwrite_fp, "");
|
|
|
+ } else {
|
|
|
+ PDF_open_mem(pdf, pdf_flushwrite);
|
|
|
+ }
|
|
|
+
|
|
|
+________________________________________________________________________
|
|
|
+
|
|
|
+Fix build against recent IMAP c-client versions, should be fixed in
|
|
|
+upcoming 4.4.5 release
|
|
|
+-> http://bugs.php.net/bug.php?id=39401
|
|
|
+-> http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.142.2.44.2.10&r2=1.142.2.44.2.11
|
|
|
+-> http://cvs.php.net/viewvc.cgi/php-src/ext/imap/config.m4?r1=1.49.2.15&r2=1.49.2.15.2.1
|
|
|
+
|
|
|
+Index: ext/imap/php_imap.c
|
|
|
+--- ext/imap/php_imap.c.orig Fri Aug 11 17:07:00 2006
|
|
|
++++ ext/imap/php_imap.c Tue Feb 6 15:55:03 2007
|
|
|
+@@ -74,7 +74,11 @@
|
|
|
+ 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);
|
|
|
+@@ -2064,7 +2068,11 @@
|
|
|
+ dest.size = 0;
|
|
|
+
|
|
|
+ cpytxt(&src, Z_STRVAL_PP(str), Z_STRLEN_PP(str));
|
|
|
++#ifndef HAVE_NEW_MIME2TEXT
|
|
|
+ utf8_mime2text(&src, &dest);
|
|
|
++#else
|
|
|
++ utf8_mime2text(&src, &dest, U8T_CANONICAL);
|
|
|
++#endif
|
|
|
+ RETURN_STRINGL(dest.data, strlen(dest.data), 1);
|
|
|
+ }
|
|
|
+ /* }}} */
|
|
|
+
|
|
|
+Index: ext/imap/config.m4
|
|
|
+--- ext/imap/config.m4.orig 2005/01/11 04:56:57 1.49.2.15
|
|
|
++++ ext/imap/config.m4 2007/01/29 10:08:17 1.49.2.15.2.1
|
|
|
+@@ -126,6 +126,49 @@
|
|
|
+ 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
|
|
|
++ old_CFLAGS=$CFLAGS
|
|
|
++ CFLAGS="-I$IMAP_INC_DIR"
|
|
|
++ AC_CACHE_CHECK(for utf8_mime2text signature, ac_cv_utf8_mime2text,
|
|
|
++ AC_TRY_COMPILE([
|
|
|
++#include <stdio.h>
|
|
|
++#include <c-client.h>
|
|
|
++ ],[
|
|
|
++ SIZEDTEXT *src, *dst;
|
|
|
++ utf8_mime2text(src, dst);
|
|
|
++ ],[
|
|
|
++ ac_cv_utf8_mime2text=old
|
|
|
++ ],[
|
|
|
++ ac_cv_utf8_mime2text=new
|
|
|
++ ])
|
|
|
++ )
|
|
|
++ if test "$ac_cv_utf8_mime2text" = "new"; then
|
|
|
++ AC_DEFINE(HAVE_NEW_MIME2TEXT, 1, [Whether utf8_mime2text() has new signature])
|
|
|
++ fi
|
|
|
++ CFLAGS=$old_CPPFLAGS
|
|
|
++
|
|
|
++ old_CFLAGS=$CFLAGS
|
|
|
++ CFLAGS="-I$IMAP_INC_DIR"
|
|
|
++ AC_CACHE_CHECK(for U8T_CANONICAL, ac_cv_u8t_canonical,
|
|
|
++ AC_TRY_COMPILE([
|
|
|
++#include <c-client.h>
|
|
|
++ ],[
|
|
|
++ int i = U8T_CANONICAL;
|
|
|
++ ],[
|
|
|
++ ac_cv_u8t_canonical=yes
|
|
|
++ ],[
|
|
|
++ ac_cv_u8t_canonical=no
|
|
|
++ ])
|
|
|
++ )
|
|
|
++ CFLAGS=$old_CPPFLAGS
|
|
|
++
|
|
|
++ if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then
|
|
|
++ AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.])
|
|
|
++ fi
|
|
|
++ if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then
|
|
|
++ AC_MSG_ERROR([utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information.])
|
|
|
++ fi
|
|
|
+
|
|
|
+ dnl Check for c-client version 2001
|
|
|
+ old_CPPFLAGS=$CPPFLAGS
|
|
|
+Index: configure
|
|
|
+--- configure.orig Tue Aug 15 14:01:18 2006
|
|
|
++++ configure Tue Feb 6 15:34:40 2007
|
|
|
+@@ -58193,6 +58193,158 @@
|
|
|
+ rm -f conftest*
|
|
|
+
|
|
|
+
|
|
|
++ old_CFLAGS=$CFLAGS
|
|
|
++ CFLAGS="-I$IMAP_INC_DIR"
|
|
|
++ echo "$as_me:$LINENO: checking for utf8_mime2text signature" >&5
|
|
|
++echo $ECHO_N "checking for utf8_mime2text signature... $ECHO_C" >&6
|
|
|
++if test "${ac_cv_utf8_mime2text+set}" = set; then
|
|
|
++ echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
|
++else
|
|
|
++ cat >conftest.$ac_ext <<_ACEOF
|
|
|
++/* confdefs.h. */
|
|
|
++_ACEOF
|
|
|
++cat confdefs.h >>conftest.$ac_ext
|
|
|
++cat >>conftest.$ac_ext <<_ACEOF
|
|
|
++/* end confdefs.h. */
|
|
|
++
|
|
|
++#include <stdio.h>
|
|
|
++#include <c-client.h>
|
|
|
++
|
|
|
++int
|
|
|
++main ()
|
|
|
++{
|
|
|
++
|
|
|
++ SIZEDTEXT *src, *dst;
|
|
|
++ utf8_mime2text(src, dst);
|
|
|
++
|
|
|
++ ;
|
|
|
++ return 0;
|
|
|
++}
|
|
|
++_ACEOF
|
|
|
++rm -f conftest.$ac_objext
|
|
|
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
|
++ (eval $ac_compile) 2>conftest.er1
|
|
|
++ ac_status=$?
|
|
|
++ grep -v '^ *+' conftest.er1 >conftest.err
|
|
|
++ rm -f conftest.er1
|
|
|
++ cat conftest.err >&5
|
|
|
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
++ (exit $ac_status); } &&
|
|
|
++ { ac_try='test -z "$ac_c_werror_flag"
|
|
|
++ || test ! -s conftest.err'
|
|
|
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
|
++ (eval $ac_try) 2>&5
|
|
|
++ ac_status=$?
|
|
|
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
++ (exit $ac_status); }; } &&
|
|
|
++ { ac_try='test -s conftest.$ac_objext'
|
|
|
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
|
++ (eval $ac_try) 2>&5
|
|
|
++ ac_status=$?
|
|
|
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
++ (exit $ac_status); }; }; then
|
|
|
++
|
|
|
++ ac_cv_utf8_mime2text=old
|
|
|
++
|
|
|
++else
|
|
|
++ echo "$as_me: failed program was:" >&5
|
|
|
++sed 's/^/| /' conftest.$ac_ext >&5
|
|
|
++
|
|
|
++
|
|
|
++ ac_cv_utf8_mime2text=new
|
|
|
++
|
|
|
++fi
|
|
|
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
++
|
|
|
++fi
|
|
|
++echo "$as_me:$LINENO: result: $ac_cv_utf8_mime2text" >&5
|
|
|
++echo "${ECHO_T}$ac_cv_utf8_mime2text" >&6
|
|
|
++ if test "$ac_cv_utf8_mime2text" = "new"; then
|
|
|
++
|
|
|
++cat >>confdefs.h <<\_ACEOF
|
|
|
++#define HAVE_NEW_MIME2TEXT 1
|
|
|
++_ACEOF
|
|
|
++
|
|
|
++ fi
|
|
|
++ CFLAGS=$old_CPPFLAGS
|
|
|
++
|
|
|
++ old_CFLAGS=$CFLAGS
|
|
|
++ CFLAGS="-I$IMAP_INC_DIR"
|
|
|
++ echo "$as_me:$LINENO: checking for U8T_CANONICAL" >&5
|
|
|
++echo $ECHO_N "checking for U8T_CANONICAL... $ECHO_C" >&6
|
|
|
++if test "${ac_cv_u8t_canonical+set}" = set; then
|
|
|
++ echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
|
++else
|
|
|
++ cat >conftest.$ac_ext <<_ACEOF
|
|
|
++/* confdefs.h. */
|
|
|
++_ACEOF
|
|
|
++cat confdefs.h >>conftest.$ac_ext
|
|
|
++cat >>conftest.$ac_ext <<_ACEOF
|
|
|
++/* end confdefs.h. */
|
|
|
++
|
|
|
++#include <c-client.h>
|
|
|
++
|
|
|
++int
|
|
|
++main ()
|
|
|
++{
|
|
|
++
|
|
|
++ int i = U8T_CANONICAL;
|
|
|
++
|
|
|
++ ;
|
|
|
++ return 0;
|
|
|
++}
|
|
|
++_ACEOF
|
|
|
++rm -f conftest.$ac_objext
|
|
|
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
|
++ (eval $ac_compile) 2>conftest.er1
|
|
|
++ ac_status=$?
|
|
|
++ grep -v '^ *+' conftest.er1 >conftest.err
|
|
|
++ rm -f conftest.er1
|
|
|
++ cat conftest.err >&5
|
|
|
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
++ (exit $ac_status); } &&
|
|
|
++ { ac_try='test -z "$ac_c_werror_flag"
|
|
|
++ || test ! -s conftest.err'
|
|
|
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
|
++ (eval $ac_try) 2>&5
|
|
|
++ ac_status=$?
|
|
|
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
++ (exit $ac_status); }; } &&
|
|
|
++ { ac_try='test -s conftest.$ac_objext'
|
|
|
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
|
++ (eval $ac_try) 2>&5
|
|
|
++ ac_status=$?
|
|
|
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
++ (exit $ac_status); }; }; then
|
|
|
++
|
|
|
++ ac_cv_u8t_canonical=yes
|
|
|
++
|
|
|
++else
|
|
|
++ echo "$as_me: failed program was:" >&5
|
|
|
++sed 's/^/| /' conftest.$ac_ext >&5
|
|
|
++
|
|
|
++
|
|
|
++ ac_cv_u8t_canonical=no
|
|
|
++
|
|
|
++fi
|
|
|
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
++
|
|
|
++fi
|
|
|
++echo "$as_me:$LINENO: result: $ac_cv_u8t_canonical" >&5
|
|
|
++echo "${ECHO_T}$ac_cv_u8t_canonical" >&6
|
|
|
++ CFLAGS=$old_CPPFLAGS
|
|
|
++
|
|
|
++ if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then
|
|
|
++ { { echo "$as_me:$LINENO: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." >&5
|
|
|
++echo "$as_me: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." >&2;}
|
|
|
++ { (exit 1); exit 1; }; }
|
|
|
++ fi
|
|
|
++ if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then
|
|
|
++ { { echo "$as_me:$LINENO: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." >&5
|
|
|
++echo "$as_me: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." >&2;}
|
|
|
++ { (exit 1); exit 1; }; }
|
|
|
++ fi
|
|
|
++
|
|
|
+ old_CPPFLAGS=$CPPFLAGS
|
|
|
+ CPPFLAGS=-I$IMAP_INC_DIR
|
|
|
+ cat >conftest.$ac_ext <<_ACEOF
|
|
|
+Index: main/php_config.h.in
|
|
|
+--- main/php_config.h.in.orig Tue Aug 15 14:01:21 2006
|
|
|
++++ main/php_config.h.in Tue Feb 6 17:02:00 2007
|
|
|
+@@ -1748,6 +1748,9 @@
|
|
|
+ /* */
|
|
|
+ #undef HAVE_IMAP2001
|
|
|
+
|
|
|
++/* Whether utf8_mime2text() has new signature */
|
|
|
++#undef HAVE_NEW_MIME2TEXT
|
|
|
++
|
|
|
+ /* */
|
|
|
+ #undef HAVE_LIBPAM
|
|
|
+
|
|
|
+________________________________________________________________________
|
|
|
+
|
|
|
+Allow building against cURL 7.16.0 and higher
|
|
|
+-> http://cvs.php.net/viewvc.cgi/php-src/ext/curl/curl.c?hideattic=0&r1=1.124.2.30.2.13&r2=1.124.2.30.2.14
|
|
|
+
|
|
|
+Index: ext/curl/curl.c
|
|
|
+--- ext/curl/curl.c.orig Thu Aug 10 19:27:11 2006
|
|
|
++++ ext/curl/curl.c Tue Feb 6 17:28:02 2007
|
|
|
+@@ -258,7 +258,9 @@
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND);
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_NETRC);
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
|
|
|
++#if CURLOPT_FTPASCII != 0
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
|
|
|
++#endif
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_PUT);
|
|
|
+ #if CURLOPT_MUTE != 0
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
|
|
|
+@@ -296,7 +298,9 @@
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
|
|
|
++#if CURLOPT_PASSWDFUNCTION != 0
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
|
|
|
++#endif
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS);
|
|
|
+ REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS);
|