[PHP-CVS] cvs: php-src(PHP_5_2) /main config.w32.h fopen_wrappers.c php.h safe_mode.c /win32 glob.c globals.c php5dll.dsp php5dllts.dsp php_win32_globals.h pwd.c pwd.h /win32/build config.w32 config
dmitry Fri Nov 10 09:56:17 2006 UTC Removed files: (Branch: PHP_5_2) /php-src/win32 pwd.c pwd.h Modified files: /php-src/win32 glob.c globals.c php5dll.dsp php5dllts.dsp php_win32_globals.h /php-src/win32/buildconfig.w32 config.w32.h.in /php-src/main config.w32.h fopen_wrappers.c php.h safe_mode.c Log: Simplify the code base as this getpwd() was used only once http://cvs.php.net/viewvc.cgi/php-src/win32/glob.c?r1=1.6r2=1.6.6.1diff_format=u Index: php-src/win32/glob.c diff -u php-src/win32/glob.c:1.6 php-src/win32/glob.c:1.6.6.1 --- php-src/win32/glob.c:1.6Sat Sep 20 03:22:36 2003 +++ php-src/win32/glob.cFri Nov 10 09:56:16 2006 @@ -34,7 +34,7 @@ * SUCH DAMAGE. */ -/* $Id: glob.c,v 1.6 2003/09/20 03:22:36 sniper Exp $ */ +/* $Id: glob.c,v 1.6.6.1 2006/11/10 09:56:16 dmitry Exp $ */ /* * glob(3) -- a superset of the one defined in POSIX 1003.2. @@ -81,8 +81,6 @@ #include dirent.h #include pwd.h #include unistd.h -#else -#include win32/pwd.h #endif #include errno.h #include glob.h @@ -359,7 +357,9 @@ size_t patbuf_len; glob_t *pglob; { +#ifndef PHP_WIN32 struct passwd *pwd; +#endif char *h; const Char *p; Char *b, *eb; @@ -399,10 +399,14 @@ /* * Expand a ~user */ +#ifndef PHP_WIN32 if ((pwd = getpwnam((char*) patbuf)) == NULL) return pattern; else h = pwd-pw_dir; +#else + return pattern; +#endif } /* Copy the home directory */ http://cvs.php.net/viewvc.cgi/php-src/win32/globals.c?r1=1.5.2.1r2=1.5.2.1.2.1diff_format=u Index: php-src/win32/globals.c diff -u php-src/win32/globals.c:1.5.2.1 php-src/win32/globals.c:1.5.2.1.2.1 --- php-src/win32/globals.c:1.5.2.1 Sun Jan 1 12:50:19 2006 +++ php-src/win32/globals.c Fri Nov 10 09:56:16 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: globals.c,v 1.5.2.1 2006/01/01 12:50:19 sniper Exp $ */ +/* $Id: globals.c,v 1.5.2.1.2.1 2006/11/10 09:56:16 dmitry Exp $ */ #include php.h #include php_win32_globals.h @@ -43,8 +43,6 @@ #endif ; - STR_FREE(wg-login_name); - memset(wg, 0, sizeof(*wg)); return SUCCESS; } http://cvs.php.net/viewvc.cgi/php-src/win32/php5dll.dsp?r1=1.3r2=1.3.4.1diff_format=u Index: php-src/win32/php5dll.dsp diff -u php-src/win32/php5dll.dsp:1.3 php-src/win32/php5dll.dsp:1.3.4.1 --- php-src/win32/php5dll.dsp:1.3 Sun Jun 19 22:15:27 2005 +++ php-src/win32/php5dll.dsp Fri Nov 10 09:56:16 2006 @@ -1552,10 +1552,6 @@ # End Source File # Begin Source File -SOURCE=..\win32\pwd.c -# End Source File -# Begin Source File - SOURCE=..\win32\readdir.c # End Source File # Begin Source File @@ -1628,10 +1624,6 @@ # End Source File # Begin Source File -SOURCE=..\win32\pwd.h -# End Source File -# Begin Source File - SOURCE=..\win32\readdir.h # End Source File # Begin Source File http://cvs.php.net/viewvc.cgi/php-src/win32/php5dllts.dsp?r1=1.6.4.2r2=1.6.4.3diff_format=u Index: php-src/win32/php5dllts.dsp diff -u php-src/win32/php5dllts.dsp:1.6.4.2 php-src/win32/php5dllts.dsp:1.6.4.3 --- php-src/win32/php5dllts.dsp:1.6.4.2 Wed Sep 13 17:33:24 2006 +++ php-src/win32/php5dllts.dsp Fri Nov 10 09:56:16 2006 @@ -2391,10 +2391,6 @@ # End Source File # Begin Source File -SOURCE=..\win32\pwd.c -# End Source File -# Begin Source File - SOURCE=..\win32\readdir.c # End Source File # Begin Source File @@ -2480,10 +2476,6 @@ # End Source File # Begin Source File -SOURCE=..\win32\pwd.h -# End Source File -# Begin Source File - SOURCE=..\win32\readdir.h # End Source File # Begin Source File http://cvs.php.net/viewvc.cgi/php-src/win32/php_win32_globals.h?r1=1.4.2.1r2=1.4.2.1.2.1diff_format=u Index: php-src/win32/php_win32_globals.h diff -u php-src/win32/php_win32_globals.h:1.4.2.1 php-src/win32/php_win32_globals.h:1.4.2.1.2.1 --- php-src/win32/php_win32_globals.h:1.4.2.1 Sun Jan 1 12:50:19 2006 +++ php-src/win32/php_win32_globals.h Fri Nov 10 09:56:16 2006 @@ -16,15 +16,13 @@ +--+ */ -/* $Id: php_win32_globals.h,v 1.4.2.1 2006/01/01 12:50:19 sniper Exp $ */ +/* $Id: php_win32_globals.h,v 1.4.2.1.2.1 2006/11/10 09:56:16 dmitry Exp $ */ #ifndef PHP_WIN32_GLOBALS_H #define PHP_WIN32_GLOBALS_H /* misc globals for thread-safety under win32 */ -#include pwd.h - typedef struct _php_win32_core_globals php_win32_core_globals; #ifdef ZTS @@ -40,12 +38,6 @@ char *log_header; HANDLE log_source; - /* getpwuid */ - struct passwd pwd; - - /* getlogin */ - char *login_name; - /* time */ struct timeval starttime; __int64
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard rand.c
dmitry Fri Nov 10 10:10:39 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard rand.c Log: Faster and better licensed implementation http://cvs.php.net/viewvc.cgi/php-src/ext/standard/rand.c?r1=1.70.2.1r2=1.70.2.1.2.1diff_format=u Index: php-src/ext/standard/rand.c diff -u php-src/ext/standard/rand.c:1.70.2.1 php-src/ext/standard/rand.c:1.70.2.1.2.1 --- php-src/ext/standard/rand.c:1.70.2.1Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/rand.c Fri Nov 10 10:10:38 2006 @@ -17,10 +17,13 @@ | Pedro Melo [EMAIL PROTECTED] | | Sterling Hughes [EMAIL PROTECTED] | | | - | Based on code from: Shawn Cokus [EMAIL PROTECTED] | + | Based on code from: Richard J. Wagner [EMAIL PROTECTED] | + | Makoto Matsumoto [EMAIL PROTECTED] | + | Takuji Nishimura | + | Shawn Cokus [EMAIL PROTECTED] | +--+ */ -/* $Id: rand.c,v 1.70.2.1 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: rand.c,v 1.70.2.1.2.1 2006/11/10 10:10:38 dmitry Exp $ */ #include stdlib.h @@ -85,152 +88,127 @@ /* MT RAND FUNCTIONS */ /* - This is the ``Mersenne Twister'' random number generator MT19937, which - generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) - starting from any odd seed in 0..(2^32 - 1). This version is a recode - by Shawn Cokus ([EMAIL PROTECTED]) on March 8, 1998 of a version by - Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in - July-August 1997). - - Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha - running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to - generate 300 million random numbers; after recoding: 24.0 sec. for the same - (i.e., 46.5% of original time), so speed is now about 12.5 million random - number generations per second on this machine. - - According to the URL http://www.math.keio.ac.jp/~matumoto/emt.html - (and paraphrasing a bit in places), the Mersenne Twister is ``designed - with consideration of the flaws of various existing generators,'' has - a period of 2^19937 - 1, gives a sequence that is 623-dimensionally - equidistributed, and ``has passed many stringent tests, including the - die-hard test of G. Marsaglia and the load test of P. Hellekalek and - S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 - to 5012 bytes of static data, depending on data type sizes, and the code - is quite short as well). It generates random numbers in batches of 624 - at a time, so the caching and pipelining of modern systems is exploited. - It is also divide- and mod-free. - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation (either version 2 of the License or, at your - option, any later version). This library is distributed in the hope that - it will be useful, but WITHOUT ANY WARRANTY, without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - the GNU Library General Public License for more details. You should have - received a copy of the GNU Library General Public License along with this - library; if not, write to the Free Software Foundation, Inc., 59 Temple - Place, Suite 330, Boston, MA 02111-1307, USA. - - The code as Shawn received it included the following notice: - - Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When - you use this, send an e-mail to [EMAIL PROTECTED] with - an appropriate reference to your work. - - It would be nice to CC: [EMAIL PROTECTED] when you write. - - - - php_uint32 must be an unsigned integer type capable of holding at least 32 - bits; exactly 32 should be fastest, but 64 is better on an Alpha with - GCC at -O3 optimization so try your options and see what's best for you + The following php_mt_...() functions are based on a C++ class MTRand by + Richard J. Wagner. For more information see the web page at + http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html + + Mersenne Twister random number generator -- a C++ class MTRand + Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus + Richard J. Wagner v1.0 15 May 2003 [EMAIL PROTECTED] + + The Mersenne Twister is an algorithm for generating random numbers. It + was designed with consideration of the flaws in various other generators. + The period, 2^19937-1, and the order of equidistribution, 623 dimensions, + are far
[PHP-CVS] cvs: php-src /ext/standard rand.c
dmitry Fri Nov 10 10:11:05 2006 UTC Modified files: /php-src/ext/standard rand.c Log: Faster and better licensed implementation http://cvs.php.net/viewvc.cgi/php-src/ext/standard/rand.c?r1=1.72r2=1.73diff_format=u Index: php-src/ext/standard/rand.c diff -u php-src/ext/standard/rand.c:1.72 php-src/ext/standard/rand.c:1.73 --- php-src/ext/standard/rand.c:1.72Fri Oct 6 18:00:13 2006 +++ php-src/ext/standard/rand.c Fri Nov 10 10:11:05 2006 @@ -17,10 +17,13 @@ | Pedro Melo [EMAIL PROTECTED] | | Sterling Hughes [EMAIL PROTECTED] | | | - | Based on code from: Shawn Cokus [EMAIL PROTECTED] | + | Based on code from: Richard J. Wagner [EMAIL PROTECTED] | + | Makoto Matsumoto [EMAIL PROTECTED] | + | Takuji Nishimura | + | Shawn Cokus [EMAIL PROTECTED] | +--+ */ -/* $Id: rand.c,v 1.72 2006/10/06 18:00:13 andrei Exp $ */ +/* $Id: rand.c,v 1.73 2006/11/10 10:11:05 dmitry Exp $ */ #include stdlib.h @@ -85,152 +88,127 @@ /* MT RAND FUNCTIONS */ /* - This is the ``Mersenne Twister'' random number generator MT19937, which - generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) - starting from any odd seed in 0..(2^32 - 1). This version is a recode - by Shawn Cokus ([EMAIL PROTECTED]) on March 8, 1998 of a version by - Takuji Nishimura (who had suggestions from Topher Cooper and Marc Rieffel in - July-August 1997). - - Effectiveness of the recoding (on Goedel2.math.washington.edu, a DEC Alpha - running OSF/1) using GCC -O3 as a compiler: before recoding: 51.6 sec. to - generate 300 million random numbers; after recoding: 24.0 sec. for the same - (i.e., 46.5% of original time), so speed is now about 12.5 million random - number generations per second on this machine. - - According to the URL http://www.math.keio.ac.jp/~matumoto/emt.html - (and paraphrasing a bit in places), the Mersenne Twister is ``designed - with consideration of the flaws of various existing generators,'' has - a period of 2^19937 - 1, gives a sequence that is 623-dimensionally - equidistributed, and ``has passed many stringent tests, including the - die-hard test of G. Marsaglia and the load test of P. Hellekalek and - S. Wegenkittl.'' It is efficient in memory usage (typically using 2506 - to 5012 bytes of static data, depending on data type sizes, and the code - is quite short as well). It generates random numbers in batches of 624 - at a time, so the caching and pipelining of modern systems is exploited. - It is also divide- and mod-free. - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation (either version 2 of the License or, at your - option, any later version). This library is distributed in the hope that - it will be useful, but WITHOUT ANY WARRANTY, without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - the GNU Library General Public License for more details. You should have - received a copy of the GNU Library General Public License along with this - library; if not, write to the Free Software Foundation, Inc., 59 Temple - Place, Suite 330, Boston, MA 02111-1307, USA. - - The code as Shawn received it included the following notice: - - Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. When - you use this, send an e-mail to [EMAIL PROTECTED] with - an appropriate reference to your work. - - It would be nice to CC: [EMAIL PROTECTED] when you write. - - - - php_uint32 must be an unsigned integer type capable of holding at least 32 - bits; exactly 32 should be fastest, but 64 is better on an Alpha with - GCC at -O3 optimization so try your options and see what's best for you + The following php_mt_...() functions are based on a C++ class MTRand by + Richard J. Wagner. For more information see the web page at + http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html + + Mersenne Twister random number generator -- a C++ class MTRand + Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus + Richard J. Wagner v1.0 15 May 2003 [EMAIL PROTECTED] + + The Mersenne Twister is an algorithm for generating random numbers. It + was designed with consideration of the flaws in various other generators. + The period, 2^19937-1, and the order of equidistribution, 623 dimensions, + are far greater. The generator is also fast; it avoids multiplication and
[PHP-CVS] cvs: php-src(PHP_5_2) /win32/build Makefile confutils.js
dmitry Fri Nov 10 10:30:46 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/win32/buildMakefile confutils.js Log: Use $(CC) for linking instead of $(LD). This allows usage of advansed optimization techniques (like Intel's inner-procedure optimization) http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.35.2.1r2=1.35.2.1.2.1diff_format=u Index: php-src/win32/build/Makefile diff -u php-src/win32/build/Makefile:1.35.2.1 php-src/win32/build/Makefile:1.35.2.1.2.1 --- php-src/win32/build/Makefile:1.35.2.1 Sun Jan 1 12:50:20 2006 +++ php-src/win32/build/MakefileFri Nov 10 10:30:46 2006 @@ -14,7 +14,7 @@ # | Author: Wez Furlong [EMAIL PROTECTED] | # +--+ # -# $Id: Makefile,v 1.35.2.1 2006/01/01 12:50:20 sniper Exp $ +# $Id: Makefile,v 1.35.2.1.2.1 2006/11/10 10:30:46 dmitry Exp $ # This is the makefile template for the win32 build CC=$(CL) @@ -61,7 +61,7 @@ win32\build\template.rc $(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES) $(MCFILE) - @$(LD) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) + @$(CC) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /link /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL) http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.60.2.1.2.1r2=1.60.2.1.2.2diff_format=u Index: php-src/win32/build/confutils.js diff -u php-src/win32/build/confutils.js:1.60.2.1.2.1 php-src/win32/build/confutils.js:1.60.2.1.2.2 --- php-src/win32/build/confutils.js:1.60.2.1.2.1 Sun May 7 00:04:56 2006 +++ php-src/win32/build/confutils.jsFri Nov 10 10:30:46 2006 @@ -17,7 +17,7 @@ +--+ */ -// $Id: confutils.js,v 1.60.2.1.2.1 2006/05/07 00:04:56 edink Exp $ +// $Id: confutils.js,v 1.60.2.1.2.2 2006/11/10 10:30:46 dmitry Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -578,7 +578,7 @@ path_to_check += ; + php_usual_lib_suspects; // It is common practice to put libs under one of these dir names - var subdirs = new Array(PHP_DEBUG == yes ? Debug : Release, lib, libs, libexec); + var subdirs = new Array(PHP_DEBUG == yes ? Debug : (PHP_DEBUG_PACK == yes?Release_Dbg:Release), lib, libs, libexec); // libnames can be ; separated list of accepted library names libnames = libnames.split(';'); @@ -665,7 +665,7 @@ var i; var libname; - var subdir = PHP_DEBUG == yes ? Debug : Release; + var subdir = PHP_DEBUG == yes ? Debug : (PHP_DEBUG_PACK == yes?Release_Dbg:Release); libnames = libnames.split(';'); for (i = 0; i libnames.length; i++) { @@ -876,7 +876,7 @@ var SAPI = sapiname.toUpperCase(); var ldflags; var resname; - var ld = @$(LD); + var ld; if (typeof(obj_dir) == undefined) { sapiname_for_printing = configure_module_dirname; @@ -915,7 +915,16 @@ ldflags = $(LDFLAGS); } - MFO.WriteLine(\t + ld + /nologo /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_ + SAPI + ) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname); + if(PHP_VCI = yes || PHP_VCO == yes) { + ldflags += /PGD:$(BUILD_DIR)\\+makefiletarget+.pgd; + } + + if (ld) { + MFO.WriteLine(\t + ld + /nologo /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_ + SAPI + ) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname); + } else { + ld = @$(CC); + MFO.WriteLine(\t + ld + /nologo + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname + /link /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $(LDFLAGS_ + SAPI + )); + } DEFINE('CFLAGS_' + SAPI + '_OBJ', '$(CFLAGS_' + SAPI + ')'); @@ -1031,10 +1040,10 @@ var libname = dllname.substring(0, dllname.length-4) + .lib; var resname = generate_version_info_resource(dllname, configure_module_dirname); - var ld = @$(LD); + var ld = @$(CC); MFO.WriteLine($(BUILD_DIR)\\ + dllname + $(BUILD_DIR)\\ + libname + : $(DEPS_ + EXT + ) $( + EXT + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\ + resname); - MFO.WriteLine(\t + ld + /out:$(BUILD_DIR)\\ + dllname + $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_ + EXT + ) $( + EXT + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB)
[PHP-CVS] cvs: php-src /win32/build Makefile confutils.js
dmitry Fri Nov 10 10:30:56 2006 UTC Modified files: /php-src/win32/buildMakefile confutils.js Log: Use $(CC) for linking instead of $(LD). This allows usage of advansed optimization techniques (like Intel's inner-procedure optimization) http://cvs.php.net/viewvc.cgi/php-src/win32/build/Makefile?r1=1.38r2=1.39diff_format=u Index: php-src/win32/build/Makefile diff -u php-src/win32/build/Makefile:1.38 php-src/win32/build/Makefile:1.39 --- php-src/win32/build/Makefile:1.38 Sat Jul 22 13:13:18 2006 +++ php-src/win32/build/MakefileFri Nov 10 10:30:56 2006 @@ -14,7 +14,7 @@ # | Author: Wez Furlong [EMAIL PROTECTED] | # +--+ # -# $Id: Makefile,v 1.38 2006/07/22 13:13:18 rrichards Exp $ +# $Id: Makefile,v 1.39 2006/11/10 10:30:56 dmitry Exp $ # This is the makefile template for the win32 build CC=$(CL) @@ -61,7 +61,7 @@ win32\build\template.rc $(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES) $(MCFILE) - @$(LD) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) + @$(CC) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /link /out:$(BUILD_DIR)\$(PHPDLL) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS) $(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL) http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.62r2=1.63diff_format=u Index: php-src/win32/build/confutils.js diff -u php-src/win32/build/confutils.js:1.62 php-src/win32/build/confutils.js:1.63 --- php-src/win32/build/confutils.js:1.62 Sun May 7 00:07:53 2006 +++ php-src/win32/build/confutils.jsFri Nov 10 10:30:56 2006 @@ -17,7 +17,7 @@ +--+ */ -// $Id: confutils.js,v 1.62 2006/05/07 00:07:53 edink Exp $ +// $Id: confutils.js,v 1.63 2006/11/10 10:30:56 dmitry Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -578,7 +578,7 @@ path_to_check += ; + php_usual_lib_suspects; // It is common practice to put libs under one of these dir names - var subdirs = new Array(PHP_DEBUG == yes ? Debug : Release, lib, libs, libexec); + var subdirs = new Array(PHP_DEBUG == yes ? Debug : (PHP_DEBUG_PACK == yes?Release_Dbg:Release), lib, libs, libexec); // libnames can be ; separated list of accepted library names libnames = libnames.split(';'); @@ -665,7 +665,7 @@ var i; var libname; - var subdir = PHP_DEBUG == yes ? Debug : Release; + var subdir = PHP_DEBUG == yes ? Debug : (PHP_DEBUG_PACK == yes?Release_Dbg:Release); libnames = libnames.split(';'); for (i = 0; i libnames.length; i++) { @@ -876,7 +876,7 @@ var SAPI = sapiname.toUpperCase(); var ldflags; var resname; - var ld = @$(LD); + var ld; if (typeof(obj_dir) == undefined) { sapiname_for_printing = configure_module_dirname; @@ -915,7 +915,16 @@ ldflags = $(LDFLAGS); } - MFO.WriteLine(\t + ld + /nologo /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_ + SAPI + ) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname); + if(PHP_VCI = yes || PHP_VCO == yes) { + ldflags += /PGD:$(BUILD_DIR)\\+makefiletarget+.pgd; + } + + if (ld) { + MFO.WriteLine(\t + ld + /nologo /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_ + SAPI + ) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname); + } else { + ld = @$(CC); + MFO.WriteLine(\t + ld + /nologo + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname + /link /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $(LDFLAGS_ + SAPI + )); + } DEFINE('CFLAGS_' + SAPI + '_OBJ', '$(CFLAGS_' + SAPI + ')'); @@ -1031,10 +1040,10 @@ var libname = dllname.substring(0, dllname.length-4) + .lib; var resname = generate_version_info_resource(dllname, configure_module_dirname); - var ld = @$(LD); + var ld = @$(CC); MFO.WriteLine($(BUILD_DIR)\\ + dllname + $(BUILD_DIR)\\ + libname + : $(DEPS_ + EXT + ) $( + EXT + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(BUILD_DIR)\\ + resname); - MFO.WriteLine(\t + ld + /out:$(BUILD_DIR)\\ + dllname + $(DLL_LDFLAGS) $(LDFLAGS) $(LDFLAGS_ + EXT + ) $( + EXT + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LIBS_ + EXT + ) $(LIBS) $(BUILD_DIR)\\ + resname); + MFO.WriteLine(\t + ld + $( + EXT +
[PHP-CVS] cvs: php-src /win32/build confutils.js
dmitry Fri Nov 10 10:38:23 2006 UTC Modified files: /php-src/win32/buildconfutils.js Log: Fix warnings http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.63r2=1.64diff_format=u Index: php-src/win32/build/confutils.js diff -u php-src/win32/build/confutils.js:1.63 php-src/win32/build/confutils.js:1.64 --- php-src/win32/build/confutils.js:1.63 Fri Nov 10 10:30:56 2006 +++ php-src/win32/build/confutils.jsFri Nov 10 10:38:23 2006 @@ -17,7 +17,7 @@ +--+ */ -// $Id: confutils.js,v 1.63 2006/11/10 10:30:56 dmitry Exp $ +// $Id: confutils.js,v 1.64 2006/11/10 10:38:23 dmitry Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -915,10 +915,6 @@ ldflags = $(LDFLAGS); } - if(PHP_VCI = yes || PHP_VCO == yes) { - ldflags += /PGD:$(BUILD_DIR)\\+makefiletarget+.pgd; - } - if (ld) { MFO.WriteLine(\t + ld + /nologo /out:$(BUILD_DIR)\\ + makefiletarget + + ldflags + $( + SAPI + _GLOBAL_OBJS) $(BUILD_DIR)\\$(PHPLIB) $(LDFLAGS_ + SAPI + ) $(LIBS_ + SAPI + ) $(BUILD_DIR)\\ + resname); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
dmitry Fri Nov 10 10:47:52 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: typo http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.344r2=1.2027.2.547.2.345diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.344 php-src/NEWS:1.2027.2.547.2.345 --- php-src/NEWS:1.2027.2.547.2.344 Fri Nov 10 10:44:40 2006 +++ php-src/NEWSFri Nov 10 10:47:52 2006 @@ -1,7 +1,7 @@ PHPNEWS ||| ?? ??? 2007, PHP 5.2.1 -- Zend Memory Manager Improvementds (Dmitry) +- Zend Memory Manager Improvements (Dmitry) . use HeapAlloc() instead of VirtualAlloc() . use win32 storage manager (instead of malloc) on Windows by default - Zip Extension Improvements (Pierre) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /main fopen_wrappers.c /main/streams plain_wrapper.c
dmitry Fri Nov 10 10:55:27 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/main fopen_wrappers.c /php-src/main/streams plain_wrapper.c Log: Removed unnecessary checks for ISREG file and corresponding stat() calls on Windows http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.345r2=1.2027.2.547.2.346diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.345 php-src/NEWS:1.2027.2.547.2.346 --- php-src/NEWS:1.2027.2.547.2.345 Fri Nov 10 10:47:52 2006 +++ php-src/NEWSFri Nov 10 10:55:26 2006 @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 2007, PHP 5.2.1 +- Windows related optimizations (Dmitry, Stas) + . removed unnecessary checks for ISREG file and corresponding stat() calls - Zend Memory Manager Improvements (Dmitry) . use HeapAlloc() instead of VirtualAlloc() . use win32 storage manager (instead of malloc) on Windows by default http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.3.2.2r2=1.175.2.3.2.3diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.175.2.3.2.2 php-src/main/fopen_wrappers.c:1.175.2.3.2.3 --- php-src/main/fopen_wrappers.c:1.175.2.3.2.2 Fri Nov 10 09:56:16 2006 +++ php-src/main/fopen_wrappers.c Fri Nov 10 10:55:26 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fopen_wrappers.c,v 1.175.2.3.2.2 2006/11/10 09:56:16 dmitry Exp $ */ +/* $Id: fopen_wrappers.c,v 1.175.2.3.2.3 2006/11/10 10:55:26 dmitry Exp $ */ /* {{{ includes */ @@ -255,7 +255,9 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC) { FILE *fp; +#ifndef PHP_WIN32 struct stat st; +#endif char *path_info, *filename; int length; @@ -321,11 +323,14 @@ } fp = VCWD_FOPEN(filename, rb); +#ifndef PHP_WIN32 /* refuse to open anything that is not a regular file */ if (fp (0 fstat(fileno(fp), st) || !S_ISREG(st.st_mode))) { fclose(fp); fp = NULL; } +#endif + if (!fp) { STR_FREE(SG(request_info).path_translated); /* for same reason as above */ SG(request_info).path_translated = NULL; http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.8r2=1.52.2.6.2.9diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.8 php-src/main/streams/plain_wrapper.c:1.52.2.6.2.9 --- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.8 Thu Oct 19 09:49:44 2006 +++ php-src/main/streams/plain_wrapper.cFri Nov 10 10:55:26 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.52.2.6.2.8 2006/10/19 09:49:44 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.52.2.6.2.9 2006/11/10 10:55:26 dmitry Exp $ */ #include php.h #include php_globals.h @@ -891,6 +891,8 @@ efree(persistent_id); } + /* WIN32 always set ISREG flag */ +#ifndef PHP_WIN32 /* sanity checks for include/require. * We check these after opening the stream, so that we save * on fstat() syscalls */ @@ -899,15 +901,12 @@ int r; r = do_fstat(self, 0); - if ( -#ifndef PHP_WIN32 - (r != 0) || /* it is OK for fstat to fail under win32 */ -#endif - (r == 0 !S_ISREG(self-sb.st_mode))) { + if ((r == 0 !S_ISREG(self-sb.st_mode))) { php_stream_close(ret); return NULL; } } +#endif return ret; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main fopen_wrappers.c /main/streams plain_wrapper.c
dmitry Fri Nov 10 10:55:43 2006 UTC Modified files: /php-src/main fopen_wrappers.c /php-src/main/streams plain_wrapper.c Log: Removed unnecessary checks for ISREG file and corresponding stat() calls on Wind ows http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.185r2=1.186diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.185 php-src/main/fopen_wrappers.c:1.186 --- php-src/main/fopen_wrappers.c:1.185 Fri Nov 10 09:56:37 2006 +++ php-src/main/fopen_wrappers.c Fri Nov 10 10:55:43 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fopen_wrappers.c,v 1.185 2006/11/10 09:56:37 dmitry Exp $ */ +/* $Id: fopen_wrappers.c,v 1.186 2006/11/10 10:55:43 dmitry Exp $ */ /* {{{ includes */ @@ -263,7 +263,9 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC) { FILE *fp; +#ifndef PHP_WIN32 struct stat st; +#endif char *path_info, *filename; int length; @@ -329,11 +331,14 @@ } fp = VCWD_FOPEN(filename, rb); +#ifndef PHP_WIN32 /* refuse to open anything that is not a regular file */ if (fp (0 fstat(fileno(fp), st) || !S_ISREG(st.st_mode))) { fclose(fp); fp = NULL; } +#endif + if (!fp) { STR_FREE(SG(request_info).path_translated); /* for same reason as above */ SG(request_info).path_translated = NULL; http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.74r2=1.75diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.74 php-src/main/streams/plain_wrapper.c:1.75 --- php-src/main/streams/plain_wrapper.c:1.74 Thu Oct 19 09:49:56 2006 +++ php-src/main/streams/plain_wrapper.cFri Nov 10 10:55:43 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.74 2006/10/19 09:49:56 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.75 2006/11/10 10:55:43 dmitry Exp $ */ #include php.h #include php_globals.h @@ -891,6 +891,8 @@ efree(persistent_id); } + /* WIN32 always set ISREG flag */ +#ifndef PHP_WIN32 /* sanity checks for include/require. * We check these after opening the stream, so that we save * on fstat() syscalls */ @@ -899,15 +901,12 @@ int r; r = do_fstat(self, 0); - if ( -#ifndef PHP_WIN32 - (r != 0) || /* it is OK for fstat to fail under win32 */ -#endif - (r == 0 !S_ISREG(self-sb.st_mode))) { + if ((r == 0 !S_ISREG(self-sb.st_mode))) { php_stream_close(ret); return NULL; } } +#endif return ret; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /main reentrancy.c /win32 readdir.c readdir.h TSRM readdir.h
dmitry Fri Nov 10 11:20:48 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/win32 readdir.c readdir.h /TSRM readdir.h /php-src/main reentrancy.c Log: opendir() is reimplemented using GetFistFile/GetNextFile those are faster then _findfirst/_findnext http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.346r2=1.2027.2.547.2.347diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.346 php-src/NEWS:1.2027.2.547.2.347 --- php-src/NEWS:1.2027.2.547.2.346 Fri Nov 10 10:55:26 2006 +++ php-src/NEWSFri Nov 10 11:20:47 2006 @@ -3,6 +3,8 @@ ?? ??? 2007, PHP 5.2.1 - Windows related optimizations (Dmitry, Stas) . removed unnecessary checks for ISREG file and corresponding stat() calls + . opendir() is reimplemented using GetFistFile/GetNextFile those are faster +then _findfirst/_findnext - Zend Memory Manager Improvements (Dmitry) . use HeapAlloc() instead of VirtualAlloc() . use win32 storage manager (instead of malloc) on Windows by default http://cvs.php.net/viewvc.cgi/php-src/win32/readdir.c?r1=1.11r2=1.11.6.1diff_format=u Index: php-src/win32/readdir.c diff -u php-src/win32/readdir.c:1.11 php-src/win32/readdir.c:1.11.6.1 --- php-src/win32/readdir.c:1.11Wed Jun 9 14:18:14 2004 +++ php-src/win32/readdir.c Fri Nov 10 11:20:47 2006 @@ -2,8 +2,8 @@ #include string.h #include errno.h -#include readdir.h #include php.h +#include readdir.h /** * Implement dirent-style opendir/readdir/rewinddir/closedir on Win32 @@ -23,14 +23,14 @@ { DIR *dp; char *filespec; - long handle; + HANDLE handle; int index; - filespec = malloc(strlen(dir) + 2 + 1); + filespec = (char *)malloc(strlen(dir) + 2 + 1); strcpy(filespec, dir); index = strlen(filespec) - 1; if (index = 0 (filespec[index] == '/' || - (filespec[index] == '\\' !IsDBCSLeadByte(filespec[index-1] + (filespec[index] == '\\' (index == 0 || !IsDBCSLeadByte(filespec[index-1]) filespec[index] = '\0'; strcat(filespec, /*); @@ -38,8 +38,9 @@ dp-offset = 0; dp-finished = 0; - if ((handle = _findfirst(filespec, (dp-fileinfo))) 0) { - if (errno == ENOENT) { + if ((handle = FindFirstFile(filespec, (dp-fileinfo))) == INVALID_HANDLE_VALUE) { + DWORD err = GetLastError(); + if (err == ERROR_NO_MORE_FILES) { dp-finished = 1; } else { free(dp); @@ -60,14 +61,14 @@ return NULL; if (dp-offset != 0) { - if (_findnext(dp-handle, (dp-fileinfo)) 0) { + if (FindNextFile(dp-handle, (dp-fileinfo)) == 0) { dp-finished = 1; return NULL; } } dp-offset++; - strlcpy(dp-dent.d_name, dp-fileinfo.name, _MAX_FNAME+1); + strlcpy(dp-dent.d_name, dp-fileinfo.cFileName, _MAX_FNAME+1); dp-dent.d_ino = 1; dp-dent.d_reclen = strlen(dp-dent.d_name); dp-dent.d_off = dp-offset; @@ -83,7 +84,7 @@ } if (dp-offset != 0) { - if (_findnext(dp-handle, (dp-fileinfo)) 0) { + if (FindNextFile(dp-handle, (dp-fileinfo)) == 0) { dp-finished = 1; *result = NULL; return 0; @@ -91,7 +92,7 @@ } dp-offset++; - strlcpy(dp-dent.d_name, dp-fileinfo.name, _MAX_FNAME+1); + strlcpy(dp-dent.d_name, dp-fileinfo.cFileName, _MAX_FNAME+1); dp-dent.d_ino = 1; dp-dent.d_reclen = strlen(dp-dent.d_name); dp-dent.d_off = dp-offset; @@ -107,7 +108,7 @@ { if (!dp) return 0; - _findclose(dp-handle); + FindClose(dp-handle); if (dp-dir) free(dp-dir); if (dp) @@ -120,27 +121,28 @@ { /* Re-set to the beginning */ char *filespec; - long handle; + HANDLE handle; int index; - _findclose(dp-handle); + FindClose(dp-handle); dp-offset = 0; dp-finished = 0; - filespec = malloc(strlen(dp-dir) + 2 + 1); + filespec = (char *)malloc(strlen(dp-dir) + 2 + 1); strcpy(filespec, dp-dir); index = strlen(filespec) - 1; - if (index = 0 (filespec[index] == '/' || filespec[index] == '\\')) + if (index = 0 (filespec[index] == '/' || + (filespec[index] == '\\' (index == 0 || !IsDBCSLeadByte(filespec[index-1]) filespec[index] = '\0'; strcat(filespec, /*); - if ((handle = _findfirst(filespec, (dp-fileinfo))) 0) { - if (errno == ENOENT) - dp-finished = 1; - } + if
[PHP-CVS] cvs: php-src /main reentrancy.c /win32 readdir.c readdir.h TSRM readdir.h
dmitry Fri Nov 10 11:20:58 2006 UTC Modified files: /php-src/win32 readdir.c readdir.h /TSRM readdir.h /php-src/main reentrancy.c Log: opendir() is reimplemented using GetFistFile/GetNextFile those are faster then _findfirst/_findnext http://cvs.php.net/viewvc.cgi/php-src/win32/readdir.c?r1=1.11r2=1.12diff_format=u Index: php-src/win32/readdir.c diff -u php-src/win32/readdir.c:1.11 php-src/win32/readdir.c:1.12 --- php-src/win32/readdir.c:1.11Wed Jun 9 14:18:14 2004 +++ php-src/win32/readdir.c Fri Nov 10 11:20:58 2006 @@ -2,8 +2,8 @@ #include string.h #include errno.h -#include readdir.h #include php.h +#include readdir.h /** * Implement dirent-style opendir/readdir/rewinddir/closedir on Win32 @@ -23,14 +23,14 @@ { DIR *dp; char *filespec; - long handle; + HANDLE handle; int index; - filespec = malloc(strlen(dir) + 2 + 1); + filespec = (char *)malloc(strlen(dir) + 2 + 1); strcpy(filespec, dir); index = strlen(filespec) - 1; if (index = 0 (filespec[index] == '/' || - (filespec[index] == '\\' !IsDBCSLeadByte(filespec[index-1] + (filespec[index] == '\\' (index == 0 || !IsDBCSLeadByte(filespec[index-1]) filespec[index] = '\0'; strcat(filespec, /*); @@ -38,8 +38,9 @@ dp-offset = 0; dp-finished = 0; - if ((handle = _findfirst(filespec, (dp-fileinfo))) 0) { - if (errno == ENOENT) { + if ((handle = FindFirstFile(filespec, (dp-fileinfo))) == INVALID_HANDLE_VALUE) { + DWORD err = GetLastError(); + if (err == ERROR_NO_MORE_FILES) { dp-finished = 1; } else { free(dp); @@ -60,14 +61,14 @@ return NULL; if (dp-offset != 0) { - if (_findnext(dp-handle, (dp-fileinfo)) 0) { + if (FindNextFile(dp-handle, (dp-fileinfo)) == 0) { dp-finished = 1; return NULL; } } dp-offset++; - strlcpy(dp-dent.d_name, dp-fileinfo.name, _MAX_FNAME+1); + strlcpy(dp-dent.d_name, dp-fileinfo.cFileName, _MAX_FNAME+1); dp-dent.d_ino = 1; dp-dent.d_reclen = strlen(dp-dent.d_name); dp-dent.d_off = dp-offset; @@ -83,7 +84,7 @@ } if (dp-offset != 0) { - if (_findnext(dp-handle, (dp-fileinfo)) 0) { + if (FindNextFile(dp-handle, (dp-fileinfo)) == 0) { dp-finished = 1; *result = NULL; return 0; @@ -91,7 +92,7 @@ } dp-offset++; - strlcpy(dp-dent.d_name, dp-fileinfo.name, _MAX_FNAME+1); + strlcpy(dp-dent.d_name, dp-fileinfo.cFileName, _MAX_FNAME+1); dp-dent.d_ino = 1; dp-dent.d_reclen = strlen(dp-dent.d_name); dp-dent.d_off = dp-offset; @@ -107,7 +108,7 @@ { if (!dp) return 0; - _findclose(dp-handle); + FindClose(dp-handle); if (dp-dir) free(dp-dir); if (dp) @@ -120,27 +121,28 @@ { /* Re-set to the beginning */ char *filespec; - long handle; + HANDLE handle; int index; - _findclose(dp-handle); + FindClose(dp-handle); dp-offset = 0; dp-finished = 0; - filespec = malloc(strlen(dp-dir) + 2 + 1); + filespec = (char *)malloc(strlen(dp-dir) + 2 + 1); strcpy(filespec, dp-dir); index = strlen(filespec) - 1; - if (index = 0 (filespec[index] == '/' || filespec[index] == '\\')) + if (index = 0 (filespec[index] == '/' || + (filespec[index] == '\\' (index == 0 || !IsDBCSLeadByte(filespec[index-1]) filespec[index] = '\0'; strcat(filespec, /*); - if ((handle = _findfirst(filespec, (dp-fileinfo))) 0) { - if (errno == ENOENT) - dp-finished = 1; - } + if ((handle = FindFirstFile(filespec, (dp-fileinfo))) == INVALID_HANDLE_VALUE) { + dp-finished = 1; + } + dp-handle = handle; free(filespec); -return 0; + return 0; } http://cvs.php.net/viewvc.cgi/php-src/win32/readdir.h?r1=1.8r2=1.9diff_format=u Index: php-src/win32/readdir.h diff -u php-src/win32/readdir.h:1.8 php-src/win32/readdir.h:1.9 --- php-src/win32/readdir.h:1.8 Mon Jan 27 20:39:30 2003 +++ php-src/win32/readdir.h Fri Nov 10 11:20:58 2006 @@ -7,11 +7,15 @@ * on Windows 95/NT. */ +#define _WIN32_WINNT 0x0400 + +#include windows.h + #include io.h #include stdio.h #include stdlib.h #include sys/types.h - +#include direct.h /* struct dirent - same as Unix */ @@ -25,10 +29,10 @@ /* typedef DIR - not the same
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c /main main.c /win32 globals.c php_win32_globals.h registry.c
dmitry Fri Nov 10 11:42:08 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/win32 globals.c php_win32_globals.h registry.c /php-src/main main.c /php-src/ext/standard basic_functions.c Log: Implemented registry cache that prevent registry lookup on each request. In case of modification of corresponding registry-tree PHP will reload it automatic. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.347r2=1.2027.2.547.2.348diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.347 php-src/NEWS:1.2027.2.547.2.348 --- php-src/NEWS:1.2027.2.547.2.347 Fri Nov 10 11:20:47 2006 +++ php-src/NEWSFri Nov 10 11:42:07 2006 @@ -5,6 +5,9 @@ . removed unnecessary checks for ISREG file and corresponding stat() calls . opendir() is reimplemented using GetFistFile/GetNextFile those are faster then _findfirst/_findnext + . implemented registry cache that prevent registry lookup on each request. +In case of modification of corresponding registry-tree PHP will reload +it automatic - Zend Memory Manager Improvements (Dmitry) . use HeapAlloc() instead of VirtualAlloc() . use win32 storage manager (instead of malloc) on Windows by default http://cvs.php.net/viewvc.cgi/php-src/win32/globals.c?r1=1.5.2.1.2.1r2=1.5.2.1.2.2diff_format=u Index: php-src/win32/globals.c diff -u php-src/win32/globals.c:1.5.2.1.2.1 php-src/win32/globals.c:1.5.2.1.2.2 --- php-src/win32/globals.c:1.5.2.1.2.1 Fri Nov 10 09:56:16 2006 +++ php-src/win32/globals.c Fri Nov 10 11:42:07 2006 @@ -16,10 +16,11 @@ +--+ */ -/* $Id: globals.c,v 1.5.2.1.2.1 2006/11/10 09:56:16 dmitry Exp $ */ +/* $Id: globals.c,v 1.5.2.1.2.2 2006/11/10 11:42:07 dmitry Exp $ */ #include php.h #include php_win32_globals.h +#include syslog.h #ifdef ZTS PHPAPI int php_win32_core_globals_id; @@ -33,6 +34,26 @@ memset(wg, 0, sizeof(*wg)); } +void php_win32_core_globals_dtor(void *vg TSRMLS_DC) +{ + php_win32_core_globals *wg = (php_win32_core_globals*)vg; + + if (wg-registry_key) { + RegCloseKey(wg-registry_key); + wg-registry_key = NULL; + } + if (wg-registry_event) { + CloseHandle(wg-registry_event); + wg-registry_event = NULL; + } + if (wg-registry_directories) { + zend_hash_destroy(wg-registry_directories); + free(wg-registry_directories); + wg-registry_directories = NULL; + } +} + + PHP_RSHUTDOWN_FUNCTION(win32_core_globals) { php_win32_core_globals *wg = @@ -43,7 +64,10 @@ #endif ; - memset(wg, 0, sizeof(*wg)); + closelog(); + wg-starttime.tv_sec = 0; + wg-lasttime = 0; + return SUCCESS; } http://cvs.php.net/viewvc.cgi/php-src/win32/php_win32_globals.h?r1=1.4.2.1.2.1r2=1.4.2.1.2.2diff_format=u Index: php-src/win32/php_win32_globals.h diff -u php-src/win32/php_win32_globals.h:1.4.2.1.2.1 php-src/win32/php_win32_globals.h:1.4.2.1.2.2 --- php-src/win32/php_win32_globals.h:1.4.2.1.2.1 Fri Nov 10 09:56:16 2006 +++ php-src/win32/php_win32_globals.h Fri Nov 10 11:42:07 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_win32_globals.h,v 1.4.2.1.2.1 2006/11/10 09:56:16 dmitry Exp $ */ +/* $Id: php_win32_globals.h,v 1.4.2.1.2.2 2006/11/10 11:42:07 dmitry Exp $ */ #ifndef PHP_WIN32_GLOBALS_H #define PHP_WIN32_GLOBALS_H @@ -41,9 +41,14 @@ /* time */ struct timeval starttime; __int64 lasttime, freq; + + HKEY registry_key; + HANDLE registry_event; + HashTable *registry_directories; }; void php_win32_core_globals_ctor(void *vg TSRMLS_DC); +void php_win32_core_globals_dtor(void *vg TSRMLS_DC); PHP_RSHUTDOWN_FUNCTION(win32_core_globals); #endif http://cvs.php.net/viewvc.cgi/php-src/win32/registry.c?r1=1.16.4.1r2=1.16.4.2diff_format=u Index: php-src/win32/registry.c diff -u php-src/win32/registry.c:1.16.4.1 php-src/win32/registry.c:1.16.4.2 --- php-src/win32/registry.c:1.16.4.1 Thu Aug 3 13:54:05 2006 +++ php-src/win32/registry.cFri Nov 10 11:42:07 2006 @@ -1,5 +1,6 @@ #include php.h #include php_ini.h +#include php_win32_globals.h #define PHP_REGISTRY_KEY SOFTWARE\\PHP @@ -56,13 +57,135 @@ return 0; } +static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_len, HashTable *parent_ht) +{ + DWORD keys, values, max_key, max_name, max_value; + int ret = 0; + HashTable *ht = NULL; + + if (RegQueryInfoKey(key, NULL, NULL, NULL, keys, max_key, NULL, values, max_name, max_value, NULL, NULL) == ERROR_SUCCESS) { + + if (values) { + DWORD i; + char *name
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c /main main.c /win32 globals.c php_win32_globals.h registry.c
dmitry Fri Nov 10 11:42:40 2006 UTC Modified files: /php-src/win32 globals.c php_win32_globals.h registry.c /php-src/main main.c /php-src/ext/standard basic_functions.c Log: Implemented registry cache that prevent registry lookup on each request. In case of modification of corresponding registry-tree PHP will reload it automatic. http://cvs.php.net/viewvc.cgi/php-src/win32/globals.c?r1=1.7r2=1.8diff_format=u Index: php-src/win32/globals.c diff -u php-src/win32/globals.c:1.7 php-src/win32/globals.c:1.8 --- php-src/win32/globals.c:1.7 Fri Nov 10 09:56:37 2006 +++ php-src/win32/globals.c Fri Nov 10 11:42:40 2006 @@ -16,10 +16,11 @@ +--+ */ -/* $Id: globals.c,v 1.7 2006/11/10 09:56:37 dmitry Exp $ */ +/* $Id: globals.c,v 1.8 2006/11/10 11:42:40 dmitry Exp $ */ #include php.h #include php_win32_globals.h +#include syslog.h #ifdef ZTS PHPAPI int php_win32_core_globals_id; @@ -33,6 +34,26 @@ memset(wg, 0, sizeof(*wg)); } +void php_win32_core_globals_dtor(void *vg TSRMLS_DC) +{ + php_win32_core_globals *wg = (php_win32_core_globals*)vg; + + if (wg-registry_key) { + RegCloseKey(wg-registry_key); + wg-registry_key = NULL; + } + if (wg-registry_event) { + CloseHandle(wg-registry_event); + wg-registry_event = NULL; + } + if (wg-registry_directories) { + zend_hash_destroy(wg-registry_directories); + free(wg-registry_directories); + wg-registry_directories = NULL; + } +} + + PHP_RSHUTDOWN_FUNCTION(win32_core_globals) { php_win32_core_globals *wg = @@ -43,7 +64,10 @@ #endif ; - memset(wg, 0, sizeof(*wg)); + closelog(); + wg-starttime.tv_sec = 0; + wg-lasttime = 0; + return SUCCESS; } http://cvs.php.net/viewvc.cgi/php-src/win32/php_win32_globals.h?r1=1.6r2=1.7diff_format=u Index: php-src/win32/php_win32_globals.h diff -u php-src/win32/php_win32_globals.h:1.6 php-src/win32/php_win32_globals.h:1.7 --- php-src/win32/php_win32_globals.h:1.6 Fri Nov 10 09:56:37 2006 +++ php-src/win32/php_win32_globals.h Fri Nov 10 11:42:40 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_win32_globals.h,v 1.6 2006/11/10 09:56:37 dmitry Exp $ */ +/* $Id: php_win32_globals.h,v 1.7 2006/11/10 11:42:40 dmitry Exp $ */ #ifndef PHP_WIN32_GLOBALS_H #define PHP_WIN32_GLOBALS_H @@ -41,9 +41,14 @@ /* time */ struct timeval starttime; __int64 lasttime, freq; + + HKEY registry_key; + HANDLE registry_event; + HashTable *registry_directories; }; void php_win32_core_globals_ctor(void *vg TSRMLS_DC); +void php_win32_core_globals_dtor(void *vg TSRMLS_DC); PHP_RSHUTDOWN_FUNCTION(win32_core_globals); #endif http://cvs.php.net/viewvc.cgi/php-src/win32/registry.c?r1=1.17r2=1.18diff_format=u Index: php-src/win32/registry.c diff -u php-src/win32/registry.c:1.17 php-src/win32/registry.c:1.18 --- php-src/win32/registry.c:1.17 Thu Aug 3 13:54:20 2006 +++ php-src/win32/registry.cFri Nov 10 11:42:40 2006 @@ -1,5 +1,6 @@ #include php.h #include php_ini.h +#include php_win32_globals.h #define PHP_REGISTRY_KEY SOFTWARE\\PHP @@ -56,13 +57,135 @@ return 0; } +static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_len, HashTable *parent_ht) +{ + DWORD keys, values, max_key, max_name, max_value; + int ret = 0; + HashTable *ht = NULL; + + if (RegQueryInfoKey(key, NULL, NULL, NULL, keys, max_key, NULL, values, max_name, max_value, NULL, NULL) == ERROR_SUCCESS) { + + if (values) { + DWORD i; + char *name = (char*)emalloc(max_name+1); + char *value = (char*)emalloc(max_value+1); + DWORD name_len, type, value_len; + zval *data; + + for (i = 0; i values; i++) { + name_len = max_name+1; + value_len = max_value+1; + if (RegEnumValue(key, i, name, name_len, NULL, type, value, value_len) == ERROR_SUCCESS) { + if ((type == REG_SZ) || (type == REG_EXPAND_SZ)) { + if (!ht) { + ht = (HashTable*)malloc(sizeof(HashTable)); + zend_hash_init(ht, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1); + } + data = (zval*)malloc(sizeof(zval)); +
[PHP-CVS] cvs: php-src /ext/standard string.c
andrei Fri Nov 10 12:01:50 2006 UTC Modified files: /php-src/ext/standard string.c Log: Allow mixing Unicode/binary string types. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.609r2=1.610diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.609 php-src/ext/standard/string.c:1.610 --- php-src/ext/standard/string.c:1.609 Wed Oct 11 14:30:50 2006 +++ php-src/ext/standard/string.c Fri Nov 10 12:01:50 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.609 2006/10/11 14:30:50 iliaa Exp $ */ +/* $Id: string.c,v 1.610 2006/11/10 12:01:50 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1179,26 +1179,12 @@ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **)tmp, pos) == SUCCESS) { if (Z_TYPE_PP(tmp) != return_type) { if (return_type == IS_UNICODE) { - if (Z_TYPE_PP(tmp) == IS_STRING) { - /* ERROR */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, - Cannot mix binary strings with other string types); - efree(Z_USTRVAL_P(retval)); - ZVAL_FALSE(retval); - return; - } else { + if (Z_TYPE_PP(tmp) != IS_UNICODE) { SEPARATE_ZVAL(tmp); convert_to_unicode_ex(tmp); } } else if (return_type == IS_STRING) { - if (Z_TYPE_PP(tmp) == IS_UNICODE) { - /* ERROR */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, - Cannot mix binary strings with other string types); - efree(Z_STRVAL_P(retval)); - ZVAL_FALSE(retval); - return; - } else { + if (Z_TYPE_PP(tmp) != IS_STRING) { SEPARATE_ZVAL(tmp); convert_to_string_ex(tmp); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/bcmath bcmath.c php_bcmath.h
dmitry Fri Nov 10 12:02:10 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/bcmath bcmath.c php_bcmath.h Log: Intialization code is moved from request startup to module startup http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.349r2=1.2027.2.547.2.350diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.349 php-src/NEWS:1.2027.2.547.2.350 --- php-src/NEWS:1.2027.2.547.2.349 Fri Nov 10 11:49:35 2006 +++ php-src/NEWSFri Nov 10 12:02:09 2006 @@ -9,6 +9,8 @@ In case of modification of corresponding registry-tree PHP will reload it automatic . start timiout thread only if necessary +- ext/bcmath intialization code is moved from request startup to module + startup. (Dmitry) - Zend Memory Manager Improvements (Dmitry) . use HeapAlloc() instead of VirtualAlloc() . use win32 storage manager (instead of malloc) on Windows by default http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.62.2.2.2.3r2=1.62.2.2.2.4diff_format=u Index: php-src/ext/bcmath/bcmath.c diff -u php-src/ext/bcmath/bcmath.c:1.62.2.2.2.3 php-src/ext/bcmath/bcmath.c:1.62.2.2.2.4 --- php-src/ext/bcmath/bcmath.c:1.62.2.2.2.3Fri Nov 3 14:46:48 2006 +++ php-src/ext/bcmath/bcmath.c Fri Nov 10 12:02:10 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bcmath.c,v 1.62.2.2.2.3 2006/11/03 14:46:48 bjori Exp $ */ +/* $Id: bcmath.c,v 1.62.2.2.2.4 2006/11/10 12:02:10 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -33,6 +33,7 @@ ZEND_DECLARE_MODULE_GLOBALS(bcmath); static PHP_GINIT_FUNCTION(bcmath); +static PHP_GSHUTDOWN_FUNCTION(bcmath); /* {{{ arginfo */ static @@ -124,13 +125,13 @@ bcmath_functions, PHP_MINIT(bcmath), PHP_MSHUTDOWN(bcmath), - PHP_RINIT(bcmath), - PHP_RSHUTDOWN(bcmath), + NULL, + NULL, PHP_MINFO(bcmath), NO_VERSION_YET, PHP_MODULE_GLOBALS(bcmath), PHP_GINIT(bcmath), - NULL, +PHP_GSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES_EX }; @@ -150,6 +151,17 @@ static PHP_GINIT_FUNCTION(bcmath) { bcmath_globals-bc_precision = 0; + bc_init_numbers(TSRMLS_C); +} +/* }}} */ + +/* {{{ PHP_GSHUTDOWN_FUNCTION + */ +static PHP_GSHUTDOWN_FUNCTION(bcmath) +{ + _bc_free_num_ex(bcmath_globals-_zero_, 1); + _bc_free_num_ex(bcmath_globals-_one_, 1); + _bc_free_num_ex(bcmath_globals-_two_, 1); } /* }}} */ @@ -173,28 +185,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(bcmath) -{ - bc_init_numbers(TSRMLS_C); - - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_RSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(bcmath) -{ - _bc_free_num_ex(BCG(_zero_), 1); - _bc_free_num_ex(BCG(_one_), 1); - _bc_free_num_ex(BCG(_two_), 1); - - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(bcmath) http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/php_bcmath.h?r1=1.20.2.1r2=1.20.2.1.2.1diff_format=u Index: php-src/ext/bcmath/php_bcmath.h diff -u php-src/ext/bcmath/php_bcmath.h:1.20.2.1 php-src/ext/bcmath/php_bcmath.h:1.20.2.1.2.1 --- php-src/ext/bcmath/php_bcmath.h:1.20.2.1Sun Jan 1 12:50:00 2006 +++ php-src/ext/bcmath/php_bcmath.h Fri Nov 10 12:02:10 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_bcmath.h,v 1.20.2.1 2006/01/01 12:50:00 sniper Exp $ */ +/* $Id: php_bcmath.h,v 1.20.2.1.2.1 2006/11/10 12:02:10 dmitry Exp $ */ #ifndef PHP_BCMATH_H #define PHP_BCMATH_H @@ -30,8 +30,6 @@ PHP_MINIT_FUNCTION(bcmath); PHP_MSHUTDOWN_FUNCTION(bcmath); -PHP_RINIT_FUNCTION(bcmath); -PHP_RSHUTDOWN_FUNCTION(bcmath); PHP_MINFO_FUNCTION(bcmath); PHP_FUNCTION(bcadd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/bcmath bcmath.c php_bcmath.h
dmitry Fri Nov 10 12:02:22 2006 UTC Modified files: /php-src/ext/bcmath bcmath.c php_bcmath.h Log: Intialization code is moved from request startup to module startup http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.68r2=1.69diff_format=u Index: php-src/ext/bcmath/bcmath.c diff -u php-src/ext/bcmath/bcmath.c:1.68 php-src/ext/bcmath/bcmath.c:1.69 --- php-src/ext/bcmath/bcmath.c:1.68Thu Sep 21 06:46:00 2006 +++ php-src/ext/bcmath/bcmath.c Fri Nov 10 12:02:22 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bcmath.c,v 1.68 2006/09/21 06:46:00 dmitry Exp $ */ +/* $Id: bcmath.c,v 1.69 2006/11/10 12:02:22 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -33,6 +33,7 @@ ZEND_DECLARE_MODULE_GLOBALS(bcmath); static PHP_GINIT_FUNCTION(bcmath); +static PHP_GSHUTDOWN_FUNCTION(bcmath); /* {{{ arginfo */ static @@ -124,13 +125,13 @@ bcmath_functions, PHP_MINIT(bcmath), PHP_MSHUTDOWN(bcmath), - PHP_RINIT(bcmath), - PHP_RSHUTDOWN(bcmath), + NULL, + NULL, PHP_MINFO(bcmath), NO_VERSION_YET, PHP_MODULE_GLOBALS(bcmath), PHP_GINIT(bcmath), - NULL, +PHP_GSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES_EX }; @@ -150,6 +151,17 @@ static PHP_GINIT_FUNCTION(bcmath) { bcmath_globals-bc_precision = 0; + bc_init_numbers(TSRMLS_C); +} +/* }}} */ + +/* {{{ PHP_GSHUTDOWN_FUNCTION + */ +static PHP_GSHUTDOWN_FUNCTION(bcmath) +{ + _bc_free_num_ex(bcmath_globals-_zero_, 1); + _bc_free_num_ex(bcmath_globals-_one_, 1); + _bc_free_num_ex(bcmath_globals-_two_, 1); } /* }}} */ @@ -173,28 +185,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(bcmath) -{ - bc_init_numbers(TSRMLS_C); - - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_RSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(bcmath) -{ - _bc_free_num_ex(BCG(_zero_), 1); - _bc_free_num_ex(BCG(_one_), 1); - _bc_free_num_ex(BCG(_two_), 1); - - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(bcmath) http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/php_bcmath.h?r1=1.21r2=1.22diff_format=u Index: php-src/ext/bcmath/php_bcmath.h diff -u php-src/ext/bcmath/php_bcmath.h:1.21 php-src/ext/bcmath/php_bcmath.h:1.22 --- php-src/ext/bcmath/php_bcmath.h:1.21Sun Jan 1 13:09:48 2006 +++ php-src/ext/bcmath/php_bcmath.h Fri Nov 10 12:02:22 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_bcmath.h,v 1.21 2006/01/01 13:09:48 sniper Exp $ */ +/* $Id: php_bcmath.h,v 1.22 2006/11/10 12:02:22 dmitry Exp $ */ #ifndef PHP_BCMATH_H #define PHP_BCMATH_H @@ -30,8 +30,6 @@ PHP_MINIT_FUNCTION(bcmath); PHP_MSHUTDOWN_FUNCTION(bcmath); -PHP_RINIT_FUNCTION(bcmath); -PHP_RSHUTDOWN_FUNCTION(bcmath); PHP_MINFO_FUNCTION(bcmath); PHP_FUNCTION(bcadd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /main/streams plain_wrapper.c
dmitry Fri Nov 10 13:10:16 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/main/streams plain_wrapper.c Log: Disabled reading from stream (calls to read()) after EOF http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.351r2=1.2027.2.547.2.352diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.351 php-src/NEWS:1.2027.2.547.2.352 --- php-src/NEWS:1.2027.2.547.2.351 Fri Nov 10 12:59:27 2006 +++ php-src/NEWSFri Nov 10 13:10:16 2006 @@ -9,6 +9,8 @@ In case of modification of corresponding registry-tree PHP will reload it automatic . start timiout thread only if necessary +- Streams optimization (Dmitry) + . disabled calls to read() after EOF - VCWD_REALPATH() is improved to use realpath cache without VIRTUAL_DIR. (Dmitry) - ext/bcmath intialization code is moved from request startup to module http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.9r2=1.52.2.6.2.10diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.9 php-src/main/streams/plain_wrapper.c:1.52.2.6.2.10 --- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.9 Fri Nov 10 10:55:26 2006 +++ php-src/main/streams/plain_wrapper.cFri Nov 10 13:10:16 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.52.2.6.2.9 2006/11/10 10:55:26 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.52.2.6.2.10 2006/11/10 13:10:16 dmitry Exp $ */ #include php.h #include php_globals.h @@ -312,6 +312,9 @@ assert(data != NULL); if (data-fd = 0) { + if (stream-eof !data-is_pipe) { + return 0; + } ret = read(data-fd, buf, count); stream-eof = (ret == 0 || (ret == (size_t)-1 errno != EWOULDBLOCK)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main/streams plain_wrapper.c
dmitry Fri Nov 10 13:10:28 2006 UTC Modified files: /php-src/main/streams plain_wrapper.c Log: Disabled reading from stream (calls to read()) after EOF http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.75r2=1.76diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.75 php-src/main/streams/plain_wrapper.c:1.76 --- php-src/main/streams/plain_wrapper.c:1.75 Fri Nov 10 10:55:43 2006 +++ php-src/main/streams/plain_wrapper.cFri Nov 10 13:10:28 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.75 2006/11/10 10:55:43 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.76 2006/11/10 13:10:28 dmitry Exp $ */ #include php.h #include php_globals.h @@ -316,6 +316,9 @@ assert(data != NULL); if (data-fd = 0) { + if (stream-eof !data-is_pipe) { + return 0; + } ret = read(data-fd, buf, count); stream-eof = (ret == 0 || (ret == (size_t)-1 errno != EWOULDBLOCK)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /main/streams plain_wrapper.c
dmitry Fri Nov 10 13:18:35 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/main/streams plain_wrapper.c Log: Removed unnecessary ftell() calls (one call for each included PHP file) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.352r2=1.2027.2.547.2.353diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.352 php-src/NEWS:1.2027.2.547.2.353 --- php-src/NEWS:1.2027.2.547.2.352 Fri Nov 10 13:10:16 2006 +++ php-src/NEWSFri Nov 10 13:18:35 2006 @@ -10,6 +10,7 @@ it automatic . start timiout thread only if necessary - Streams optimization (Dmitry) + . removed unnecessary ftell() calls (one call for each included PHP file) . disabled calls to read() after EOF - VCWD_REALPATH() is improved to use realpath cache without VIRTUAL_DIR. (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.10r2=1.52.2.6.2.11diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.10 php-src/main/streams/plain_wrapper.c:1.52.2.6.2.11 --- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.10 Fri Nov 10 13:10:16 2006 +++ php-src/main/streams/plain_wrapper.cFri Nov 10 13:18:35 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.52.2.6.2.10 2006/11/10 13:10:16 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.52.2.6.2.11 2006/11/10 13:18:35 dmitry Exp $ */ #include php.h #include php_globals.h @@ -39,6 +39,11 @@ #include php_streams_int.h +#define php_stream_fopen_from_fd_int(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_CC TSRMLS_CC) +#define php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_REL_CC TSRMLS_CC) +#define php_stream_fopen_from_file_int(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_CC TSRMLS_CC) +#define php_stream_fopen_from_file_int_rel(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_REL_CC TSRMLS_CC) + /* parse standard fopen modes into open() flags */ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags) { @@ -128,12 +133,44 @@ return 0; } +static php_stream *_php_stream_fopen_from_fd_int(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC) +{ + php_stdio_stream_data *self; + + self = pemalloc_rel_orig(sizeof(*self), persistent_id); + memset(self, 0, sizeof(*self)); + self-file = NULL; + self-is_pipe = 0; + self-lock_flag = LOCK_UN; + self-is_process_pipe = 0; + self-temp_file_name = NULL; + self-fd = fd; + + return php_stream_alloc_rel(php_stream_stdio_ops, self, persistent_id, mode); +} + +static php_stream *_php_stream_fopen_from_file_int(FILE *file, const char *mode STREAMS_DC TSRMLS_DC) +{ + php_stdio_stream_data *self; + + self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); + self-file = file; + self-is_pipe = 0; + self-lock_flag = LOCK_UN; + self-is_process_pipe = 0; + self-temp_file_name = NULL; + self-fd = fileno(file); + + return php_stream_alloc_rel(php_stream_stdio_ops, self, 0, mode); +} + PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char *pfx, char **opened_path STREAMS_DC TSRMLS_DC) { int fd = php_open_temporary_fd(dir, pfx, opened_path TSRMLS_CC); if (fd != -1) { - php_stream *stream = php_stream_fopen_from_fd_rel(fd, r+b, NULL); + php_stream *stream = php_stream_fopen_from_fd_int_rel(fd, r+b, NULL); if (stream) { return stream; } @@ -152,7 +189,7 @@ int fd = php_open_temporary_fd(NULL, php, opened_path TSRMLS_CC); if (fd != -1) { - php_stream *stream = php_stream_fopen_from_fd_rel(fd, r+b, NULL); + php_stream *stream = php_stream_fopen_from_fd_int_rel(fd, r+b, NULL); if (stream) { php_stdio_stream_data *self = (php_stdio_stream_data*)stream-abstract; stream-wrapper = php_plain_files_wrapper; @@ -174,36 +211,26 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC) { - php_stdio_stream_data *self; - php_stream *stream; - - self = pemalloc_rel_orig(sizeof(*self), persistent_id); - memset(self, 0, sizeof(*self)); - self-file = NULL; - self-is_pipe = 0; - self-lock_flag = LOCK_UN; - self-is_process_pipe = 0; - self-temp_file_name = NULL; - self-fd = fd; + php_stream *stream =
[PHP-CVS] cvs: php-src /main/streams plain_wrapper.c
dmitry Fri Nov 10 13:18:47 2006 UTC Modified files: /php-src/main/streams plain_wrapper.c Log: Removed unnecessary ftell() calls (one call for each included PHP file) http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.76r2=1.77diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.76 php-src/main/streams/plain_wrapper.c:1.77 --- php-src/main/streams/plain_wrapper.c:1.76 Fri Nov 10 13:10:28 2006 +++ php-src/main/streams/plain_wrapper.cFri Nov 10 13:18:46 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.76 2006/11/10 13:10:28 dmitry Exp $ */ +/* $Id: plain_wrapper.c,v 1.77 2006/11/10 13:18:46 dmitry Exp $ */ #include php.h #include php_globals.h @@ -39,6 +39,11 @@ #include php_streams_int.h +#define php_stream_fopen_from_fd_int(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_CC TSRMLS_CC) +#define php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_REL_CC TSRMLS_CC) +#define php_stream_fopen_from_file_int(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_CC TSRMLS_CC) +#define php_stream_fopen_from_file_int_rel(file, mode) _php_stream_fopen_from_file_int((file), (mode) STREAMS_REL_CC TSRMLS_CC) + /* parse standard fopen modes into open() flags */ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags) { @@ -128,12 +133,44 @@ return 0; } +static php_stream *_php_stream_fopen_from_fd_int(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC) +{ + php_stdio_stream_data *self; + + self = pemalloc_rel_orig(sizeof(*self), persistent_id); + memset(self, 0, sizeof(*self)); + self-file = NULL; + self-is_pipe = 0; + self-lock_flag = LOCK_UN; + self-is_process_pipe = 0; + self-temp_file_name = NULL; + self-fd = fd; + + return php_stream_alloc_rel(php_stream_stdio_ops, self, persistent_id, mode); +} + +static php_stream *_php_stream_fopen_from_file_int(FILE *file, const char *mode STREAMS_DC TSRMLS_DC) +{ + php_stdio_stream_data *self; + + self = emalloc_rel_orig(sizeof(*self)); + memset(self, 0, sizeof(*self)); + self-file = file; + self-is_pipe = 0; + self-lock_flag = LOCK_UN; + self-is_process_pipe = 0; + self-temp_file_name = NULL; + self-fd = fileno(file); + + return php_stream_alloc_rel(php_stream_stdio_ops, self, 0, mode); +} + PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char *pfx, char **opened_path STREAMS_DC TSRMLS_DC) { int fd = php_open_temporary_fd(dir, pfx, opened_path TSRMLS_CC); if (fd != -1) { - php_stream *stream = php_stream_fopen_from_fd_rel(fd, r+b, NULL); + php_stream *stream = php_stream_fopen_from_fd_int_rel(fd, r+b, NULL); if (stream) { return stream; } @@ -152,7 +189,7 @@ int fd = php_open_temporary_fd(NULL, php, opened_path TSRMLS_CC); if (fd != -1) { - php_stream *stream = php_stream_fopen_from_fd_rel(fd, r+b, NULL); + php_stream *stream = php_stream_fopen_from_fd_int_rel(fd, r+b, NULL); if (stream) { php_stdio_stream_data *self = (php_stdio_stream_data*)stream-abstract; stream-wrapper = php_plain_files_wrapper; @@ -174,36 +211,26 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC) { - php_stdio_stream_data *self; - php_stream *stream; - - self = pemalloc_rel_orig(sizeof(*self), persistent_id); - memset(self, 0, sizeof(*self)); - self-file = NULL; - self-is_pipe = 0; - self-lock_flag = LOCK_UN; - self-is_process_pipe = 0; - self-temp_file_name = NULL; - self-fd = fd; + php_stream *stream = php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id); + + if (stream) { + php_stdio_stream_data *self = (php_stdio_stream_data*)stream-abstract; #ifdef S_ISFIFO - /* detect if this is a pipe */ - if (self-fd = 0) { - self-is_pipe = (do_fstat(self, 0) == 0 S_ISFIFO(self-sb.st_mode)) ? 1 : 0; - } + /* detect if this is a pipe */ + if (self-fd = 0) { + self-is_pipe = (do_fstat(self, 0) == 0 S_ISFIFO(self-sb.st_mode)) ? 1 : 0; + } #elif defined(PHP_WIN32) - { - long handle = _get_osfhandle(self-fd); + { + long handle = _get_osfhandle(self-fd); - if
[PHP-CVS] cvs: php-src(PHP_5_2) /tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt
dmitry Fri Nov 10 14:20:26 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt Log: Fixed tests http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_005.phpt?r1=1.4r2=1.4.4.1diff_format=u Index: php-src/tests/classes/array_access_005.phpt diff -u php-src/tests/classes/array_access_005.phpt:1.4 php-src/tests/classes/array_access_005.phpt:1.4.4.1 --- php-src/tests/classes/array_access_005.phpt:1.4 Sun Jun 19 20:49:17 2005 +++ php-src/tests/classes/array_access_005.phpt Fri Nov 10 14:20:26 2006 @@ -69,4 +69,6 @@ string(6) JoeFoo } +Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php5.2/tests/classes/array_access_005.php on line 46 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_005.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_008.phpt?r1=1.2r2=1.2.4.1diff_format=u Index: php-src/tests/classes/array_access_008.phpt diff -u php-src/tests/classes/array_access_008.phpt:1.2 php-src/tests/classes/array_access_008.phpt:1.2.4.1 --- php-src/tests/classes/array_access_008.phpt:1.2 Sun Jun 19 20:49:17 2005 +++ php-src/tests/classes/array_access_008.phpt Fri Nov 10 14:20:26 2006 @@ -56,4 +56,6 @@ ===ArrayOverloading=== string(3) Foo +Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php5.2/tests/classes/array_access_008.php on line 40 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_012.phpt?r1=1.1r2=1.1.4.1diff_format=u Index: php-src/tests/classes/array_access_012.phpt diff -u php-src/tests/classes/array_access_012.phpt:1.1 php-src/tests/classes/array_access_012.phpt:1.1.4.1 --- php-src/tests/classes/array_access_012.phpt:1.1 Tue Jun 21 06:59:58 2005 +++ php-src/tests/classes/array_access_012.phpt Fri Nov 10 14:20:26 2006 @@ -31,4 +31,6 @@ ?php exit(0); ? --EXPECTF-- +Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in /home/dmitry/php/php5.2/tests/classes/array_access_012.php on line 24 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_012.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt
dmitry Fri Nov 10 14:21:26 2006 UTC Modified files: /php-src/tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt Log: Fixed tests http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_005.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/tests/classes/array_access_005.phpt diff -u php-src/tests/classes/array_access_005.phpt:1.5 php-src/tests/classes/array_access_005.phpt:1.6 --- php-src/tests/classes/array_access_005.phpt:1.5 Mon Aug 15 14:37:54 2005 +++ php-src/tests/classes/array_access_005.phpt Fri Nov 10 14:21:26 2006 @@ -69,6 +69,8 @@ string(6) JoeFoo } +Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_005.php on line 46 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_005.php on line %d --UEXPECTF-- unicode(3) Joe @@ -86,4 +88,6 @@ unicode(6) JoeFoo } +Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_005.php on line 46 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_005.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_008.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/tests/classes/array_access_008.phpt diff -u php-src/tests/classes/array_access_008.phpt:1.3 php-src/tests/classes/array_access_008.phpt:1.4 --- php-src/tests/classes/array_access_008.phpt:1.3 Mon Aug 15 14:37:54 2005 +++ php-src/tests/classes/array_access_008.phpt Fri Nov 10 14:21:26 2006 @@ -56,6 +56,8 @@ ===ArrayOverloading=== string(3) Foo +Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_008.php on line 40 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d --UEXPECTF-- unicode(3) Foo @@ -64,4 +66,6 @@ ===ArrayOverloading=== unicode(3) Foo +Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_008.php on line 40 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_012.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/tests/classes/array_access_012.phpt diff -u php-src/tests/classes/array_access_012.phpt:1.1 php-src/tests/classes/array_access_012.phpt:1.2 --- php-src/tests/classes/array_access_012.phpt:1.1 Tue Jun 21 06:59:58 2005 +++ php-src/tests/classes/array_access_012.phpt Fri Nov 10 14:21:26 2006 @@ -31,4 +31,6 @@ ?php exit(0); ? --EXPECTF-- +Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in /home/dmitry/php/php6/tests/classes/array_access_012.php on line 24 + Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_012.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/soap php_encoding.c
dmitry Fri Nov 10 15:05:23 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/soap php_encoding.c Log: Fixed bug #39454 (Returning a SOAP array segfaults PHP) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.354r2=1.2027.2.547.2.355diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.354 php-src/NEWS:1.2027.2.547.2.355 --- php-src/NEWS:1.2027.2.547.2.354 Fri Nov 10 15:04:07 2006 +++ php-src/NEWSFri Nov 10 15:05:22 2006 @@ -34,6 +34,7 @@ php_filter.h). - Fixed wrong signature initialization in imagepng (Takeshi Abe) - Added optimization for imageline with horizontal and vertial lines (Pierre) +- Fixed bug #39454 (Returning a SOAP array segfaults PHP). (Dmitry) - Fixed bug #39414 (Syntax error while compiling with Sun Workshop Complier). (Johannes) - Fixed bug #39398 (Booleans are not automatically translated to integers). http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.15r2=1.103.2.21.2.16diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.15 php-src/ext/soap/php_encoding.c:1.103.2.21.2.16 --- php-src/ext/soap/php_encoding.c:1.103.2.21.2.15 Wed Nov 8 10:05:19 2006 +++ php-src/ext/soap/php_encoding.c Fri Nov 10 15:05:22 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.103.2.21.2.15 2006/11/08 10:05:19 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.21.2.16 2006/11/10 15:05:22 dmitry Exp $ */ #include time.h @@ -2023,6 +2023,7 @@ zend_hash_find(sdl_type-attributes, SOAP_1_1_ENC_NAMESPACE:arrayType, sizeof(SOAP_1_1_ENC_NAMESPACE:arrayType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arrayType, sizeof(WSDL_NAMESPACE:arrayType), (void **)ext) == SUCCESS) { char *value, *end; @@ -2071,6 +2072,7 @@ zend_hash_find(sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:itemType, sizeof(SOAP_1_2_ENC_NAMESPACE:itemType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:itemType, sizeof(WSDL_NAMESPACE:itemType), (void **)ext) == SUCCESS) { if ((*ext)-ns != NULL) { enc = get_encoder(SOAP_GLOBAL(sdl), (*ext)-ns, (*ext)-val); @@ -2081,6 +2083,7 @@ if (zend_hash_find(sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:arraySize, sizeof(SOAP_1_2_ENC_NAMESPACE:arraySize), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arraySize, sizeof(WSDL_NAMESPACE:arraysize), (void **)ext) == SUCCESS) { dimension = calc_dimension_12((*ext)-val); dims = get_position_12(dimension, (*ext)-val); @@ -2101,6 +2104,7 @@ zend_hash_find(sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:arraySize, sizeof(SOAP_1_2_ENC_NAMESPACE:arraySize), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arraySize, sizeof(WSDL_NAMESPACE:arraySize), (void **)ext) == SUCCESS) { dimension = calc_dimension_12((*ext)-val); dims = get_position_12(dimension, (*ext)-val); @@ -2258,6 +2262,7 @@ zend_hash_find(type-sdl_type-attributes, SOAP_1_1_ENC_NAMESPACE:arrayType, sizeof(SOAP_1_1_ENC_NAMESPACE:arrayType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arrayType, sizeof(WSDL_NAMESPACE:arrayType), (void **)ext) == SUCCESS) { char *type, *end; @@ -2279,6 +2284,7 @@ zend_hash_find(type-sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:itemType, sizeof(SOAP_1_2_ENC_NAMESPACE:itemType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:itemType, sizeof(WSDL_NAMESPACE:itemType), (void
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c
dmitry Fri Nov 10 15:05:38 2006 UTC Modified files: /php-src/ext/soap php_encoding.c Log: Fixed bug #39454 (Returning a SOAP array segfaults PHP) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.146r2=1.147diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.146 php-src/ext/soap/php_encoding.c:1.147 --- php-src/ext/soap/php_encoding.c:1.146 Wed Nov 8 10:05:32 2006 +++ php-src/ext/soap/php_encoding.c Fri Nov 10 15:05:38 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.146 2006/11/08 10:05:32 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.147 2006/11/10 15:05:38 dmitry Exp $ */ #include time.h @@ -1992,6 +1992,7 @@ zend_hash_find(sdl_type-attributes, SOAP_1_1_ENC_NAMESPACE:arrayType, sizeof(SOAP_1_1_ENC_NAMESPACE:arrayType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arrayType, sizeof(WSDL_NAMESPACE:arrayType), (void **)ext) == SUCCESS) { char *value, *end; @@ -2040,6 +2041,7 @@ zend_hash_find(sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:itemType, sizeof(SOAP_1_2_ENC_NAMESPACE:itemType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:itemType, sizeof(WSDL_NAMESPACE:itemType), (void **)ext) == SUCCESS) { if ((*ext)-ns != NULL) { enc = get_encoder(SOAP_GLOBAL(sdl), (*ext)-ns, (*ext)-val); @@ -2050,6 +2052,7 @@ if (zend_hash_find(sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:arraySize, sizeof(SOAP_1_2_ENC_NAMESPACE:arraySize), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arraySize, sizeof(WSDL_NAMESPACE:arraysize), (void **)ext) == SUCCESS) { dimension = calc_dimension_12((*ext)-val); dims = get_position_12(dimension, (*ext)-val); @@ -2070,6 +2073,7 @@ zend_hash_find(sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:arraySize, sizeof(SOAP_1_2_ENC_NAMESPACE:arraySize), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arraySize, sizeof(WSDL_NAMESPACE:arraySize), (void **)ext) == SUCCESS) { dimension = calc_dimension_12((*ext)-val); dims = get_position_12(dimension, (*ext)-val); @@ -2227,6 +2231,7 @@ zend_hash_find(type-sdl_type-attributes, SOAP_1_1_ENC_NAMESPACE:arrayType, sizeof(SOAP_1_1_ENC_NAMESPACE:arrayType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arrayType, sizeof(WSDL_NAMESPACE:arrayType), (void **)ext) == SUCCESS) { char *type, *end; @@ -2248,6 +2253,7 @@ zend_hash_find(type-sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:itemType, sizeof(SOAP_1_2_ENC_NAMESPACE:itemType), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:itemType, sizeof(WSDL_NAMESPACE:itemType), (void **)ext) == SUCCESS) { if ((*ext)-ns != NULL) { @@ -2257,6 +2263,7 @@ if (zend_hash_find(type-sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:arraySize, sizeof(SOAP_1_2_ENC_NAMESPACE:arraySize), (void **)arrayType) == SUCCESS + (*arrayType)-extraAttributes zend_hash_find((*arrayType)-extraAttributes, WSDL_NAMESPACE:arraySize, sizeof(WSDL_NAMESPACE:arraysize), (void **)ext) == SUCCESS) { dimension = calc_dimension_12((*ext)-val); dims = get_position_12(dimension, (*ext)-val); @@ -2269,6 +2276,7 @@ zend_hash_find(type-sdl_type-attributes, SOAP_1_2_ENC_NAMESPACE:arraySize,
[PHP-CVS] cvs: php-src /ext/oci8 oci8.c oci8_statement.c php_oci8_int.h
tony2001Fri Nov 10 16:33:28 2006 UTC Modified files: /php-src/ext/oci8 oci8.c oci8_statement.c php_oci8_int.h Log: fix segfault in ZTS mode when statements containing sub-statements are destroyed in wrong order http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.322r2=1.323diff_format=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.322 php-src/ext/oci8/oci8.c:1.323 --- php-src/ext/oci8/oci8.c:1.322 Wed Oct 18 14:22:04 2006 +++ php-src/ext/oci8/oci8.c Fri Nov 10 16:33:28 2006 @@ -26,7 +26,7 @@ +--+ */ -/* $Id: oci8.c,v 1.322 2006/10/18 14:22:04 tony2001 Exp $ */ +/* $Id: oci8.c,v 1.323 2006/11/10 16:33:28 tony2001 Exp $ */ /* TODO * * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY @@ -647,7 +647,9 @@ #ifdef ZTS zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_descriptor TSRMLS_CC); zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_collection TSRMLS_CC); - zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_statement TSRMLS_CC); + while (OCI_G(num_statements)) { + zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_statement TSRMLS_CC); + } #endif /* check persistent connections and do the necessary actions if needed */ @@ -668,7 +670,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); php_info_print_table_row(2, Version, 1.2.2); - php_info_print_table_row(2, Revision, $Revision: 1.322 $); + php_info_print_table_row(2, Revision, $Revision: 1.323 $); sprintf(buf, %ld, OCI_G(num_persistent)); php_info_print_table_row(2, Active Persistent Connections, buf); @@ -1810,13 +1812,13 @@ static int php_oci_list_helper(zend_rsrc_list_entry *le, void *le_type TSRMLS_DC) { int type = (int) le_type; - + if (le-type == type) { - if (le-ptr != NULL) { - return 1; + if (le-ptr != NULL --le-refcount=0) { + return ZEND_HASH_APPLY_REMOVE; } } - return 0; + return ZEND_HASH_APPLY_KEEP; } /* }}} */ #endif http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.32r2=1.33diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.32 php-src/ext/oci8/oci8_statement.c:1.33 --- php-src/ext/oci8/oci8_statement.c:1.32 Fri Oct 13 14:26:14 2006 +++ php-src/ext/oci8/oci8_statement.c Fri Nov 10 16:33:28 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.32 2006/10/13 14:26:14 tony2001 Exp $ */ +/* $Id: oci8_statement.c,v 1.33 2006/11/10 16:33:28 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -113,6 +113,8 @@ } PHP_OCI_REGISTER_RESOURCE(statement, le_statement); + + OCI_G(num_statements)++; return statement; } @@ -520,6 +522,7 @@ outcol-retlen = -1; dynamic = OCI_DEFAULT; buf = (outcol-statement-stmt); + zend_list_addref(statement-id); break; case SQLT_RDD: /* ROWID */ @@ -694,6 +697,8 @@ zend_list_delete(statement-connection-rsrc_id); efree(statement); + + OCI_G(num_statements)--; } /* }}} */ /* {{{ php_oci_bind_pre_exec() http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.22r2=1.23diff_format=u Index: php-src/ext/oci8/php_oci8_int.h diff -u php-src/ext/oci8/php_oci8_int.h:1.22 php-src/ext/oci8/php_oci8_int.h:1.23 --- php-src/ext/oci8/php_oci8_int.h:1.22Tue Aug 22 11:08:28 2006 +++ php-src/ext/oci8/php_oci8_int.h Fri Nov 10 16:33:28 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: php_oci8_int.h,v 1.22 2006/08/22 11:08:28 tony2001 Exp $ */ +/* $Id: php_oci8_int.h,v 1.23 2006/11/10 16:33:28 tony2001 Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H @@ -411,6 +411,7 @@ long max_persistent;/* maximum number of persistent connections per process */ long num_persistent;/* number of existing persistent connections */ long num_links; /* non-persistent + persistent connections */ + long num_statements;/* number of statements open */ long ping_interval; /* time interval between pings */ long
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8 oci8.c oci8_statement.c php_oci8_int.h
tony2001Fri Nov 10 16:33:41 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8 oci8.c oci8_statement.c php_oci8_int.h Log: fix segfault in ZTS mode when statements containing sub-statements are destroyed in wrong order http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.25r2=1.269.2.16.2.26diff_format=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.25 php-src/ext/oci8/oci8.c:1.269.2.16.2.26 --- php-src/ext/oci8/oci8.c:1.269.2.16.2.25 Wed Oct 18 14:23:23 2006 +++ php-src/ext/oci8/oci8.c Fri Nov 10 16:33:41 2006 @@ -26,7 +26,7 @@ +--+ */ -/* $Id: oci8.c,v 1.269.2.16.2.25 2006/10/18 14:23:23 tony2001 Exp $ */ +/* $Id: oci8.c,v 1.269.2.16.2.26 2006/11/10 16:33:41 tony2001 Exp $ */ /* TODO * * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY @@ -647,7 +647,9 @@ #ifdef ZTS zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_descriptor TSRMLS_CC); zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_collection TSRMLS_CC); - zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_statement TSRMLS_CC); + while (OCI_G(num_statements)) { + zend_hash_apply_with_argument(EG(regular_list), (apply_func_arg_t) php_oci_list_helper, (void *)le_statement TSRMLS_CC); + } #endif /* check persistent connections and do the necessary actions if needed */ @@ -668,7 +670,7 @@ php_info_print_table_start(); php_info_print_table_row(2, OCI8 Support, enabled); php_info_print_table_row(2, Version, 1.2.2); - php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.25 $); + php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.26 $); sprintf(buf, %ld, OCI_G(num_persistent)); php_info_print_table_row(2, Active Persistent Connections, buf); @@ -1810,13 +1812,13 @@ static int php_oci_list_helper(zend_rsrc_list_entry *le, void *le_type TSRMLS_DC) { int type = (int) le_type; - + if (le-type == type) { - if (le-ptr != NULL) { - return 1; + if (le-ptr != NULL --le-refcount=0) { + return ZEND_HASH_APPLY_REMOVE; } } - return 0; + return ZEND_HASH_APPLY_KEEP; } /* }}} */ #endif http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.14.2.13r2=1.7.2.14.2.14diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.13 php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.14 --- php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.13 Fri Oct 13 14:26:34 2006 +++ php-src/ext/oci8/oci8_statement.c Fri Nov 10 16:33:41 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.7.2.14.2.13 2006/10/13 14:26:34 tony2001 Exp $ */ +/* $Id: oci8_statement.c,v 1.7.2.14.2.14 2006/11/10 16:33:41 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -113,6 +113,8 @@ } PHP_OCI_REGISTER_RESOURCE(statement, le_statement); + + OCI_G(num_statements)++; return statement; } @@ -520,6 +522,7 @@ outcol-retlen = -1; dynamic = OCI_DEFAULT; buf = (outcol-statement-stmt); + zend_list_addref(statement-id); break; case SQLT_RDD: /* ROWID */ @@ -694,6 +697,8 @@ zend_list_delete(statement-connection-rsrc_id); efree(statement); + + OCI_G(num_statements)--; } /* }}} */ /* {{{ php_oci_bind_pre_exec() http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.11.2.6.2.7r2=1.11.2.6.2.8diff_format=u Index: php-src/ext/oci8/php_oci8_int.h diff -u php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.7 php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.8 --- php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.7Tue Aug 22 11:09:12 2006 +++ php-src/ext/oci8/php_oci8_int.h Fri Nov 10 16:33:41 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: php_oci8_int.h,v 1.11.2.6.2.7 2006/08/22 11:09:12 tony2001 Exp $ */ +/* $Id: php_oci8_int.h,v 1.11.2.6.2.8 2006/11/10 16:33:41 tony2001 Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H @@ -411,6 +411,7 @@ long max_persistent;/* maximum number of persistent connections per process */ long num_persistent;/* number of existing persistent connections */ long num_links;
[PHP-CVS] cvs: php-src(PHP_5_2) /tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt
bjori Fri Nov 10 17:04:03 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt Log: Fix tests http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_005.phpt?r1=1.4.4.1r2=1.4.4.2diff_format=u Index: php-src/tests/classes/array_access_005.phpt diff -u php-src/tests/classes/array_access_005.phpt:1.4.4.1 php-src/tests/classes/array_access_005.phpt:1.4.4.2 --- php-src/tests/classes/array_access_005.phpt:1.4.4.1 Fri Nov 10 14:20:26 2006 +++ php-src/tests/classes/array_access_005.phpt Fri Nov 10 17:04:03 2006 @@ -69,6 +69,6 @@ string(6) JoeFoo } -Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php5.2/tests/classes/array_access_005.php on line 46 +Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_005.php on line 46 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_005.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_008.phpt?r1=1.2.4.1r2=1.2.4.2diff_format=u Index: php-src/tests/classes/array_access_008.phpt diff -u php-src/tests/classes/array_access_008.phpt:1.2.4.1 php-src/tests/classes/array_access_008.phpt:1.2.4.2 --- php-src/tests/classes/array_access_008.phpt:1.2.4.1 Fri Nov 10 14:20:26 2006 +++ php-src/tests/classes/array_access_008.phpt Fri Nov 10 17:04:03 2006 @@ -56,6 +56,6 @@ ===ArrayOverloading=== string(3) Foo -Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php5.2/tests/classes/array_access_008.php on line 40 +Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_008.php on line 40 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_012.phpt?r1=1.1.4.1r2=1.1.4.2diff_format=u Index: php-src/tests/classes/array_access_012.phpt diff -u php-src/tests/classes/array_access_012.phpt:1.1.4.1 php-src/tests/classes/array_access_012.phpt:1.1.4.2 --- php-src/tests/classes/array_access_012.phpt:1.1.4.1 Fri Nov 10 14:20:26 2006 +++ php-src/tests/classes/array_access_012.phpt Fri Nov 10 17:04:03 2006 @@ -31,6 +31,6 @@ ?php exit(0); ? --EXPECTF-- -Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in /home/dmitry/php/php5.2/tests/classes/array_access_012.php on line 24 +Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in %sarray_access_012.php on line 24 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_012.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/lib parse_tz.c
nlopess Fri Nov 10 17:32:15 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/lib parse_tz.c Log: mark the binary search delimiters as unsigned, so that the compiler can use a quick shift operation http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.6.2.6r2=1.20.2.6.2.7diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.6 php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.7 --- php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.6Fri Sep 1 23:25:29 2006 +++ php-src/ext/date/lib/parse_tz.c Fri Nov 10 17:32:15 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_tz.c,v 1.20.2.6.2.6 2006/09/01 23:25:29 nlopess Exp $ */ +/* $Id: parse_tz.c,v 1.20.2.6.2.7 2006/11/10 17:32:15 nlopess Exp $ */ #include timelib.h @@ -192,7 +192,7 @@ } } -static int tz_search(char *timezone, int left, int right, const timelib_tzdb *tzdb) +static int tz_search(char *timezone, unsigned int left, unsigned int right, const timelib_tzdb *tzdb) { int mid, cmp; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/lib parse_tz.c
nlopess Fri Nov 10 17:32:42 2006 UTC Modified files: /php-src/ext/date/lib parse_tz.c Log: MFB http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.30r2=1.31diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.30 php-src/ext/date/lib/parse_tz.c:1.31 --- php-src/ext/date/lib/parse_tz.c:1.30Fri Sep 1 23:33:13 2006 +++ php-src/ext/date/lib/parse_tz.c Fri Nov 10 17:32:42 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_tz.c,v 1.30 2006/09/01 23:33:13 nlopess Exp $ */ +/* $Id: parse_tz.c,v 1.31 2006/11/10 17:32:42 nlopess Exp $ */ #include timelib.h @@ -192,7 +192,7 @@ } } -static int tz_search(char *timezone, int left, int right, const timelib_tzdb *tzdb) +static int tz_search(char *timezone, unsigned int left, unsigned int right, const timelib_tzdb *tzdb) { int mid, cmp; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/libxml libxml.c php_libxml.h
nlopess Fri Nov 10 18:05:12 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/libxml libxml.c php_libxml.h Log: mark a few variables and functions as static http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.32.2.7.2.8r2=1.32.2.7.2.9diff_format=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.32.2.7.2.8 php-src/ext/libxml/libxml.c:1.32.2.7.2.9 --- php-src/ext/libxml/libxml.c:1.32.2.7.2.8Wed Sep 6 21:44:45 2006 +++ php-src/ext/libxml/libxml.c Fri Nov 10 18:05:11 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.32.2.7.2.8 2006/09/06 21:44:45 edink Exp $ */ +/* $Id: libxml.c,v 1.32.2.7.2.9 2006/11/10 18:05:11 nlopess Exp $ */ #define IS_EXT_MODULE @@ -52,7 +52,7 @@ #define PHP_LIBXML_CTX_WARNING 2 /* a true global for initialization */ -int _php_libxml_initialized = 0; +static int _php_libxml_initialized = 0; typedef struct _php_libxml_func_handler { php_libxml_export_node export_func; @@ -60,10 +60,16 @@ static HashTable php_libxml_exports; -ZEND_DECLARE_MODULE_GLOBALS(libxml) +static ZEND_DECLARE_MODULE_GLOBALS(libxml) static PHP_GINIT_FUNCTION(libxml); -zend_class_entry *libxmlerror_class_entry; +static PHP_FUNCTION(libxml_set_streams_context); +static PHP_FUNCTION(libxml_use_internal_errors); +static PHP_FUNCTION(libxml_get_last_error); +static PHP_FUNCTION(libxml_clear_errors); +static PHP_FUNCTION(libxml_get_errors); + +static zend_class_entry *libxmlerror_class_entry; /* {{{ dynamically loadable module stuff */ #ifdef COMPILE_DL_LIBXML @@ -72,11 +78,11 @@ /* }}} */ /* {{{ function prototypes */ -PHP_MINIT_FUNCTION(libxml); -PHP_RINIT_FUNCTION(libxml); -PHP_MSHUTDOWN_FUNCTION(libxml); -PHP_RSHUTDOWN_FUNCTION(libxml); -PHP_MINFO_FUNCTION(libxml); +static PHP_MINIT_FUNCTION(libxml); +static PHP_RINIT_FUNCTION(libxml); +static PHP_MSHUTDOWN_FUNCTION(libxml); +static PHP_RSHUTDOWN_FUNCTION(libxml); +static PHP_MINFO_FUNCTION(libxml); /* }}} */ @@ -106,7 +112,7 @@ /* }}} */ /* {{{ extension definition structures */ -zend_function_entry libxml_functions[] = { +static zend_function_entry libxml_functions[] = { PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context) PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors) PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error) @@ -270,7 +276,7 @@ /* Channel libxml file io layer through the PHP streams subsystem. * This allows use of ftps:// and https:// urls */ -void *php_libxml_streams_IO_open_wrapper(const char *filename, const char *mode, const int read_only) +static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char *mode, const int read_only) { php_stream_statbuf ssbuf; php_stream_context *context = NULL; @@ -325,35 +331,35 @@ return ret_val; } -void *php_libxml_streams_IO_open_read_wrapper(const char *filename) +static void *php_libxml_streams_IO_open_read_wrapper(const char *filename) { return php_libxml_streams_IO_open_wrapper(filename, rb, 1); } -void *php_libxml_streams_IO_open_write_wrapper(const char *filename) +static void *php_libxml_streams_IO_open_write_wrapper(const char *filename) { return php_libxml_streams_IO_open_wrapper(filename, wb, 0); } -int php_libxml_streams_IO_read(void *context, char *buffer, int len) +static int php_libxml_streams_IO_read(void *context, char *buffer, int len) { TSRMLS_FETCH(); return php_stream_read((php_stream*)context, buffer, len); } -int php_libxml_streams_IO_write(void *context, const char *buffer, int len) +static int php_libxml_streams_IO_write(void *context, const char *buffer, int len) { TSRMLS_FETCH(); return php_stream_write((php_stream*)context, buffer, len); } -int php_libxml_streams_IO_close(void *context) +static int php_libxml_streams_IO_close(void *context) { TSRMLS_FETCH(); return php_stream_close((php_stream*)context); } -xmlParserInputBufferPtr +static xmlParserInputBufferPtr php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; @@ -380,7 +386,7 @@ return(ret); } -xmlOutputBufferPtr +static xmlOutputBufferPtr php_libxml_output_buffer_create_filename(const char *URI, xmlCharEncodingHandlerPtr encoder, int compression ATTRIBUTE_UNUSED) @@ -405,7 +411,7 @@ xmlFree(unescaped); } -/* try with a non-escaped URI this may be a strange filename */ + /* try with a non-escaped URI this may be a strange filename */ if (context == NULL) { context = php_libxml_streams_IO_open_write_wrapper(URI); } @@ -590,7 +596,7 @@ } -PHP_MINIT_FUNCTION(libxml) +static PHP_MINIT_FUNCTION(libxml) {
[PHP-CVS] cvs: php-src /ext/libxml libxml.c php_libxml.h
nlopess Fri Nov 10 18:05:58 2006 UTC Modified files: /php-src/ext/libxml libxml.c php_libxml.h Log: MFB http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.53r2=1.54diff_format=u Index: php-src/ext/libxml/libxml.c diff -u php-src/ext/libxml/libxml.c:1.53 php-src/ext/libxml/libxml.c:1.54 --- php-src/ext/libxml/libxml.c:1.53Wed Sep 6 21:48:57 2006 +++ php-src/ext/libxml/libxml.c Fri Nov 10 18:05:58 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: libxml.c,v 1.53 2006/09/06 21:48:57 edink Exp $ */ +/* $Id: libxml.c,v 1.54 2006/11/10 18:05:58 nlopess Exp $ */ #define IS_EXT_MODULE @@ -52,7 +52,7 @@ #define PHP_LIBXML_CTX_WARNING 2 /* a true global for initialization */ -int _php_libxml_initialized = 0; +static int _php_libxml_initialized = 0; typedef struct _php_libxml_func_handler { php_libxml_export_node export_func; @@ -60,10 +60,16 @@ static HashTable php_libxml_exports; -ZEND_DECLARE_MODULE_GLOBALS(libxml) +static ZEND_DECLARE_MODULE_GLOBALS(libxml) static PHP_GINIT_FUNCTION(libxml); -zend_class_entry *libxmlerror_class_entry; +static PHP_FUNCTION(libxml_set_streams_context); +static PHP_FUNCTION(libxml_use_internal_errors); +static PHP_FUNCTION(libxml_get_last_error); +static PHP_FUNCTION(libxml_clear_errors); +static PHP_FUNCTION(libxml_get_errors); + +static zend_class_entry *libxmlerror_class_entry; /* {{{ dynamically loadable module stuff */ #ifdef COMPILE_DL_LIBXML @@ -72,11 +78,11 @@ /* }}} */ /* {{{ function prototypes */ -PHP_MINIT_FUNCTION(libxml); -PHP_RINIT_FUNCTION(libxml); -PHP_MSHUTDOWN_FUNCTION(libxml); -PHP_RSHUTDOWN_FUNCTION(libxml); -PHP_MINFO_FUNCTION(libxml); +static PHP_MINIT_FUNCTION(libxml); +static PHP_RINIT_FUNCTION(libxml); +static PHP_MSHUTDOWN_FUNCTION(libxml); +static PHP_RSHUTDOWN_FUNCTION(libxml); +static PHP_MINFO_FUNCTION(libxml); /* }}} */ @@ -106,7 +112,7 @@ /* }}} */ /* {{{ extension definition structures */ -zend_function_entry libxml_functions[] = { +static zend_function_entry libxml_functions[] = { PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context) PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors) PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error) @@ -270,7 +276,7 @@ /* Channel libxml file io layer through the PHP streams subsystem. * This allows use of ftps:// and https:// urls */ -void *php_libxml_streams_IO_open_wrapper(const char *filename, const char *mode, const int read_only) +static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char *mode, const int read_only) { php_stream_statbuf ssbuf; php_stream_context *context = NULL; @@ -325,35 +331,35 @@ return ret_val; } -void *php_libxml_streams_IO_open_read_wrapper(const char *filename) +static void *php_libxml_streams_IO_open_read_wrapper(const char *filename) { return php_libxml_streams_IO_open_wrapper(filename, rb, 1); } -void *php_libxml_streams_IO_open_write_wrapper(const char *filename) +static void *php_libxml_streams_IO_open_write_wrapper(const char *filename) { return php_libxml_streams_IO_open_wrapper(filename, wb, 0); } -int php_libxml_streams_IO_read(void *context, char *buffer, int len) +static int php_libxml_streams_IO_read(void *context, char *buffer, int len) { TSRMLS_FETCH(); return php_stream_read((php_stream*)context, buffer, len); } -int php_libxml_streams_IO_write(void *context, const char *buffer, int len) +static int php_libxml_streams_IO_write(void *context, const char *buffer, int len) { TSRMLS_FETCH(); return php_stream_write((php_stream*)context, buffer, len); } -int php_libxml_streams_IO_close(void *context) +static int php_libxml_streams_IO_close(void *context) { TSRMLS_FETCH(); return php_stream_close((php_stream*)context); } -xmlParserInputBufferPtr +static xmlParserInputBufferPtr php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc) { xmlParserInputBufferPtr ret; @@ -380,7 +386,7 @@ return(ret); } -xmlOutputBufferPtr +static xmlOutputBufferPtr php_libxml_output_buffer_create_filename(const char *URI, xmlCharEncodingHandlerPtr encoder, int compression ATTRIBUTE_UNUSED) @@ -405,7 +411,7 @@ xmlFree(unescaped); } -/* try with a non-escaped URI this may be a strange filename */ + /* try with a non-escaped URI this may be a strange filename */ if (context == NULL) { context = php_libxml_streams_IO_open_write_wrapper(URI); } @@ -590,7 +596,7 @@ } -PHP_MINIT_FUNCTION(libxml) +static PHP_MINIT_FUNCTION(libxml) { zend_class_entry ce; @@ -630,7 +636,7 @@ } -PHP_RINIT_FUNCTION(libxml) +static PHP_RINIT_FUNCTION(libxml) {
[PHP-CVS] cvs: php-src /tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt
dmitry Fri Nov 10 17:34:26 2006 UTC Modified files: /php-src/tests/classes array_access_005.phpt array_access_008.phpt array_access_012.phpt Log: Fixed tests http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_005.phpt?r1=1.6r2=1.7diff_format=u Index: php-src/tests/classes/array_access_005.phpt diff -u php-src/tests/classes/array_access_005.phpt:1.6 php-src/tests/classes/array_access_005.phpt:1.7 --- php-src/tests/classes/array_access_005.phpt:1.6 Fri Nov 10 14:21:26 2006 +++ php-src/tests/classes/array_access_005.phpt Fri Nov 10 17:34:26 2006 @@ -69,7 +69,7 @@ string(6) JoeFoo } -Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_005.php on line 46 +Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_005.php on line 46 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_005.php on line %d --UEXPECTF-- @@ -88,6 +88,6 @@ unicode(6) JoeFoo } -Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_005.php on line 46 +Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_005.php on line 46 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_005.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_008.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/tests/classes/array_access_008.phpt diff -u php-src/tests/classes/array_access_008.phpt:1.4 php-src/tests/classes/array_access_008.phpt:1.5 --- php-src/tests/classes/array_access_008.phpt:1.4 Fri Nov 10 14:21:26 2006 +++ php-src/tests/classes/array_access_008.phpt Fri Nov 10 17:34:26 2006 @@ -56,7 +56,7 @@ ===ArrayOverloading=== string(3) Foo -Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_008.php on line 40 +Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_008.php on line 40 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d --UEXPECTF-- @@ -66,6 +66,6 @@ ===ArrayOverloading=== unicode(3) Foo -Notice: Indirect modification of overloaded element of Peoples has no effect in /home/dmitry/php/php6/tests/classes/array_access_008.php on line 40 +Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_008.php on line 40 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d http://cvs.php.net/viewvc.cgi/php-src/tests/classes/array_access_012.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/tests/classes/array_access_012.phpt diff -u php-src/tests/classes/array_access_012.phpt:1.2 php-src/tests/classes/array_access_012.phpt:1.3 --- php-src/tests/classes/array_access_012.phpt:1.2 Fri Nov 10 14:21:26 2006 +++ php-src/tests/classes/array_access_012.phpt Fri Nov 10 17:34:26 2006 @@ -31,6 +31,6 @@ ?php exit(0); ? --EXPECTF-- -Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in /home/dmitry/php/php6/tests/classes/array_access_012.php on line 24 +Notice: Indirect modification of overloaded element of ArrayAccessImpl has no effect in %sarray_access_012.php on line 24 Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_012.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
wez Fri Nov 10 18:40:46 2006 UTC Modified files: /CVSROOTavail Log: pecl/pam karma for mikl http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1208r2=1.1209diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1208 CVSROOT/avail:1.1209 --- CVSROOT/avail:1.1208Tue Nov 7 00:43:38 2006 +++ CVSROOT/avail Fri Nov 10 18:40:46 2006 @@ -310,7 +310,7 @@ avail|traufeisen|pecl/gnupg,phpdoc/en/reference/gnupg avail|bate|peardoc,pear/Net_DNS,pear/Net_IPv4 avail|arpad|peardoc,pear/Validate,pear/HTML_AJAX,pear/PHP_Compat -avail|mikl|pecl/memcache,pecl/wbxml,pecl/ocal +avail|mikl|pecl/memcache,pecl/wbxml,pecl/ocal,pecl/pam avail|norro|pear/Image_3D avail|ttsuruoka|pear/Services_Amazon,pear/Services_Delicious avail|fa|peardoc,pear/Net_DNS,pear/Net_IPv4,pear/PEAR_Info -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
andiFri Nov 10 18:51:06 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: - Fix typo http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.355r2=1.2027.2.547.2.356diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.355 php-src/NEWS:1.2027.2.547.2.356 --- php-src/NEWS:1.2027.2.547.2.355 Fri Nov 10 15:05:22 2006 +++ php-src/NEWSFri Nov 10 18:51:05 2006 @@ -8,7 +8,7 @@ . implemented registry cache that prevent registry lookup on each request. In case of modification of corresponding registry-tree PHP will reload it automatic - . start timiout thread only if necessary + . start timeout thread only if necessary . stat() is reimplemented using using GetFileAttributesEx(). The new implementation is faster then implementation in MS VC CRT, but it doesn't support Windows 95. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8 oci8_statement.c php_oci8_int.h
tony2001Fri Nov 10 20:13:36 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8 oci8_statement.c php_oci8_int.h Log: fix possible issue with negative values in oci_set_prefetch (reported by Chris Jones) http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.14.2.14r2=1.7.2.14.2.15diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.14 php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.15 --- php-src/ext/oci8/oci8_statement.c:1.7.2.14.2.14 Fri Nov 10 16:33:41 2006 +++ php-src/ext/oci8/oci8_statement.c Fri Nov 10 20:13:36 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.7.2.14.2.14 2006/11/10 16:33:41 tony2001 Exp $ */ +/* $Id: oci8_statement.c,v 1.7.2.14.2.15 2006/11/10 20:13:36 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -122,7 +122,7 @@ /* {{{ php_oci_statement_set_prefetch() Set prefetch buffer size for the statement (we're assuming that one row is ~1K sized) */ -int php_oci_statement_set_prefetch(php_oci_statement *statement, ub4 size TSRMLS_DC) +int php_oci_statement_set_prefetch(php_oci_statement *statement, long size TSRMLS_DC) { ub4 prefetch = size * 1024; http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.11.2.6.2.8r2=1.11.2.6.2.9diff_format=u Index: php-src/ext/oci8/php_oci8_int.h diff -u php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.8 php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.9 --- php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.8Fri Nov 10 16:33:41 2006 +++ php-src/ext/oci8/php_oci8_int.h Fri Nov 10 20:13:36 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: php_oci8_int.h,v 1.11.2.6.2.8 2006/11/10 16:33:41 tony2001 Exp $ */ +/* $Id: php_oci8_int.h,v 1.11.2.6.2.9 2006/11/10 20:13:36 tony2001 Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H @@ -373,7 +373,7 @@ /* statement related prototypes {{{ */ php_oci_statement * php_oci_statement_create (php_oci_connection *, char *, int TSRMLS_DC); -int php_oci_statement_set_prefetch (php_oci_statement *, ub4 TSRMLS_DC); +int php_oci_statement_set_prefetch (php_oci_statement *, long TSRMLS_DC); int php_oci_statement_fetch (php_oci_statement *, ub4 TSRMLS_DC); php_oci_out_column * php_oci_statement_get_column (php_oci_statement *, long, char*, int TSRMLS_DC); int php_oci_statement_execute (php_oci_statement *, ub4 TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8 oci8_statement.c php_oci8_int.h
tony2001Fri Nov 10 21:55:05 2006 UTC Modified files: /php-src/ext/oci8 oci8_statement.c php_oci8_int.h Log: MFB http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.34r2=1.35diff_format=u Index: php-src/ext/oci8/oci8_statement.c diff -u php-src/ext/oci8/oci8_statement.c:1.34 php-src/ext/oci8/oci8_statement.c:1.35 --- php-src/ext/oci8/oci8_statement.c:1.34 Fri Nov 10 16:56:19 2006 +++ php-src/ext/oci8/oci8_statement.c Fri Nov 10 21:55:05 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_statement.c,v 1.34 2006/11/10 16:56:19 tony2001 Exp $ */ +/* $Id: oci8_statement.c,v 1.35 2006/11/10 21:55:05 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H @@ -124,7 +124,7 @@ /* {{{ php_oci_statement_set_prefetch() Set prefetch buffer size for the statement (we're assuming that one row is ~1K sized) */ -int php_oci_statement_set_prefetch(php_oci_statement *statement, ub4 size TSRMLS_DC) +int php_oci_statement_set_prefetch(php_oci_statement *statement, long size TSRMLS_DC) { ub4 prefetch = size * 1024; http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.24r2=1.25diff_format=u Index: php-src/ext/oci8/php_oci8_int.h diff -u php-src/ext/oci8/php_oci8_int.h:1.24 php-src/ext/oci8/php_oci8_int.h:1.25 --- php-src/ext/oci8/php_oci8_int.h:1.24Fri Nov 10 16:56:19 2006 +++ php-src/ext/oci8/php_oci8_int.h Fri Nov 10 21:55:05 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: php_oci8_int.h,v 1.24 2006/11/10 16:56:19 tony2001 Exp $ */ +/* $Id: php_oci8_int.h,v 1.25 2006/11/10 21:55:05 tony2001 Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H @@ -382,7 +382,7 @@ /* statement related prototypes {{{ */ php_oci_statement * php_oci_statement_create (php_oci_connection *, zstr, int, zend_uchar TSRMLS_DC); -int php_oci_statement_set_prefetch (php_oci_statement *, ub4 TSRMLS_DC); +int php_oci_statement_set_prefetch (php_oci_statement *, long TSRMLS_DC); int php_oci_statement_fetch (php_oci_statement *, ub4 TSRMLS_DC); php_oci_out_column * php_oci_statement_get_column (php_oci_statement *, long, zstr, int TSRMLS_DC); int php_oci_statement_execute (php_oci_statement *, ub4 TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8 oci8_lob.c
tony2001Fri Nov 10 21:57:04 2006 UTC Modified files: /php-src/ext/oci8 oci8_lob.c Log: fix build with old client versions http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_lob.c?r1=1.20r2=1.21diff_format=u Index: php-src/ext/oci8/oci8_lob.c diff -u php-src/ext/oci8/oci8_lob.c:1.20 php-src/ext/oci8/oci8_lob.c:1.21 --- php-src/ext/oci8/oci8_lob.c:1.20Fri Nov 10 16:56:19 2006 +++ php-src/ext/oci8/oci8_lob.c Fri Nov 10 21:57:04 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_lob.c,v 1.20 2006/11/10 16:56:19 tony2001 Exp $ */ +/* $Id: oci8_lob.c,v 1.21 2006/11/10 21:57:04 tony2001 Exp $ */ @@ -341,7 +341,7 @@ ); efree(bufp); - if (!is_clob) { + if (lob_type == OCI_IS_BLOB) { offset = descriptor-lob_current_position + TEXT_BYTES(bytes_read); } else { offset = descriptor-lob_current_position + bytes_read; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/lib parse_tz.c
Hi Nuno This patch causes ext/date/tests/timezones.phpt to segfault... -Hannes On 11/10/06, Nuno Lopes [EMAIL PROTECTED] wrote: nlopess Fri Nov 10 17:32:15 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/lib parse_tz.c Log: mark the binary search delimiters as unsigned, so that the compiler can use a quick shift operation http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.6.2.6r2=1.20.2.6.2.7diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.6 php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.7 --- php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.6Fri Sep 1 23:25:29 2006 +++ php-src/ext/date/lib/parse_tz.c Fri Nov 10 17:32:15 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_tz.c,v 1.20.2.6.2.6 2006/09/01 23:25:29 nlopess Exp $ */ +/* $Id: parse_tz.c,v 1.20.2.6.2.7 2006/11/10 17:32:15 nlopess Exp $ */ #include timelib.h @@ -192,7 +192,7 @@ } } -static int tz_search(char *timezone, int left, int right, const timelib_tzdb *tzdb) +static int tz_search(char *timezone, unsigned int left, unsigned int right, const timelib_tzdb *tzdb) { int mid, cmp; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/lib parse_tz.c
On 11/11/2006 01:27 AM, Hannes Magnusson wrote: Hi Nuno This patch causes ext/date/tests/timezones.phpt to segfault... This patch seems to fix it, though I'm not sure it's sane. Index: ext/date/lib/parse_tz.c === RCS file: /repository/php-src/ext/date/lib/parse_tz.c,v retrieving revision 1.20.2.6.2.7 diff -u -p -d -r1.20.2.6.2.7 parse_tz.c --- ext/date/lib/parse_tz.c 10 Nov 2006 17:32:15 - 1.20.2.6.2.7 +++ ext/date/lib/parse_tz.c 10 Nov 2006 22:38:34 - @@ -204,7 +204,11 @@ static int tz_search(char *timezone, uns cmp = strcasecmp(timezone, tzdb-index[mid].id); if (cmp 0) { - return tz_search(timezone, left, mid - 1, tzdb); + if (mid 0) { + return tz_search(timezone, left, mid - 1, tzdb); + } else { + return -1; + } } else if (cmp 0) { return tz_search(timezone, mid + 1, right, tzdb); } else { /* (cmp == 0) */ -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8 oci8_interface.c oci8_lob.c php_oci8_int.h
tony2001Fri Nov 10 23:03:23 2006 UTC Modified files: /php-src/ext/oci8 oci8_interface.c oci8_lob.c php_oci8_int.h Log: fix type mess (thanks again, Chris) http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_interface.c?r1=1.19r2=1.20diff_format=u Index: php-src/ext/oci8/oci8_interface.c diff -u php-src/ext/oci8/oci8_interface.c:1.19 php-src/ext/oci8/oci8_interface.c:1.20 --- php-src/ext/oci8/oci8_interface.c:1.19 Fri Nov 10 16:56:19 2006 +++ php-src/ext/oci8/oci8_interface.c Fri Nov 10 23:03:22 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_interface.c,v 1.19 2006/11/10 16:56:19 tony2001 Exp $ */ +/* $Id: oci8_interface.c,v 1.20 2006/11/10 23:03:22 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -710,7 +710,7 @@ { zval **tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; - ub4 flush_flag = 0; + long flush_flag = 0; if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, flush_flag) == FAILURE) { http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_lob.c?r1=1.21r2=1.22diff_format=u Index: php-src/ext/oci8/oci8_lob.c diff -u php-src/ext/oci8/oci8_lob.c:1.21 php-src/ext/oci8/oci8_lob.c:1.22 --- php-src/ext/oci8/oci8_lob.c:1.21Fri Nov 10 21:57:04 2006 +++ php-src/ext/oci8/oci8_lob.c Fri Nov 10 23:03:23 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_lob.c,v 1.21 2006/11/10 21:57:04 tony2001 Exp $ */ +/* $Id: oci8_lob.c,v 1.22 2006/11/10 23:03:23 tony2001 Exp $ */ @@ -580,7 +580,7 @@ /* {{{ php_oci_lob_flush() Flush buffers for the LOB (only if they have been used) */ -int php_oci_lob_flush(php_oci_descriptor *descriptor, int flush_flag TSRMLS_DC) +int php_oci_lob_flush(php_oci_descriptor *descriptor, long flush_flag TSRMLS_DC) { OCILobLocator *lob = descriptor-descriptor; php_oci_connection *connection = descriptor-connection; @@ -595,7 +595,7 @@ /* only these two are allowed */ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid flag value: %d, flush_flag); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid flag value: %ld, flush_flag); return 1; break; } http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.25r2=1.26diff_format=u Index: php-src/ext/oci8/php_oci8_int.h diff -u php-src/ext/oci8/php_oci8_int.h:1.25 php-src/ext/oci8/php_oci8_int.h:1.26 --- php-src/ext/oci8/php_oci8_int.h:1.25Fri Nov 10 21:55:05 2006 +++ php-src/ext/oci8/php_oci8_int.h Fri Nov 10 23:03:23 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: php_oci8_int.h,v 1.25 2006/11/10 21:55:05 tony2001 Exp $ */ +/* $Id: php_oci8_int.h,v 1.26 2006/11/10 23:03:23 tony2001 Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H @@ -335,7 +335,7 @@ int php_oci_lob_get_type(php_oci_descriptor *descriptor, php_oci_lob_type *lob_type TSRMLS_DC); int php_oci_lob_read (php_oci_descriptor *, long, long, zstr *, ub4 * TSRMLS_DC); int php_oci_lob_write (php_oci_descriptor *, ub4, zstr, int, ub4 * TSRMLS_DC); -int php_oci_lob_flush (php_oci_descriptor *, int TSRMLS_DC); +int php_oci_lob_flush (php_oci_descriptor *, long TSRMLS_DC); int php_oci_lob_set_buffering (php_oci_descriptor *, int TSRMLS_DC); int php_oci_lob_get_buffering (php_oci_descriptor *); int php_oci_lob_copy (php_oci_descriptor *, php_oci_descriptor *, long TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8 oci8_interface.c oci8_lob.c php_oci8_int.h
tony2001Fri Nov 10 23:03:32 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8 oci8_interface.c oci8_lob.c php_oci8_int.h Log: MFH http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_interface.c?r1=1.8.2.7.2.3r2=1.8.2.7.2.4diff_format=u Index: php-src/ext/oci8/oci8_interface.c diff -u php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.3 php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.4 --- php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.3 Tue Aug 22 11:09:12 2006 +++ php-src/ext/oci8/oci8_interface.c Fri Nov 10 23:03:32 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_interface.c,v 1.8.2.7.2.3 2006/08/22 11:09:12 tony2001 Exp $ */ +/* $Id: oci8_interface.c,v 1.8.2.7.2.4 2006/11/10 23:03:32 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -674,7 +674,7 @@ { zval **tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; - ub4 flush_flag = 0; + long flush_flag = 0; if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, flush_flag) == FAILURE) { http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_lob.c?r1=1.7.2.6.2.6r2=1.7.2.6.2.7diff_format=u Index: php-src/ext/oci8/oci8_lob.c diff -u php-src/ext/oci8/oci8_lob.c:1.7.2.6.2.6 php-src/ext/oci8/oci8_lob.c:1.7.2.6.2.7 --- php-src/ext/oci8/oci8_lob.c:1.7.2.6.2.6 Tue Aug 22 11:09:12 2006 +++ php-src/ext/oci8/oci8_lob.c Fri Nov 10 23:03:32 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_lob.c,v 1.7.2.6.2.6 2006/08/22 11:09:12 tony2001 Exp $ */ +/* $Id: oci8_lob.c,v 1.7.2.6.2.7 2006/11/10 23:03:32 tony2001 Exp $ */ @@ -573,7 +573,7 @@ /* {{{ php_oci_lob_flush() Flush buffers for the LOB (only if they have been used) */ -int php_oci_lob_flush(php_oci_descriptor *descriptor, int flush_flag TSRMLS_DC) +int php_oci_lob_flush(php_oci_descriptor *descriptor, long flush_flag TSRMLS_DC) { OCILobLocator *lob = descriptor-descriptor; php_oci_connection *connection = descriptor-connection; @@ -588,7 +588,7 @@ /* only these two are allowed */ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid flag value: %d, flush_flag); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid flag value: %ld, flush_flag); return 1; break; } http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.11.2.6.2.9r2=1.11.2.6.2.10diff_format=u Index: php-src/ext/oci8/php_oci8_int.h diff -u php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.9 php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.10 --- php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.9Fri Nov 10 20:13:36 2006 +++ php-src/ext/oci8/php_oci8_int.h Fri Nov 10 23:03:32 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: php_oci8_int.h,v 1.11.2.6.2.9 2006/11/10 20:13:36 tony2001 Exp $ */ +/* $Id: php_oci8_int.h,v 1.11.2.6.2.10 2006/11/10 23:03:32 tony2001 Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H @@ -325,7 +325,7 @@ int php_oci_lob_get_length (php_oci_descriptor *, ub4 * TSRMLS_DC); int php_oci_lob_read (php_oci_descriptor *, long, long, char **, ub4 * TSRMLS_DC); int php_oci_lob_write (php_oci_descriptor *, ub4, char *, int, ub4 * TSRMLS_DC); -int php_oci_lob_flush (php_oci_descriptor *, int TSRMLS_DC); +int php_oci_lob_flush (php_oci_descriptor *, long TSRMLS_DC); int php_oci_lob_set_buffering (php_oci_descriptor *, int TSRMLS_DC); int php_oci_lob_get_buffering (php_oci_descriptor *); int php_oci_lob_copy (php_oci_descriptor *, php_oci_descriptor *, long TSRMLS_DC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/lib parse_tz.c
nlopess Fri Nov 10 23:27:11 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/lib parse_tz.c Log: fix the bug I introduced previously, sorry anyway, convert the recursive version of the binary search to an iterative one http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.20.2.6.2.7r2=1.20.2.6.2.8diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.7 php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.8 --- php-src/ext/date/lib/parse_tz.c:1.20.2.6.2.7Fri Nov 10 17:32:15 2006 +++ php-src/ext/date/lib/parse_tz.c Fri Nov 10 23:27:11 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_tz.c,v 1.20.2.6.2.7 2006/11/10 17:32:15 nlopess Exp $ */ +/* $Id: parse_tz.c,v 1.20.2.6.2.8 2006/11/10 23:27:11 nlopess Exp $ */ #include timelib.h @@ -192,39 +192,26 @@ } } -static int tz_search(char *timezone, unsigned int left, unsigned int right, const timelib_tzdb *tzdb) -{ - int mid, cmp; - - if (left right) { - return -1; /* not found */ - } - - mid = (left + right) / 2; - - cmp = strcasecmp(timezone, tzdb-index[mid].id); - if (cmp 0) { - return tz_search(timezone, left, mid - 1, tzdb); - } else if (cmp 0) { - return tz_search(timezone, mid + 1, right, tzdb); - } else { /* (cmp == 0) */ - return tzdb-index[mid].pos; - } -} - - static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) { - int pos; - - pos = tz_search(timezone, 0, tzdb-index_size - 1, tzdb); + int left = 0, right = tzdb-index_size - 1; - if (pos == -1) { - return 0; - } + do { + int mid = ((unsigned)left + right) 1; + int cmp = strcasecmp(timezone, tzdb-index[mid].id); + + if (cmp 0) { + right = mid - 1; + } else if (cmp 0) { + left = mid + 1; + } else { /* (cmp == 0) */ + (*tzf) = (tzdb-data[tzdb-index[mid].pos + 20]); + return 1; + } + + } while (left = right); - (*tzf) = (tzdb-data[pos + 20]); - return 1; + return 0; } const timelib_tzdb *timelib_builtin_db(void) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/lib parse_tz.c
nlopess Fri Nov 10 23:27:31 2006 UTC Modified files: /php-src/ext/date/lib parse_tz.c Log: MFB http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_tz.c?r1=1.31r2=1.32diff_format=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.31 php-src/ext/date/lib/parse_tz.c:1.32 --- php-src/ext/date/lib/parse_tz.c:1.31Fri Nov 10 17:32:42 2006 +++ php-src/ext/date/lib/parse_tz.c Fri Nov 10 23:27:31 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: parse_tz.c,v 1.31 2006/11/10 17:32:42 nlopess Exp $ */ +/* $Id: parse_tz.c,v 1.32 2006/11/10 23:27:31 nlopess Exp $ */ #include timelib.h @@ -192,39 +192,26 @@ } } -static int tz_search(char *timezone, unsigned int left, unsigned int right, const timelib_tzdb *tzdb) -{ - int mid, cmp; - - if (left right) { - return -1; /* not found */ - } - - mid = (left + right) / 2; - - cmp = strcasecmp(timezone, tzdb-index[mid].id); - if (cmp 0) { - return tz_search(timezone, left, mid - 1, tzdb); - } else if (cmp 0) { - return tz_search(timezone, mid + 1, right, tzdb); - } else { /* (cmp == 0) */ - return tzdb-index[mid].pos; - } -} - - static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) { - int pos; - - pos = tz_search(timezone, 0, tzdb-index_size - 1, tzdb); + int left = 0, right = tzdb-index_size - 1; - if (pos == -1) { - return 0; - } + do { + int mid = ((unsigned)left + right) 1; + int cmp = strcasecmp(timezone, tzdb-index[mid].id); + + if (cmp 0) { + right = mid - 1; + } else if (cmp 0) { + left = mid + 1; + } else { /* (cmp == 0) */ + (*tzf) = (tzdb-data[tzdb-index[mid].pos + 20]); + return 1; + } + + } while (left = right); - (*tzf) = (tzdb-data[pos + 20]); - return 1; + return 0; } const timelib_tzdb *timelib_builtin_db(void) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php