Re: pop3 patch [fixed link]
| From: | Pierre | Date: | Sat, 01 Sep 2007 09:15:23 +0000 |
| Subject: | Re: pop3 patch [fixed link] | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4859@lists.php.net to get a copy of this message | ||
As explained earlier, please post bugs/patches/issues to:
http://pecl.php.net/bugs/report.php?package=POP3
Cheers,
--Pierre
On 8/31/07, BuildSmart <buildsmart@daleenterprise.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> http://daleenterprise.com/patches/pop3.diff
>
> On Aug 31, 2007, at 11:34:42, BuildSmart wrote:
>
> > A quick fix to get pop3 working in PHP6, there might be a better
> > way but this solution seemed to work with the least amount of
> > changes, tested in 4.3.10, 4.4.0, 5.1.6, 5.2.3 and 6.0.0-dev all of
> > which worked.
> >
> > link:
> > http://daleenterprise.com/pop3.diff
> >
> > diff file:
> > diff -Naur ext/pop3.orig/pop3.c ext/pop3/pop3.c
> > - --- ext/pop3.orig/pop3.c 2006-10-11 20:23:48.000000000 -0400
> > +++ ext/pop3/pop3.c 2007-08-31 10:21:21.000000000 -0400
> > @@ -1,8 +1,8 @@
> > /*
> >
> > +---------------------------------------------------------------------
> > -+
> > - - | PHP Version
> > 4 |
> > + | PHP Version 4, 5,
> > 6 |
> >
> > +---------------------------------------------------------------------
> > -+
> > - - | Copyright (c) 1997-2004 The PHP
> > Group |
> > + | Copyright (c) 1997-2007 The PHP
> > Group |
> >
> > +---------------------------------------------------------------------
> > -+
> > | This source file is subject to version 3 of the PHP
> > license, |
> > | that is bundled with this package in the file LICENSE, and
> > is |
> > @@ -14,9 +14,10 @@
> >
> > +---------------------------------------------------------------------
> > -+
> > | Authors: Marco Tabini
> > <marcot@tabini.ca> |
> > | Ilia Alshanetsky
> > <ilia@php.net> |
> > + | Dale Walsh
> > <buildsmart@daleenterprise.com> |
> >
> > +---------------------------------------------------------------------
> > -+
> > - - $Id: pop3.c,v 1.21 2006/10/12 00:23:48 iliaa Exp $
> > + $Id: pop3.c,v 1.22 2007/08/31 09:23:48 iliaa Exp $
> > */
> > #ifdef HAVE_CONFIG_H
> > @@ -42,7 +43,7 @@
> > /* {{{ Internal macros */
> > - -#define POP3_VERSION "1.0.2"
> > +#define POP3_VERSION "1.0.3"
> > #define POP3_RESOURCE_NAME "POP3 Library Session"
> > #define POP3_FETCH_SESSION(session, session_container) \
> > @@ -100,7 +101,11 @@
> > char buffer[2048];
> > size_t fetch_len;
> > +#if PHP_MAJOR_VERSION > 4
> > + if (!php_stream_get_line(stream, ZSTR(buffer), sizeof(buffer) -
> > 1, &fetch_len)) {
> > +#else
> > if (!php_stream_get_line(stream, buffer, sizeof(buffer) - 1,
> > &fetch_len)) {
> > +#endif
> > php_error_docref(NULL TSRMLS_CC, E_ERROR, "I/O Error when
> > receiving data from the server");
> > }
> > @@ -583,7 +588,11 @@
> > do {
> > zval *row;
> > +#if PHP_MAJOR_VERSION > 4
> > + if (!php_stream_gets(stream, ZSTR(pop3_return_val), sizeof
> > (pop3_return_val) - 1)) {
> > +#else
> > if (!php_stream_gets(stream, pop3_return_val, sizeof
> > (pop3_return_val) - 1)) {
> > +#endif
> > php_error_docref(NULL TSRMLS_CC, E_WARNING, "POP3: Unable to
> > retrieve message list");
> > zval_dtor(return_value);
> > RETURN_FALSE;
> > @@ -643,7 +652,11 @@
> > do {
> > +#if PHP_MAJOR_VERSION > 4
> > + if (!php_stream_gets(stream, ZSTR(pop3_return_val), sizeof
> > (pop3_return_val) - 1)) {
> > +#else
> > if (!php_stream_gets(stream, pop3_return_val, sizeof
> > (pop3_return_val) - 1)) {
> > +#endif
> > php_error_docref(NULL TSRMLS_CC, E_WARNING, "POP3: Unable to
> > retrieve message list");
> > zval_dtor(return_value);
> > RETURN_FALSE;
> > @@ -758,7 +771,11 @@
> > length = 0;
> > do {
> > +#if PHP_MAJOR_VERSION > 4
> > + if (!php_stream_get_line(stream, ZSTR(pop3_return_val), sizeof
> > (pop3_return_val) - 1, &fetch_len)) {
> > +#else
> > if (!php_stream_get_line(stream, pop3_return_val, sizeof
> > (pop3_return_val) - 1, &fetch_len)) {
> > +#endif
> > efree(result);
> > php_error_docref(NULL TSRMLS_CC, E_WARNING, "POP3: I/O failure
> > reading from server");
> > RETURN_FALSE;
>
> - -- BuildSmart
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (Darwin)
>
> iD8DBQFG2Dlz0hzWbkf0eKgRAmvvAKCRTbgywAUtJuSlyuVYyc88N/TmrQCgkMm7
> N58gjp9I4DzD8uU0yAEpw4E=
> =vkbA
> -----END PGP SIGNATURE-----
>
> --
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>