Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message"Wez Furlong" <[EMAIL PROTECTED]> wrote: > wez Wed Jan 1 04:58:17 2003 EDT > > Modified files: > /php4 acinclude.m4 configure.in > /php4/mainstreams.c > Log: > Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for > files fopen()ed with that mode. This breaks the build when cross compiling. Please could you add a default option to AC_TRY_RUN Cheers Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / Makefile.global
derick Thu Jan 2 08:01:34 2003 EDT Modified files: /php4 Makefile.global Log: - Fix "make test" when CC was set to something with a parameter Index: php4/Makefile.global diff -u php4/Makefile.global:1.41 php4/Makefile.global:1.42 --- php4/Makefile.global:1.41 Mon Dec 9 10:32:17 2002 +++ php4/Makefile.globalThu Jan 2 08:01:33 2003 @@ -49,7 +49,7 @@ test: $(SAPI_CLI_PATH) @TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ -CC=$(CC) \ +CC="$(CC)" \ $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS) clean: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / Makefile.global
derick Thu Jan 2 08:01:53 2003 EDT Modified files: (Branch: PHP_4_3) /php4 Makefile.global Log: - MFH: Fix "make test" when CC was set to something with a parameter Index: php4/Makefile.global diff -u php4/Makefile.global:1.40 php4/Makefile.global:1.40.2.1 --- php4/Makefile.global:1.40 Tue Nov 12 12:40:38 2002 +++ php4/Makefile.globalThu Jan 2 08:01:53 2003 @@ -49,7 +49,7 @@ test: $(SAPI_CLI_PATH) @TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ TEST_PHP_SRCDIR=$(top_srcdir) \ -CC=$(CC) \ +"CC=$(CC)" \ $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS) clean: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main php_streams.h
derick Thu Jan 2 08:31:10 2003 EDT
Modified files:
/php4/main php_streams.h
Log:
- Fix warnings on UnixWare
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.63 php4/main/php_streams.h:1.64
--- php4/main/php_streams.h:1.63Tue Dec 31 10:58:54 2002
+++ php4/main/php_streams.h Thu Jan 2 08:31:10 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: php_streams.h,v 1.63 2002/12/31 15:58:54 sebastian Exp $ */
+/* $Id: php_streams.h,v 1.64 2003/01/02 13:31:10 derick Exp $ */
#ifndef PHP_STREAMS_H
#define PHP_STREAMS_H
@@ -318,8 +318,8 @@
# define php_stream_to_zval(stream, zval) { ZVAL_RESOURCE(zval,
(stream)->rsrc_id); }
#endif
-#define php_stream_from_zval(stream, ppzval) ZEND_FETCH_RESOURCE2((stream),
php_stream *, (ppzval), -1, "stream", php_file_le_stream(), php_file_le_pstream())
-#define php_stream_from_zval_no_verify(stream, ppzval) (stream) =
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, "stream", NULL, 2,
php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval(str, ppzval) ZEND_FETCH_RESOURCE2((str), php_stream
+*, (ppzval), -1, "stream", php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval_no_verify(str, ppzval)(str) =
+(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, "stream", NULL, 2,
+php_file_le_stream(), php_file_le_pstream())
PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream
**stream TSRMLS_DC);
#define PHP_STREAM_PERSISTENT_SUCCESS 0 /* id exists */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /main php_streams.h
derick Thu Jan 2 08:31:31 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/main php_streams.h
Log:
- MFH: Fix warnings on UnixWare
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.61.2.5 php4/main/php_streams.h:1.61.2.6
--- php4/main/php_streams.h:1.61.2.5Tue Dec 31 11:26:21 2002
+++ php4/main/php_streams.h Thu Jan 2 08:31:30 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: php_streams.h,v 1.61.2.5 2002/12/31 16:26:21 sebastian Exp $ */
+/* $Id: php_streams.h,v 1.61.2.6 2003/01/02 13:31:30 derick Exp $ */
#ifndef PHP_STREAMS_H
#define PHP_STREAMS_H
@@ -318,8 +318,8 @@
# define php_stream_to_zval(stream, zval) { ZVAL_RESOURCE(zval,
(stream)->rsrc_id); }
#endif
-#define php_stream_from_zval(stream, ppzval) ZEND_FETCH_RESOURCE2((stream),
php_stream *, (ppzval), -1, "stream", php_file_le_stream(), php_file_le_pstream())
-#define php_stream_from_zval_no_verify(stream, ppzval) (stream) =
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, "stream", NULL, 2,
php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval(str, ppzval) ZEND_FETCH_RESOURCE2((str), php_stream
+*, (ppzval), -1, "stream", php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval_no_verify(str, ppzval)(str) =
+(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, "stream", NULL, 2,
+php_file_le_stream(), php_file_le_pstream())
PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream
**stream TSRMLS_DC);
#define PHP_STREAM_PERSISTENT_SUCCESS 0 /* id exists */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/apache php4apache.dsp
zeevThu Jan 2 09:19:29 2003 EDT Modified files: /php4/sapi/apache php4apache.dsp Log: Fix .dsp Index: php4/sapi/apache/php4apache.dsp diff -u php4/sapi/apache/php4apache.dsp:1.13 php4/sapi/apache/php4apache.dsp:1.14 --- php4/sapi/apache/php4apache.dsp:1.13Sat Apr 6 10:36:55 2002 +++ php4/sapi/apache/php4apache.dsp Thu Jan 2 09:19:29 2003 @@ -44,7 +44,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\apache\src\include" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D "APACHE_READDIR_H" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I +"..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I +"..\..\..\php_build\apache\src\include" /I "..\..\main" /I "..\..\TSRM" /I +"..\..\regex" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D +"_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D +"APACHE_READDIR_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -70,7 +70,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\apache\src\include" /I "..\..\main" /I "..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D "APACHE_READDIR_H" /FR /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I +"..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I +"..\..\..\php_build\apache\src\include" /I "..\..\main" /I "..\..\TSRM" /I +"..\..\regex" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D +"_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D +"APACHE_READDIR_H" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -80,7 +80,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 php4ts_debug.lib ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x6000" /version:4.0 /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php4apache.dll" /pdbtype:sept /libpath:"..\..\..\php_build\apache\src\cored" /libpath:"..\..\Debug_TS" /libpath:"..\..\TSRM\Debug_TS" /libpath:"..\..\Zend\Debug_TS" +# ADD LINK32 php4ts_debug.lib ApacheCore.lib kernel32.lib user32.lib gdi32.lib +winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib +odbc32.lib odbccp32.lib /nologo /base:"0x6000" /version:4.0 /dll /incremental:yes +/debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\php_build\apache\src\cored" +/libpath:"..\..\Debug_TS" /libpath:"..\..\TSRM\Debug_TS" +/libpath:"..\..\Zend\Debug_TS" !ELSEIF "$(CFG)" == "php4apache - Win32 Release_TS_inline" @@ -96,7 +96,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\..\php_build\apache\src\include" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D "WIN32" /D "_MBCS" /D "APACHE_READDIR_H" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I +"..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I +"..\..\..\php_build\apache\src\include" /I "..\..\main" /I "..\..\TSRM" /I +"..\..\regex" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "NDEBUG" /D "ZTS" /D +"ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "APACHEPHP4_EXPORTS" /D +"WIN32" /D "_MBCS" /D "APACHE_READDIR_H" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nolo
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
Sure, but would should the default option be? Defaulting to assuming that the target has a broken libc can cause race conditions (as the append operation is no-longer atomic). Default to assuming a working libc will cause "a+" operations to fail when the target actually has a broken libc. I don't want to start adding all kinds of weird target checks; I leave that to other people more familiar with this stuff. --Wez. On Thu, 2 Jan 2003, Alex Waugh wrote: > In message> "Wez Furlong" <[EMAIL PROTECTED]> wrote: > > > wez Wed Jan 1 04:58:17 2003 EDT > > > > Modified files: > > /php4 acinclude.m4 configure.in > > /php4/main streams.c > > Log: > > Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for > > files fopen()ed with that mode. > > This breaks the build when cross compiling. Please could you add a > default option to AC_TRY_RUN -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
On Thu, 2 Jan 2003, Wez Furlong wrote: > Defaulting to assuming that the target has a broken libc can cause race > conditions (as the append operation is no-longer atomic). > > Default to assuming a working libc will cause "a+" operations to fail > when the target actually has a broken libc. "broken glibc" << doesn't that imply that this define only need to be disabled for known broken systems and thus we can make the default not to define this thing. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /main SAPI.h
derick Thu Jan 2 12:58:58 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/main SAPI.h
Log:
Index: php4/main/SAPI.h
diff -u php4/main/SAPI.h:1.87.2.1 php4/main/SAPI.h:1.87.2.2
--- php4/main/SAPI.h:1.87.2.1 Tue Dec 31 11:24:58 2002
+++ php4/main/SAPI.hThu Jan 2 12:58:57 2003
@@ -39,6 +39,7 @@
#define SAPI_API
#endif
+#undef shutdown
typedef struct {
char *header;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main SAPI.h
derick Thu Jan 2 13:01:11 2003 EDT
Modified files:
/php4/main SAPI.h
Log:
- Fixed bug #21169: Compile Failure, and lots of warnings on UnixWare
Index: php4/main/SAPI.h
diff -u php4/main/SAPI.h:1.93 php4/main/SAPI.h:1.94
--- php4/main/SAPI.h:1.93 Tue Dec 31 10:58:51 2002
+++ php4/main/SAPI.hThu Jan 2 13:01:10 2003
@@ -39,6 +39,7 @@
#define SAPI_API
#endif
+#undef shutdown
typedef struct {
char *header;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
But how can you reliably detect a system with a broken libc when cross-compiling? I leave this for someone else to decide, although a more-or-less reasonable default is to for "have_broken_glibc_fopen_append=no" and hope that no-one files a problem report :) --Wez On Thu, 2 Jan 2003, Derick Rethans wrote: > On Thu, 2 Jan 2003, Wez Furlong wrote: > > > Defaulting to assuming that the target has a broken libc can cause race > > conditions (as the append operation is no-longer atomic). > > > > Default to assuming a working libc will cause "a+" operations to fail > > when the target actually has a broken libc. > > "broken glibc" << doesn't that imply that this define only need to be > disabled for known broken systems and thus we can make the default not > to define this thing. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
On Thu, 2 Jan 2003, Wez Furlong wrote: > But how can you reliably detect a system with a broken libc when > cross-compiling? I don't think that you can successfully cross-compile PHP anyway, so the point is moot anyway. - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in
iliaa Thu Jan 2 14:20:57 2003 EDT Modified files: /php4 configure.in acinclude.m4 Log: Raise required OpenSSL version to 0.9.6. Index: php4/configure.in diff -u php4/configure.in:1.410 php4/configure.in:1.411 --- php4/configure.in:1.410 Wed Jan 1 04:58:16 2003 +++ php4/configure.in Thu Jan 2 14:20:55 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.410 2003/01/01 09:58:16 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.411 2003/01/02 19:20:55 iliaa Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -728,7 +728,7 @@ dnl OpenSSL configure dnl PHP_ARG_WITH(openssl,for OpenSSL support, -[ --with-openssl[=DIR]Include OpenSSL support (requires OpenSSL >= 0.9.5) ]) +[ --with-openssl[=DIR]Include OpenSSL support (requires OpenSSL >= 0.9.6) ]) if test "$PHP_OPENSSL" != "no"; then ext_openssl_shared=$ext_shared Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.222 php4/acinclude.m4:1.223 --- php4/acinclude.m4:1.222 Wed Jan 1 04:58:16 2003 +++ php4/acinclude.m4 Thu Jan 2 14:20:57 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.222 2003/01/01 09:58:16 wez Exp $ +dnl $Id: acinclude.m4,v 1.223 2003/01/02 19:20:57 iliaa Exp $ dnl dnl This file contains local autoconf functions. @@ -204,13 +204,13 @@ AC_MSG_CHECKING([for OpenSSL version]) AC_EGREP_CPP(yes,[ #include -#if OPENSSL_VERSION_NUMBER >= 0x0090500fL +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL yes #endif ],[ -AC_MSG_RESULT([>= 0.9.5]) +AC_MSG_RESULT([>= 0.9.6]) ],[ -AC_MSG_ERROR([OpenSSL version 0.9.5 or greater required.]) +AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) ]) CPPFLAGS=$old_CPPFLAGS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]> Sascha Schumann <[EMAIL PROTECTED]> wrote: > On Thu, 2 Jan 2003, Wez Furlong wrote: > > > But how can you reliably detect a system with a broken libc when > > cross-compiling? > > I don't think that you can successfully cross-compile PHP > anyway, so the point is moot anyway. You can; I cross compile it regularly. Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4 configure.in
iliaa Thu Jan 2 14:21:55 2003 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in acinclude.m4 Log: MFH Index: php4/configure.in diff -u php4/configure.in:1.396.2.21 php4/configure.in:1.396.2.22 --- php4/configure.in:1.396.2.21Wed Jan 1 04:55:38 2003 +++ php4/configure.in Thu Jan 2 14:21:52 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.21 2003/01/01 09:55:38 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.22 2003/01/02 19:21:52 iliaa Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -728,7 +728,7 @@ dnl OpenSSL configure dnl PHP_ARG_WITH(openssl,for OpenSSL support, -[ --with-openssl[=DIR]Include OpenSSL support (requires OpenSSL >= 0.9.5) ]) +[ --with-openssl[=DIR]Include OpenSSL support (requires OpenSSL >= 0.9.6) ]) if test "$PHP_OPENSSL" != "no"; then ext_openssl_shared=$ext_shared Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.3 php4/acinclude.m4:1.218.2.4 --- php4/acinclude.m4:1.218.2.3 Wed Jan 1 04:55:38 2003 +++ php4/acinclude.m4 Thu Jan 2 14:21:53 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.3 2003/01/01 09:55:38 wez Exp $ +dnl $Id: acinclude.m4,v 1.218.2.4 2003/01/02 19:21:53 iliaa Exp $ dnl dnl This file contains local autoconf functions. @@ -211,13 +211,13 @@ AC_MSG_CHECKING([for OpenSSL version]) AC_EGREP_CPP(yes,[ #include -#if OPENSSL_VERSION_NUMBER >= 0x0090500fL +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL yes #endif ],[ -AC_MSG_RESULT([>= 0.9.5]) +AC_MSG_RESULT([>= 0.9.6]) ],[ -AC_MSG_ERROR([OpenSSL version 0.9.5 or greater required.]) +AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) ]) CPPFLAGS=$old_CPPFLAGS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard html.c /ext/standard/tests/strings bug21338.phpt
iliaa Thu Jan 2 14:49:30 2003 EDT
Added files:
/php4/ext/standard/tests/stringsbug21338.phpt
Modified files:
/php4/ext/standard html.c
Log:
Fixed bug #21338 (crash inside html_entity_decode() when "" is passed).
Added test case for the bug.
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.68 php4/ext/standard/html.c:1.69
--- php4/ext/standard/html.c:1.68 Tue Dec 31 11:07:42 2002
+++ php4/ext/standard/html.cThu Jan 2 14:49:30 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: html.c,v 1.68 2002/12/31 16:07:42 sebastian Exp $ */
+/* $Id: html.c,v 1.69 2003/01/02 19:49:30 iliaa Exp $ */
#include "php.h"
#if PHP_WIN32
@@ -674,6 +674,9 @@
ret = estrdup(old);
retlen = oldlen;
+ if (!retlen) {
+ goto empty_source;
+ }
if (all) {
/* look for a match in the maps for this charset */
@@ -722,7 +725,7 @@
efree(ret);
ret = replaced;
}
-
+empty_source:
*newlen = retlen;
return ret;
}
Index: php4/ext/standard/tests/strings/bug21338.phpt
+++ php4/ext/standard/tests/strings/bug21338.phpt
--TEST--
Bug #20934 (html_entity_decode() crash when "" is passed)
--FILE--
--EXPECT--
string(0) ""
string(0) ""
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard html.c /ext/standard/tests/strings bug21338.phpt
iliaa Thu Jan 2 14:50:38 2003 EDT
Added files: (Branch: PHP_4_3)
/php4/ext/standard/tests/stringsbug21338.phpt
Modified files:
/php4/ext/standard html.c
Log:
MFH
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.63.2.5 php4/ext/standard/html.c:1.63.2.6
--- php4/ext/standard/html.c:1.63.2.5 Tue Dec 31 11:35:29 2002
+++ php4/ext/standard/html.cThu Jan 2 14:50:37 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: html.c,v 1.63.2.5 2002/12/31 16:35:29 sebastian Exp $ */
+/* $Id: html.c,v 1.63.2.6 2003/01/02 19:50:37 iliaa Exp $ */
#include "php.h"
#if PHP_WIN32
@@ -674,6 +674,9 @@
ret = estrdup(old);
retlen = oldlen;
+ if (!retlen) {
+ goto empty_source;
+ }
if (all) {
/* look for a match in the maps for this charset */
@@ -722,7 +725,7 @@
efree(ret);
ret = replaced;
}
-
+empty_source:
*newlen = retlen;
return ret;
}
Index: php4/ext/standard/tests/strings/bug21338.phpt
+++ php4/ext/standard/tests/strings/bug21338.phpt
--TEST--
Bug #20934 (html_entity_decode() crash when "" is passed)
--FILE--
--EXPECT--
string(0) ""
string(0) ""
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
iliaa Thu Jan 2 14:52:19 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Bug fixing news. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.38 php4/NEWS:1.1247.2.39 --- php4/NEWS:1.1247.2.38 Tue Dec 31 13:39:31 2002 +++ php4/NEWS Thu Jan 2 14:52:18 2003 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 4.3.1 +- Fixed bug #21338 (html_entity_decode() crashed when "" is passed). (Ilia) - Improved dba extension (Marcus) . Added support for internal error handling of Berkeley db libraries. . Disallow Berkeley db versions 4.1.0 to 4.1.24 due to locking problems. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) / NEWS
On Thu, 2 Jan 2003, Ilia Alshanetsky wrote: > iliaa Thu Jan 2 14:52:19 2003 EDT > > Modified files: (Branch: PHP_4_3) > /php4 NEWS > Log: > Bug fixing news. Is it common to have an entry for every bug fix? If yes, I'll my fix too. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) / NEWS
On January 2, 2003 02:53 pm, Derick Rethans wrote: > On Thu, 2 Jan 2003, Ilia Alshanetsky wrote: > > iliaa Thu Jan 2 14:52:19 2003 EDT > > > > Modified files: (Branch: PHP_4_3) > > /php4 NEWS > > Log: > > Bug fixing news. > > Is it common to have an entry for every bug fix? If yes, I'll my fix > too. At one point I was told to add a news entry for every bug fix that fixed a bug affecting the 'stable' release. If that is not the case, please let me know. Ilia -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
> You can; I cross compile it regularly. What is your target/host platform then? - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]>
Wez Furlong <[EMAIL PROTECTED]> wrote:
> But how can you reliably detect a system with a broken libc when
> cross-compiling?
>
> I leave this for someone else to decide, although a more-or-less
> reasonable default is to for "have_broken_glibc_fopen_append=no" and
> hope that no-one files a problem report :)
How about the following (completely untested, so I bet the brackets
don't match up :-) Not perfect, but better than a blind guess. Caching
the value also makes it easier to manually override if it gets it wrong.
Alex
AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[
AC_MSG_CHECKING([for broken libc stdio])
AC_CACHE_VAL(have_broken_glibc_fopen_append,[
AC_TRY_RUN([
#include
int main(int argc, char *argv[])
{
FILE *fp;
long position;
char *filename = "/tmp/phpglibccheck";
fp = fopen(filename, "w");
if (fp == NULL) {
perror("fopen");
exit(2);
}
fputs("foobar", fp);
fclose(fp);
fp = fopen(filename, "a+");
position = ftell(fp);
fclose(fp);
unlink(filename);
if (position == 0)
return 1;
return 0;
}
],
[have_broken_glibc_fopen_append=no],
[have_broken_glibc_fopen_append=yes ],
AC_TRY_COMPILE([
#include
],[
#if __GLIBC_PREREQ(2,2)
int main(void)
{
return 0;
}
#else
choke me
#endif
],
[have_broken_glibc_fopen_append=yes ],
[have_broken_glibc_fopen_append=no ]
)
)])
if test "$have_broken_glibc_fopen_append" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on
fopen with mode a+])
else
AC_MSG_RESULT(no)
fi
])
--
Alex Waugh [EMAIL PROTECTED]
RISC OS software from http://www.alexwaugh.com/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]> Sascha Schumann <[EMAIL PROTECTED]> wrote: > > You can; I cross compile it regularly. > > What is your target/host platform then? Building on Linux, targetting RISC OS. Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/openssl openssl.c
iliaa Thu Jan 2 16:18:58 2003 EDT
Modified files:
/php4/ext/openssl openssl.c
Log:
Fixed a small memory leak when a NULL variable is passed to
openssl_csr_sign() as the first argument.
Index: php4/ext/openssl/openssl.c
diff -u php4/ext/openssl/openssl.c:1.60 php4/ext/openssl/openssl.c:1.61
--- php4/ext/openssl/openssl.c:1.60 Tue Dec 31 11:07:09 2002
+++ php4/ext/openssl/openssl.c Thu Jan 2 16:18:58 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: openssl.c,v 1.60 2002/12/31 16:07:09 sebastian Exp $ */
+/* $Id: openssl.c,v 1.61 2003/01/02 21:18:58 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1310,8 +1310,9 @@
return (X509_REQ*)what;
}
return NULL;
+ } else if (Z_TYPE_PP(val) != IS_STRING) {
+ return NULL;
}
- convert_to_string_ex(val);
if (Z_STRLEN_PP(val) > 7 && memcmp(Z_STRVAL_PP(val), "file://", 7) == 0)
filename = Z_STRVAL_PP(val) + 7;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
On Thu, 2 Jan 2003, Alex Waugh wrote: > In message <[EMAIL PROTECTED]> > Sascha Schumann <[EMAIL PROTECTED]> wrote: > > > > You can; I cross compile it regularly. > > > > What is your target/host platform then? > > Building on Linux, targetting RISC OS. Are our defaults directly applicable to RISC OS? Or how do you manage that configure produces an appropiate php_config.h for that target? - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]>
Sascha Schumann <[EMAIL PROTECTED]> wrote:
> On Thu, 2 Jan 2003, Alex Waugh wrote:
>
> > In message <[EMAIL PROTECTED]>
> > Sascha Schumann <[EMAIL PROTECTED]> wrote:
> >
> > > > You can; I cross compile it regularly.
> > >
> > > What is your target/host platform then?
> >
> > Building on Linux, targetting RISC OS.
>
> Are our defaults directly applicable to RISC OS? Or how do
> you manage that configure produces an appropiate
> php_config.h for that target?
The vast majority of tests don't require running a test program,
therefore they work equally well whether cross compiling or not. On the
few that do, the default is usually fine. For those that it gets wrong
the easiest way to change them is to put the correct values in
config.cache before running configure. eg. currently I'm doing the
following:
cat > config.cache << EOF
ac_cv_path_PROG_SENDMAIL=\${ac_cv_path_PROG_SENDMAIL=\}
lt_cv_prog_cc_can_build_shared=\${lt_cv_prog_cc_can_build_shared=no}
lt_cv_prog_cc_pic_works=\${lt_cv_prog_cc_pic_works=no}
EOF
./configure --host=arm-riscos-aof --with-config-file-path=/Choices:
Alex
--
Alex Waugh [EMAIL PROTECTED]
RISC OS software from http://www.alexwaugh.com/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
sniper Thu Jan 2 19:05:08 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Group these entries a bit to make NEWS easier to read. Index: php4/NEWS diff -u php4/NEWS:1.1247.2.39 php4/NEWS:1.1247.2.40 --- php4/NEWS:1.1247.2.39 Thu Jan 2 14:52:18 2003 +++ php4/NEWS Thu Jan 2 19:05:07 2003 @@ -1,13 +1,13 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 4.3.1 -- Fixed bug #21338 (html_entity_decode() crashed when "" is passed). (Ilia) - Improved dba extension (Marcus) . Added support for internal error handling of Berkeley db libraries. . Disallow Berkeley db versions 4.1.0 to 4.1.24 due to locking problems. . Disallow linkage of Berkeley db submodules against libraries with different major version. . Disallow configuring of more than one Berkeley db handler. +- Fixed bug #21338 (html_entity_decode() crashed when "" is passed). (Ilia) - Fixed bug #21229 (missing 3rd argument to php_module_startup). (Ilia) - Fixed bug #21267 (opening URLs that result in redirection to a relative path was failing). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
sniper Thu Jan 2 19:06:24 2003 EDT Modified files: /php4 NEWS Log: - Removed entries that are going to 4.3.1 - Grouped the entries a bit. Index: php4/NEWS diff -u php4/NEWS:1.1297 php4/NEWS:1.1298 --- php4/NEWS:1.1297Mon Dec 30 20:33:05 2002 +++ php4/NEWS Thu Jan 2 19:06:23 2003 @@ -1,33 +1,16 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 4.4.0 -- Improved dba extension (Marcus) -- Fixed bug #21229 (missing 3rd argument to php_module_startup). (Ilia) -- Fixed bug #21267 (opening URLs that result in redirection to a relative - path was failing). (Ilia) -- Fixed bug #21226 (parse_url handling of urls without a path). (Ilia) -- Fixed bug #21228 (broken check for ob_gzhandler) & made ob_start() return - the correct value. (Ilia) -- Fixed bug #21268 (session_decode() returned FALSE on success). (Ilia) -- Improved dba extension (Marcus) - . Made handler parameter of dba_(p)open() optional. - . Added php.ini option 'dba.default_handler' to specify a default handler. - . Added parameter full_info to dba_handlers() that can be set true to -receive information about the handlers such like the library version. - . Added support for internal error handling of Berkeley db libraries. - . Disallow Berkeley db versions 4.1.0 to 4.1.24 due to locking problems. - . Disallow linkage of Berkeley db submodules against libraries with -different major version. - . Disallow configuring of more than one Berkeley db handler. -- Fixed bug #17098 (make Apache aware that PHP scripts represent dynamic data +- Fixed bug #17098 (make Apache2 aware that PHP scripts represent dynamic data and should not be cached). (Ilia) -- Make uniqid() parameters optional and allow any prefix length. (Marcus) -- New range() functionality (Ilia) +- Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia) +- Made uniqid() parameters to be optional and allow any prefix length. (Marcus) +- Made array_search() to accept objects as a needle under ZendEngine2. + (Moriyoshi) +- Added new range() functionality (Ilia) . Support for float modifier. . Detection of numeric values inside strings passed as high & low. . Proper handle the situations where high == low. -- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi) -- Fixed bug #20442 (upgraded bundled expat to 1.95.5). (Ilia) - Added imagefilter() function which allows application of various filters. This function is only available with bundled GD. (Pierre-Alain Joye, Ilia) - Added imageistruecolor(), only available with GD2+(Pierre-Alain Joye) @@ -36,7 +19,6 @@ . imageantialias($im, $flag) to (de)active antialias . imageline antialias support . imagepolygon antialias support - 27 Dec 2002, Version 4.3.0 - Make PHP_AUTH_* variables not available in safe mode under Apache when an -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / modules
imajes Thu Jan 2 20:28:33 2003 EDT Modified files: /CVSROOTmodules Log: duh! lets not loop cvs till it dies.. Index: CVSROOT/modules diff -u CVSROOT/modules:1.30 CVSROOT/modules:1.31 --- CVSROOT/modules:1.30Mon Dec 30 21:19:05 2002 +++ CVSROOT/modules Thu Jan 2 20:28:31 2003 @@ -1,7 +1,7 @@ # # The CVS Modules File # -#ident "@(#)cvs/examples:$Name: $:$Id: modules,v 1.30 2002/12/31 02:19:05 imajes Exp $" +#ident "@(#)cvs/examples:$Name: $:$Id: modules,v 1.31 2003/01/03 01:28:31 imajes Exp +$" # # Three different line formats are valid: # key -aaliases... @@ -92,7 +92,7 @@ phpdoc-kr-dir -d kr phpdoc-kr phpdoc-kr-only phpdoc-kr phpdoc-kr phpdoc &phpdoc-kr-dir -phpdoc-lt-dir -d lt &phpdoc-lt-dir +phpdoc-lt-dir -d lt &phpdoc-lt phpdoc-lt-only phpdoc-lt phpdoc-lt phpdoc &phpdoc-lt-dir phpdoc-nl-dir -d nl phpdoc-nl -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / modules
imajes Thu Jan 2 20:30:03 2003 EDT Modified files: /CVSROOTmodules Log: and that & too.. Index: CVSROOT/modules diff -u CVSROOT/modules:1.31 CVSROOT/modules:1.32 --- CVSROOT/modules:1.31Thu Jan 2 20:28:31 2003 +++ CVSROOT/modules Thu Jan 2 20:30:03 2003 @@ -1,7 +1,7 @@ # # The CVS Modules File # -#ident "@(#)cvs/examples:$Name: $:$Id: modules,v 1.31 2003/01/03 01:28:31 imajes Exp $" +#ident "@(#)cvs/examples:$Name: $:$Id: modules,v 1.32 2003/01/03 01:30:03 imajes Exp +$" # # Three different line formats are valid: # key -aaliases... @@ -92,7 +92,7 @@ phpdoc-kr-dir -d kr phpdoc-kr phpdoc-kr-only phpdoc-kr phpdoc-kr phpdoc &phpdoc-kr-dir -phpdoc-lt-dir -d lt &phpdoc-lt +phpdoc-lt-dir -d lt phpdoc-lt phpdoc-lt-only phpdoc-lt phpdoc-lt phpdoc &phpdoc-lt-dir phpdoc-nl-dir -d nl phpdoc-nl -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
imajes Thu Jan 2 21:41:45 2003 EDT Modified files: /CVSROOTavail Log: give karma to phpdoc-lt properly. Index: CVSROOT/avail diff -u CVSROOT/avail:1.568 CVSROOT/avail:1.569 --- CVSROOT/avail:1.568 Mon Dec 30 21:19:05 2002 +++ CVSROOT/avail Thu Jan 2 21:41:45 2003 @@ -26,7 +26,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|frogger,coldocean,alan_k,fleaslob,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,ufux,virtual,fireclaw,hadar_p,asautins,dbenson,aleczapka,flaviobrito,mattias,tom,amiller,cortesi,lancelot_,irc-html,mkaufman,rarruda,j-f,betz,philip,alindeman,thyla,cucinato,jpsantos,zyprexia,tpug,ozgurakan,mitja,conni,sts,stefanhinz,georg,nmav,subbie,leszek,spheroid,joona,kjartno,slawek,nooboo,alan_dangelo,ae,ahambazaza,nohn,kaser01,visualmind,abohamam,stefan,kurtz,luk,tronic,moh,bernd,wilko,yohgaki,fujimoto,gerzson,webler,spooky,tinenie,cece,daniel,offs,boo,nhoizey,nogada,albaity,joerg,mazen,neil536t,maco,imajes,hakan,chief977,dwestfal,ott,shlomi,holev,raful,yuval,tomer,masterjy,barak,ido,mork,lior,gal,adiju,cr_depend,cyberowl,daniel.paul,florian,iulianphp,kappu,michelinux,muricaru,narcotic,dt,valy,critix,spg1et,ck,costra,fancao0515,rbenea,tibee,ins0mnia,eriksson,wenz,jaxler,volker,avaly,bernardojts,bs,phaser,tal,sander,matroz,thales,dorun,ave,adu,adamf1,figuric,katow,l30n4rd0,samih,mmeier,wentzel,scaro,amtd,aspinei,costello,coti,lmaxcar,lucaiacono,manuzhai,mcastro,sukamade,darvina,peter,maxim,adir,roland,romakhin,jmurin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,machado,progcom,verdana,yincheng,surfmax,arzt,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,daif,aber_sabeel,alzahrani,ayman_h,thomaslio,sfox,jippie,floripa,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,spic,truelight,gnuhacker,_batman_,sachat,dallas,dart,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,feyge,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,phpclub,xelis,adrianr,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis|phpdoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh +avail|frogger,coldocean,alan_k,fleaslob,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,ufux,virtual,fireclaw,hadar_p,asautins,dbenson,aleczapka,flaviobrito,mattias,tom,amiller,cortesi,lancelot_,irc-html,mkaufman,rarruda,j-f,betz,philip,alindeman,thyla,cucinato,jpsantos,zyprexia,tpug,ozgurakan,mitja,conni,sts,stefanhinz,georg,nmav,subbie,leszek,spheroid,joona,kjartno,slawek,nooboo,alan_dangelo,ae,ahambazaza,nohn,kaser01,visualmind,abohamam,stefan,kurtz,luk,tronic,moh,bernd,w
[PHP-CVS] cvs: php4 /ext/standard array.c
moriyoshi Fri Jan 3 00:05:13 2003 EDT
Modified files:
/php4/ext/standard array.c
Log:
Fixed small leaks in array_map() in case the first parameter is NULL like
array_map(NULL, array(...));
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.213 php4/ext/standard/array.c:1.214
--- php4/ext/standard/array.c:1.213 Tue Dec 31 11:07:31 2002
+++ php4/ext/standard/array.c Fri Jan 3 00:05:12 2003
@@ -21,7 +21,7 @@
+--+
*/
-/* $Id: array.c,v 1.213 2002/12/31 16:07:31 sebastian Exp $ */
+/* $Id: array.c,v 1.214 2003/01/03 05:05:12 moriyoshi Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -3418,6 +3418,8 @@
WRONG_PARAM_COUNT;
}
+ RETVAL_NULL();
+
callback = *args[0];
if (Z_TYPE_P(callback) != IS_NULL) {
if (!zend_is_callable(callback, 0, &callback_name)) {
@@ -3438,6 +3440,7 @@
if (Z_TYPE_PP(args[i+1]) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument #%d
should be an array", i + 2);
efree(array_len);
+ efree(array_pos);
efree(args);
return;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard array.c
moriyoshi Fri Jan 3 00:12:06 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/standard array.c
Log:
MFH
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.199.2.11 php4/ext/standard/array.c:1.199.2.12
--- php4/ext/standard/array.c:1.199.2.11Tue Dec 31 11:35:24 2002
+++ php4/ext/standard/array.c Fri Jan 3 00:12:06 2003
@@ -21,7 +21,7 @@
+--+
*/
-/* $Id: array.c,v 1.199.2.11 2002/12/31 16:35:24 sebastian Exp $ */
+/* $Id: array.c,v 1.199.2.12 2003/01/03 05:12:06 moriyoshi Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -3328,6 +3328,8 @@
WRONG_PARAM_COUNT;
}
+ RETVAL_NULL();
+
callback = *args[0];
if (Z_TYPE_P(callback) != IS_NULL) {
if (!zend_is_callable(callback, 0, &callback_name)) {
@@ -3348,6 +3350,7 @@
if (Z_TYPE_PP(args[i+1]) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument #%d
should be an array", i + 2);
efree(array_len);
+ efree(array_pos);
efree(args);
return;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:13:11 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/iconv iconv.c
Log:
Fixed shift-out sequence unawareness issue
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.65.2.2 php4/ext/iconv/iconv.c:1.65.2.3
--- php4/ext/iconv/iconv.c:1.65.2.2 Tue Dec 31 11:34:43 2002
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:13:11 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.65.2.2 2002/12/31 16:34:43 sebastian Exp $ */
+/* $Id: iconv.c,v 1.65.2.3 2003/01/03 05:13:11 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -230,6 +230,18 @@
efree(out_buffer);
return PHP_ICONV_ERR_UNKNOWN;
}
+
+ if (out_left < 8) {
+ out_buffer = (char *) erealloc(out_buffer, out_size + 8);
+ }
+
+ /* flush the shift-out sequences */
+ result = icv(cd, NULL, NULL, &out_p, &out_left);
+
+ if (result == (size_t)(-1)) {
+ efree(out_buffer);
+ return PHP_ICONV_ERR_UNKNOWN;
+ }
*out_len = out_size - out_left;
out_buffer[*out_len] = '\0';
@@ -288,6 +300,34 @@
}
break;
}
+
+ if (result != (size_t)(-1)) {
+ /* flush the shift-out sequences */
+ for (;;) {
+ result = icv(cd, NULL, NULL, (char **) &out_p, &out_left);
+ out_size = bsz - out_left;
+
+ if (result != (size_t)(-1)) {
+ break;
+ }
+
+ if (errno == E2BIG) {
+ bsz += 16;
+ tmp_buf = (char *) erealloc(out_buf, bsz);
+
+ if (tmp_buf == NULL) {
+ break;
+ }
+
+ out_p = out_buf = tmp_buf;
+ out_p += out_size;
+ out_left = bsz - out_size;
+ } else {
+ break;
+ }
+ }
+ }
+
icv_close(cd);
if (result == (size_t)(-1)) {
@@ -299,6 +339,7 @@
case EILSEQ:
retval = PHP_ICONV_ERR_ILLEGAL_SEQ;
break;
+
case E2BIG:
/* should not happen */
retval = PHP_ICONV_ERR_TOO_BIG;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:14:34 2003 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
MFB: fixed shift-out sequence unawareness issue
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.68 php4/ext/iconv/iconv.c:1.69
--- php4/ext/iconv/iconv.c:1.68 Tue Dec 31 14:13:16 2002
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:14:34 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.68 2002/12/31 19:13:16 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.69 2003/01/03 05:14:34 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -240,7 +240,7 @@
size_t decoded_len;
unsigned char *retval;
- unsigned int hexval_tbl[256] = {
+ static unsigned int hexval_tbl[256] = {
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
@@ -402,7 +402,19 @@
efree(out_buffer);
return PHP_ICONV_ERR_UNKNOWN;
}
-
+
+ if (out_left < 8) {
+ out_buffer = (char *) erealloc(out_buffer, out_size + 8);
+ }
+
+ /* flush the shift-out sequences */
+ result = icv(cd, NULL, NULL, &out_p, &out_left);
+
+ if (result == (size_t)(-1)) {
+ efree(out_buffer);
+ return PHP_ICONV_ERR_UNKNOWN;
+ }
+
*out_len = out_size - out_left;
out_buffer[*out_len] = '\0';
*out = out_buffer;
@@ -460,6 +472,34 @@
}
break;
}
+
+ if (result != (size_t)(-1)) {
+ /* flush the shift-out sequences */
+ for (;;) {
+ result = icv(cd, NULL, NULL, (char **) &out_p, &out_left);
+ out_size = bsz - out_left;
+
+ if (result != (size_t)(-1)) {
+ break;
+ }
+
+ if (errno == E2BIG) {
+ bsz += 16;
+ tmp_buf = (char *) erealloc(out_buf, bsz);
+
+ if (tmp_buf == NULL) {
+ break;
+ }
+
+ out_p = out_buf = tmp_buf;
+ out_p += out_size;
+ out_left = bsz - out_size;
+ } else {
+ break;
+ }
+ }
+ }
+
icv_close(cd);
if (result == (size_t)(-1)) {
@@ -471,6 +511,7 @@
case EILSEQ:
retval = PHP_ICONV_ERR_ILLEGAL_SEQ;
break;
+
case E2BIG:
/* should not happen */
retval = PHP_ICONV_ERR_TOO_BIG;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/iconv/tests eucjp2iso2022jp.phpt
moriyoshi Fri Jan 3 00:15:54 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/iconv/tests eucjp2iso2022jp.phpt
Log:
Updated the test so it reflects the recent change on iconv.c
Index: php4/ext/iconv/tests/eucjp2iso2022jp.phpt
diff -u php4/ext/iconv/tests/eucjp2iso2022jp.phpt:1.4
php4/ext/iconv/tests/eucjp2iso2022jp.phpt:1.4.2.1
--- php4/ext/iconv/tests/eucjp2iso2022jp.phpt:1.4 Tue Oct 29 11:25:23 2002
+++ php4/ext/iconv/tests/eucjp2iso2022jp.phpt Fri Jan 3 00:15:54 2003
@@ -9,50 +9,19 @@
/* include('test.inc'); */
/* charset=EUC-JP */
-$str = "
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-";
+function hexdump($str) {
+ $len = strlen($str);
+ for ($i = 0; $i < $len; ++$i) {
+ printf("%02x", ord($str{$i}));
+ }
+ print "\n";
+}
-$str = iconv("EUC-JP", "ISO-2022-JP", $str);
-$str = base64_encode($str);
-echo $str."\n";
+$str = str_repeat("ÆüËÜ¸ì¥Æ¥¥¹¥È¤È English text", 30);
+$str .= "ÆüËܸì";
+echo hexdump(iconv("EUC-JP", "ISO-2022-JP", $str));
?>
--EXPECT--
-ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0Cg==
+1b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741
[PHP-CVS] cvs: php4 /ext/iconv/tests eucjp2iso2022jp.phpt
moriyoshi Fri Jan 3 00:16:12 2003 EDT
Modified files:
/php4/ext/iconv/tests eucjp2iso2022jp.phpt
Log:
MFB
Index: php4/ext/iconv/tests/eucjp2iso2022jp.phpt
diff -u php4/ext/iconv/tests/eucjp2iso2022jp.phpt:1.4
php4/ext/iconv/tests/eucjp2iso2022jp.phpt:1.5
--- php4/ext/iconv/tests/eucjp2iso2022jp.phpt:1.4 Tue Oct 29 11:25:23 2002
+++ php4/ext/iconv/tests/eucjp2iso2022jp.phpt Fri Jan 3 00:16:12 2003
@@ -9,50 +9,19 @@
/* include('test.inc'); */
/* charset=EUC-JP */
-$str = "
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-ÆüËÜ¸ì¥Æ¥¥¹¥È¤ÈEnglish Text
-";
+function hexdump($str) {
+ $len = strlen($str);
+ for ($i = 0; $i < $len; ++$i) {
+ printf("%02x", ord($str{$i}));
+ }
+ print "\n";
+}
-$str = iconv("EUC-JP", "ISO-2022-JP", $str);
-$str = base64_encode($str);
-echo $str."\n";
+$str = str_repeat("ÆüËÜ¸ì¥Æ¥¥¹¥È¤È English text", 30);
+$str .= "ÆüËܸì";
+echo hexdump(iconv("EUC-JP", "ISO-2022-JP", $str));
?>
--EXPECT--
-ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0ChskQkZ8S1w4bCVGJS0lOSVIJEgbKEJFbmdsaXNoIFRleHQKGyRCRnxLXDhsJUYlLSU5JUgkSBsoQkVuZ2xpc2ggVGV4dAobJEJGfEtcOGwlRiUtJTklSCRIGyhCRW5nbGlzaCBUZXh0Cg==
+1b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467c4b5c386c2546252d2539254824481b284220456e676c69736820746578741b2442467
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:26:45 2003 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
Added missing casting operators
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.69 php4/ext/iconv/iconv.c:1.70
--- php4/ext/iconv/iconv.c:1.69 Fri Jan 3 00:14:34 2003
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:26:44 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.69 2003/01/03 05:14:34 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.70 2003/01/03 05:26:44 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -320,7 +320,7 @@
out_p = (d)->c + (d)->len;
- if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == -1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) ==
+(size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
switch (errno) {
case EINVAL:
@@ -574,7 +574,7 @@
prev_in_left = in_left;
- if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == -1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) ==
+(size_t)-1) {
if (prev_in_left == in_left) {
break;
}
@@ -683,7 +683,7 @@
--len;
}
- if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == -1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) ==
+(size_t)-1) {
if (prev_in_left == in_left) {
break;
}
@@ -785,7 +785,7 @@
prev_in_left = in_left;
- if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) == -1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) ==
+(size_t)-1) {
if (prev_in_left == in_left) {
#if ICONV_SUPPORTS_ERRNO
switch (errno) {
@@ -1000,7 +1000,7 @@
out_p = buf;
out_left = out_size = (char_cnt - 2) / 4 * 3;
- if (icv(cd, &in_p, &in_left, (char **) &out_p,
&out_left) == -1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p,
+&out_left) == (size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
switch (errno) {
case EINVAL:
@@ -1064,7 +1064,7 @@
out_p = buf;
out_left = out_size = 1;
- if (icv(cd, &in_p, &in_left, (char **) &out_p,
&out_left) == -1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p,
+&out_left) == (size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
switch (errno) {
case EINVAL:
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:28:25 2003 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
More shift-sequence awareness for iconv_substr()
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.70 php4/ext/iconv/iconv.c:1.71
--- php4/ext/iconv/iconv.c:1.70 Fri Jan 3 00:26:44 2003
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:28:25 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.70 2003/01/03 05:26:44 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.71 2003/01/03 05:28:25 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -311,41 +311,70 @@
size_t prev_in_left = in_left;
#endif
- while (in_left > 0) {
- out_left = buf_growth - out_left;
- {
- size_t newlen;
- smart_str_alloc((d), out_left, 0);
- }
+ if (in_p != NULL) {
+ while (in_left > 0) {
+ out_left = buf_growth - out_left;
+ {
+ size_t newlen;
+ smart_str_alloc((d), out_left, 0);
+ }
- out_p = (d)->c + (d)->len;
+ out_p = (d)->c + (d)->len;
- if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) ==
(size_t)-1) {
+ if (icv(cd, &in_p, &in_left, (char **) &out_p, &out_left) ==
+(size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
- switch (errno) {
- case EINVAL:
- return PHP_ICONV_ERR_ILLEGAL_CHAR;
+ switch (errno) {
+ case EINVAL:
+ return PHP_ICONV_ERR_ILLEGAL_CHAR;
- case EILSEQ:
- return PHP_ICONV_ERR_ILLEGAL_SEQ;
+ case EILSEQ:
+ return PHP_ICONV_ERR_ILLEGAL_SEQ;
- case E2BIG:
- break;
+ case E2BIG:
+ break;
- default:
- return PHP_ICONV_ERR_UNKNOWN;
- }
+ default:
+ return PHP_ICONV_ERR_UNKNOWN;
+ }
#else
- if (prev_in_left == in_left) {
- return PHP_ICONV_ERR_UNKNOWN;
+ if (prev_in_left == in_left) {
+ return PHP_ICONV_ERR_UNKNOWN;
+ }
+#endif
}
+#if !ICONV_SUPPORTS_ERRNO
+ prev_in_left = in_left;
#endif
+ (d)->len += (buf_growth - out_left);
+ buf_growth <<= 1;
}
-#if !ICONV_SUPPORTS_ERRNO
- prev_in_left = in_left;
+ } else {
+ for (;;) {
+ out_left = buf_growth - out_left;
+ {
+ size_t newlen;
+ smart_str_alloc((d), out_left, 0);
+ }
+
+ out_p = (d)->c + (d)->len;
+
+ if (icv(cd, NULL, NULL, (char **) &out_p, &out_left) ==
+(size_t)0) {
+ (d)->len += (buf_growth - out_left);
+ break;
+ } else {
+#if ICONV_SUPPORTS_ERRNO
+ if (errno != E2BIG) {
+ return PHP_ICONV_ERR_UNKNOWN;
+ }
+#else
+ if (out_left != 0) {
+ return PHP_ICONV_ERR_UNKNOWN;
+ }
#endif
- (d)->len += (buf_growth - out_left);
- buf_growth <<= 1;
+ }
+ (d)->len += (buf_growth - out_left);
+ buf_growth <<= 1;
+ }
}
return PHP_ICONV_ERR_SUCCESS;
}
@@ -622,7 +651,7 @@
php_iconv_err_t err = PHP_ICONV_ERR_SUCCESS;
- iconv_t cd;
+ iconv_t cd1, cd2;
const char *in_p;
size_t in_left;
@@ -632,8 +661,6 @@
unsigned int cnt;
- const char *substr_ofs;
-
/* normalize the offset and the length */
if (offset < 0 || len < 0) {
unsigned int total_len;
@@ -653,9 +680,9 @@
}
}
- cd = icv_open(GENERIC_SUPERSET_NAME, enc);
+ cd1 = icv_open(GENE
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:32:13 2003 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
Give mo' shift-sequence awareness to iconv_mime_encode
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.71 php4/ext/iconv/iconv.c:1.72
--- php4/ext/iconv/iconv.c:1.71 Fri Jan 3 00:28:25 2003
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:32:13 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.71 2003/01/03 05:28:25 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.72 2003/01/03 05:32:13 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1022,7 +1022,7 @@
in_left = fval_nbytes;
do {
- size_t prev_in_left = in_left;
+ size_t prev_in_left;
size_t out_size;
if (char_cnt < (out_charset_len + 12)) {
@@ -1041,39 +1041,84 @@
switch (enc_scheme) {
case PHP_ICONV_ENC_SCHEME_BASE64: {
+ size_t ini_in_left;
+ const char *ini_in_p;
+ size_t out_reserved = 4;
+
smart_str_appendc(pretval, 'B');
char_cnt--;
smart_str_appendc(pretval, '?');
char_cnt--;
- out_p = buf;
- out_left = out_size = (char_cnt - 2) / 4 * 3;
+ prev_in_left = ini_in_left = in_left;
+ ini_in_p = in_p;
- if (icv(cd, &in_p, &in_left, (char **) &out_p,
&out_left) == (size_t)-1) {
+ out_size = (char_cnt - 2) / 4 * 3;
+
+ for (;;) {
+ out_p = buf;
+
+ if (out_size <= out_reserved) {
+ err = PHP_ICONV_ERR_TOO_BIG;
+ goto out;
+ }
+
+ out_left = out_size - out_reserved;
+
+ if (icv(cd, &in_p, &in_left, (char **) &out_p,
+&out_left) == (size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
- switch (errno) {
- case EINVAL:
- err =
PHP_ICONV_ERR_ILLEGAL_CHAR;
- goto out;
+ switch (errno) {
+ case EINVAL:
+ err =
+PHP_ICONV_ERR_ILLEGAL_CHAR;
+ goto out;
- case EILSEQ:
- err =
PHP_ICONV_ERR_ILLEGAL_SEQ;
- goto out;
+ case EILSEQ:
+ err =
+PHP_ICONV_ERR_ILLEGAL_SEQ;
+ goto out;
- case E2BIG:
- break;
+ case E2BIG:
+ break;
- default:
+ default:
+ err =
+PHP_ICONV_ERR_UNKNOWN;
+ goto out;
+ }
+#else
+ if (prev_in_left == in_left) {
err = PHP_ICONV_ERR_UNKNOWN;
goto out;
+ }
+#endif
}
+
+ out_left += out_reserved;
+
+ if (icv(cd, NULL, NULL, (char **) &out_p,
+&out_left) == (size_t)-1) {
+#if ICONV_SUPPORTS_ERRNO
+ if (errno != E2BIG) {
+ err = PHP_ICONV_ERR_UNKNOWN;
+ goto out;
+ }
#else
- if (prev_in_left == in_left) {
+
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:34:06 2003 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
Fixed infinite loop of iconv_mime_encode() in case the specified line length is too
short to contain a proper mime-encoded string
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.72 php4/ext/iconv/iconv.c:1.73
--- php4/ext/iconv/iconv.c:1.72 Fri Jan 3 00:32:13 2003
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:34:05 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.72 2003/01/03 05:32:13 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.73 2003/01/03 05:34:05 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1077,6 +1077,10 @@
goto out;
case E2BIG:
+ if (prev_in_left ==
+in_left) {
+ err =
+PHP_ICONV_ERR_TOO_BIG;
+ goto out;
+ }
break;
default:
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv iconv.c
moriyoshi Fri Jan 3 00:38:51 2003 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
Fixed iconv_mime_decode() so it would give more awareness to stateful codesets
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.73 php4/ext/iconv/iconv.c:1.74
--- php4/ext/iconv/iconv.c:1.73 Fri Jan 3 00:34:05 2003
+++ php4/ext/iconv/iconv.c Fri Jan 3 00:38:50 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: iconv.c,v 1.73 2003/01/03 05:34:05 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.74 2003/01/03 05:38:50 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1438,6 +1438,11 @@
}
}
+ if (cd != (iconv_t)(-1)) {
+ if ((err = _php_iconv_appendl(pretval, NULL, 0, cd)) !=
+PHP_ICONV_ERR_SUCCESS) {
+ goto out;
+ }
+ }
smart_str_0(pretval);
out:
if (cd != (iconv_t)(-1)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/iconv/tests iconv_strlen.phpt iconv_substr.phpt
moriyoshi Fri Jan 3 00:48:51 2003 EDT Added files: /php4/ext/iconv/tests iconv_strlen.phpt iconv_substr.phpt Log: Added test cases for iconv_strlen() and iconv_substr() Index: php4/ext/iconv/tests/iconv_strlen.phpt +++ php4/ext/iconv/tests/iconv_strlen.phpt --TEST-- iconv_strlen() --SKIPIF-- --FILE-- --EXPECT-- int(3) int(3) int(13) int(10) Index: php4/ext/iconv/tests/iconv_substr.phpt +++ php4/ext/iconv/tests/iconv_substr.phpt --TEST-- iconv_substr() --SKIPIF-- --INI-- iconv.internal_charset=ISO-8859-1 --FILE-- --EXPECT-- 666768696a6b6c 666768696a6b6c a6a4a8a4aaa4ab a4aba4ada4afa4b1a4b3a4b5a4b7 bool(false) string(0) "" string(14) "This is a test" string(14) "This is a test" string(3) "est" string(3) "est" string(5) "This " string(5) "This " string(0) "" string(0) "" string(0) "" string(0) "" string(10) "¤Á¤Ï ISO-2" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
