Re: [PHP-CVS] cvs: php-src /ext/sockets sockets.c ZendEngine2 ZEND_CHANGES zend_API.c zend_execute_API.c
Hello Marcus, Friday, October 24, 2003, 8:24:29 PM, you wrote: FUCK cvs! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /main SAPI.c /main/streams streams.c userspace.c /tests/lang bug24054.phpt
Hello Jani, Wednesday, September 17, 2003, 2:23:46 PM, you wrote: On Sat, 13 Sep 2003, Ard Biesheuvel wrote: Sascha and me had a deeper check upon this and it is absolutley NON portable. This is one of the C99 extensions only a few systems support. If we want the prefix 'z' then we could do it for our own php internal [v]s[np]printf implementations. But then we'd need to always use them and that's probably not the best idea. Any thoughts? In the userpsace.c case, just use %ld and use a cast to kill the warning. Otherwise, I don't think %zd is really necessary. Please fix what you committed yourself. %dz is fine for php_error_docref() now in HEAD. -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /main SAPI.c /main/streams streams.c userspace.c /tests/lang bug24054.phpt
Hello Zeev, Saturday, September 13, 2003, 5:54:45 PM, you wrote: I don't think %zd is portable. We need to come up with some alternative solution, or some check. Sascha and me had a deeper check upon this and it is absolutley NON portable. This is one of the C99 extensions only a few systems support. If we want the prefix 'z' then we could do it for our own php internal [v]s[np]printf implementations. But then we'd need to always use them and that's probably not the best idea. Any thoughts? However i will make [v]spprintf more compliant, but you must recognize that this doesn't affect [v]snprintf. -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_4_3) /main streams.c
Hello Stanislav, Tuesday, September 2, 2003, 12:21:03 PM, you wrote: SM stasTue Sep 2 06:21:03 2003 EDT SM Modified files: (Branch: PHP_4_3) SM /php-src/main streams.c SM Log: SM fix typo SM Index: php-src/main/streams.c SM diff -u php-src/main/streams.c:1.125.2.77 php-src/main/streams.c:1.125.2.78 SM --- php-src/main/streams.c:1.125.2.77 Tue Sep 2 05:17:09 2003 SM +++ php-src/main/streams.c Tue Sep 2 06:21:02 2003 SM @@ -20,7 +20,7 @@ SM +--+ SM */ SM -/* $Id: streams.c,v 1.125.2.77 2003/09/02 09:17:09 stas Exp $ */ SM +/* $Id: streams.c,v 1.125.2.78 2003/09/02 10:21:02 stas Exp $ */ SM #define _GNU_SOURCE SM #include php.h SM @@ -2462,7 +2462,7 @@ SM /* BC with older php scripts and zlib wrapper */ SM protocol = compress.zlib; SM n = 13; SM - if(options REPORT_ERRRORS) { SM + if(options REPORT_ERRORS) { SM php_error_docref(NULL TSRMLS_CC, E_WARNING, Use of \zlib:\ wrapper is deprecated; please use \compress.zlib://\ instead.); SM } SM } SM @@ -2471,7 +2471,7 @@ SM if (FAILURE == zend_hash_find(url_stream_wrappers_hash, (char*)protocol, n, (void**)wrapper)) { SM char wrapper_name[32]; SM - if(options REPORT_ERRRORS) { SM + if(options REPORT_ERRORS) { SM if (n = sizeof(wrapper_name)) SM n = sizeof(wrapper_name) - 1; SM PHP_STRLCPY(wrapper_name, protocol, sizeof(wrapper_name), n); Could you please also fix WS/CS Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: spl /examples tree.php
Hello Marcus, Thursday, August 14, 2003, 11:44:38 PM, you wrote: MB helly Thu Aug 14 17:44:38 2003 EDT MB Modified files: MB /spl/examples tree.php MB Log: MB Upds MB Index: spl/examples/tree.php MB diff -u spl/examples/tree.php:1.3 spl/examples/tree.php:1.4 MB --- spl/examples/tree.php:1.3 Thu Aug 14 17:14:04 2003 MB +++ spl/examples/tree.php Thu Aug 14 17:44:38 2003 MB @@ -11,7 +11,7 @@ MB require_once(sub_dir.inc); MB -foreach(new sub_dir($argv[1], true, isset($argv[1]) ? $argv[1] : false) as $f) { MB +foreach(new sub_dir($argv[1], true, isset($argv[2]) ? $argv[2] : false) as $f) { MB echo $f\n; MB } My thanks go to rob :-) -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /tests/lang foreach_with_references_001.phpt
Hello Zeev, Thursday, July 24, 2003, 3:21:54 PM, you wrote: ZS zeevThu Jul 24 09:21:54 2003 EDT ZS Added files: ZS /php-src/tests/lang foreach_with_references_001.phpt ZS Log: ZS Add foreach() test with references ZS Index: php-src/tests/lang/foreach_with_references_001.phpt ZS +++ php-src/tests/lang/foreach_with_references_001.phpt ZS --TEST-- ZS foreach() with references ZS --FILE-- ZS ?php $arr = array(1 = one, 2 = two, 3 = three); ZS foreach($arr as $key = $val) { ZS $val = $key; ZS } ZS print_r($arr); ZS foreach($arr as $key = $val) { ZS $val = $key; ZS } ZS print_r($arr); ZS --EXPECT-- ZS Array ZS ( ZS [1] = one ZS [2] = two ZS [3] = three ZS ) ZS Array ZS ( ZS [1] = 1 ZS [2] = 2 ZS [3] = 3 ZS ) WOW Coool :-) but there is one thing i wonder about: php -r '$ar=array(1=a,2=b,3=c);foreach($ar as $k=$v) if ($k==2) unset($v); print_r($ar);' Array ( [1] = a [2] = b [3] = c ) I guess the main question is what should happen? I'd expect the result to be $ar[2] = NULL since obviously you can't unset $ar[2] this way. (I tried this because in SPL you can). Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-CVS] cvs: spl / spl_foreach.c
Hello Jason, Wednesday, July 9, 2003, 4:57:19 AM, you wrote: JG Actually, I double checked C99, and // was added, however C89 does not. JG -Jason JG On Tue, 2003-07-08 at 21:48, Jason Greene wrote: jason Tue Jul 8 22:48:25 2003 EDT Modified files: /spl spl_foreach.c Log: Convert C++ comments to C (violates C99, and breaks several compilers) Index: spl/spl_foreach.c diff -u spl/spl_foreach.c:1.15 spl/spl_foreach.c:1.16 --- spl/spl_foreach.c:1.15Tue Jul 8 19:11:14 2003 +++ spl/spl_foreach.c Tue Jul 8 22:48:25 2003 @@ -151,10 +151,10 @@ if (proxy-is_a SPL_IS_A_SEQUENCE) { spl_begin_method_call_no_retval(obj, proxy-obj_ce, proxy-funcs.rewind, rewind, sizeof(rewind)-1 TSRMLS_CC); } - // now this is an optimization trick: - // ZEND_SWITCH_FREE receives the array copy or the spl object in op1 and has an unused op2 - // We have to check for op1 being an object that implements spl_forwar... Or we simply set - // op2 and know we can safely free the object as needed, which is waht we do. + /* now this is an optimization trick: +ZEND_SWITCH_FREE receives the array copy or the spl object in op1 and has an unused op2 +We have to check for op1 being an object that implements spl_forwar... Or we simply set +op2 and know we can safely free the object as needed, which is waht we do. */ op_array-opcodes[EX(opline)-op2.u.opline_num].op2 = *op1; } @@ -242,7 +242,7 @@ /* {{{ ZEND_EXECUTE_HOOK_FUNCTION(ZEND_SWITCH_FREE) */ ZEND_EXECUTE_HOOK_FUNCTION(ZEND_SWITCH_FREE) { - // See not in ZEND_FE_FETCH on setting op2 + /* See not in ZEND_FE_FETCH on setting op2 */ znode *op2 = EX(opline)-op2; zval *tmp, **obj = spl_get_zval_ptr_ptr(op2, EX(Ts) TSRMLS_CC); spl_foreach_proxy *proxy; JG -- JG Jason Greene [EMAIL PROTECTED] JG [EMAIL PROTECTED] JG Children's talent to endure stems from their ignorance of alternatives. JG -- Maya Angelou, I Know Why the Caged Bird Sings Sure thanks! I forgot to change that -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / configure.in /sapi/cgi Makefile.frag config9.m4
Hello Jani, Tuesday, July 1, 2003, 7:01:21 PM, you wrote: JT sniper Tue Jul 1 13:01:21 2003 EDT JT Modified files: JT /php-srcconfigure.in JT /php-src/sapi/cgi Makefile.frag config9.m4 JT Log: JT - Separate CGI build from regular SAPI build JT # Creating the libphp5.a lib is not necessary for CGI build. JT # JT # btw. It would be quite easy to build CGI, CLI and for example Apache SAPI JT # the same time.. :) Cool, finally after one year :-) -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-CVS] cvs: php-src /tests/classes clone_002.phpt
Hello Jani, Wednesday, July 2, 2003, 1:58:29 AM, you wrote: JT Why do all these test check the ZE version??? JT This branch uses ZE2 anyway? Maybe you edit them whit SED and remove those chacks all ? -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP-CVS] cvs: php4 /ext/dba dba_db4.c
Hello Thies, it would be possible, maybe. But it seems like there are coming more changes. Also the current layout is that every handler has it's own .c and .h files as well as a generic test. Since you can only have one of the db handler the source may be duplicated but only one generates code. So i don't think this is anything to worry about. marcus Thursday, June 19, 2003, 1:30:40 PM, you wrote: TCA On Thu, Jun 19, 2003 at 11:10:14AM -, Marcus Boerger wrote: helly Thu Jun 19 07:10:14 2003 EDT Modified files: /php4/ext/dba dba_db4.c Log: to be precise TCA i have a quick question: TCA cant't we just drop the db4 stuff? diff dba_db3.c TCA dba_db4.c shows that there is a maximum of 10 lines different TCA between those (not counting the DB3 - DB4 renaming). i see TCA no real reason this code (dba_db3.c) needs to be duplicated TCA in order to support sleepycat V4. TCA re, TCA tc Index: php4/ext/dba/dba_db4.c diff -u php4/ext/dba/dba_db4.c:1.8 php4/ext/dba/dba_db4.c:1.9 --- php4/ext/dba/dba_db4.c:1.8Tue Jun 10 16:03:26 2003 +++ php4/ext/dba/dba_db4.cThu Jun 19 07:10:14 2003 @@ -12,11 +12,12 @@ | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Author: Sascha Schumann [EMAIL PROTECTED] | + | Authors: Marcus Boerger [EMAIL PROTECTED] | + | Sascha Schumann [EMAIL PROTECTED]| +--+ */ -/* $Id: dba_db4.c,v 1.8 2003/06/10 20:03:26 imajes Exp $ */ +/* $Id: dba_db4.c,v 1.9 2003/06/19 11:10:14 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php TCA -- TCA Thies C. Arntzen - Looking for all sorts of freelance work - just ask.. TCA http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ -- Best regards, Marcusmailto:[EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard info.c
At 23:23 30.05.2003, Jani Taskinen wrote: MFH? No need for, 4.3 only issue. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/exif exif.c
At 23:26 30.05.2003, Jani Taskinen wrote: MFH? If you insist then, yes, otherwise both versions are fine :-) marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: spl / spl_functions.c
At 14:46 29.05.2003, Andrei Zmievski wrote: On Tue, 27 May 2003, Marcus Boerger wrote: helly Mon May 26 20:14:04 2003 EDT Modified files: /spl spl_functions.c Log: For now that works. # However some of the register stuff must be moved to the engine. # And inside the engine some fixes are needed, too. Marcus, How long before you copy the entire Zend engine into spl*.c? Hehe, no i need to fix the things in the engine and then get rid of the code in spl. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / TODO
At 00:29 13.04.2003, Moriyoshi Koizumi wrote: moriyoshi Sat Apr 12 18:29:01 2003 EDT Modified files: /php4 TODO Log: Moved a controversial entry to the proper place # maybe it's time to replace output buffering facility with the streams? Repost to internals@ as RFC my vote would be a strong + marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
+ if (dstW 0 || dstH 0 || srcW 0 || srcH 0) { Why is that not = marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main main.c
At 15:54 31.03.2003, Andrei Zmievski wrote: On Sun, 30 Mar 2003, Marcus Boerger wrote: /* {{{ includes */ @@ -575,6 +575,8 @@ /* {{{ php_error_cb extended error handling function */ +#define NO_NULL_STR(x) (x?x:) + Why not use STR_PRINT()? good question? I'll change it -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c
At 18:19 24.03.2003, Moriyoshi Koizumi wrote: Sorry for being a bit late, but this commit broke BC. I cannot override php.ini settings by -d options any more. Hm, not for me. [EMAIL PROTECTED] php4-HEAD]$ php -r 'var_dump(ini_get(html_errors));' string(0) [EMAIL PROTECTED] php4-HEAD]$ php -d html_errors=1 -r 'var_dump(ini_get(html_errors));' string(1) 1 marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c
At 20:11 24.03.2003, Moriyoshi Koizumi wrote: [EMAIL PROTECTED] (Marcus Börger) wrote: At 18:19 24.03.2003, Moriyoshi Koizumi wrote: Sorry for being a bit late, but this commit broke BC. I cannot override php.ini settings by -d options any more. Hm, not for me. [EMAIL PROTECTED] php4-HEAD]$ php -r 'var_dump(ini_get(html_errors));' string(0) [EMAIL PROTECTED] php4-HEAD]$ php -d html_errors=1 -r 'var_dump(ini_get(html_errors));' string(1) 1 Try preparing a ini file that has html_errors directive and doing the same thing with that. There must be something else (i tested all combinations before i committed) but did it again now and here are the results: [EMAIL PROTECTED] php4-HEAD]$ grep html_errors ~/php-cli.ini html_errors = On [EMAIL PROTECTED] php4-HEAD]$ php -r 'var_dump(ini_get(html_errors));' string(1) 1 [EMAIL PROTECTED] php4-HEAD]$ php -d html_errors=0 -r 'var_dump(ini_get(html_errors));' string(1) 0 [EMAIL PROTECTED] php4-HEAD]$ grep html_errors ~/php-cli.ini html_errors = Off [EMAIL PROTECTED] php4-HEAD]$ php -r 'var_dump(ini_get(html_errors));' string(0) [EMAIL PROTECTED] php4-HEAD]$ php -d html_errors=1 -r 'var_dump(ini_get(html_errors));' string(1) 1 [EMAIL PROTECTED] php4-HEAD]$ grep html_errors ~/php-cli.ini ;html_errors = Off [EMAIL PROTECTED] php4-HEAD]$ php -r 'var_dump(ini_get(html_errors));' string(1) 1 [EMAIL PROTECTED] php4-HEAD]$ php -d html_errors=0 -r 'var_dump(ini_get(html_errors));' string(1) 0 However you reminded me that i must change the default setting. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / php.ini-dist php.ini-recommended /main main.c
At 22:10 16.03.2003, Shane Caraveo wrote: Marcus Boerger wrote: helly Sun Mar 16 15:47:56 2003 EDT Modified files: /php4/main main.c /php4php.ini-dist php.ini-recommended Log: - disable html_errors per default as suggested by php.ini-xxx - new error format that does not point to any documentation (if either not html_errors or no docref_root given e.g.: production boxes and default) - documentation update in php.ini-xxx # hope everyone is happy now # and why on earth was enabling html_errors default? Sorry, not so happy. phpinfo() requires html_errors = on to display the info page in html. Something needs to be done about that, since it's awfully anoying to get plain text in that page when going over http. Shane The correct solution is to untie phpinfo() from html_erros marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /tests/classes interfaces_001.phpt interfaces_002.phpt type_hinting_001.phpt /tests/lang type_hints_001.phpt
At 16:56 07.03.2003, J Smith wrote: jay Fri Mar 7 10:56:31 2003 EDT Added files: /php4/tests/langtype_hints_001.phpt /php4/tests/classes interfaces_001.phpt interfaces_002.phpt type_hinting_001.phpt Log: Added tests for interfaces and class type hinting. Couldn't you wait? I have a complete set of tests for interfaces already but it makes no sense to commit them as long as there are so many memleaks marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /main main.c
At 02:54 03.03.2003, Harald Radi wrote: phanto Sun Mar 2 20:54:29 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main main.c Log: MFH: adding disable_classes ini directive Why was this *new functionality* MFHed? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php4(PHP_4_3) /main main.c
At 12:13 03.03.2003, Harald Radi wrote: because it is a rather small manageable security fix ? Ah security is reason enough -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / php.ini-dist php.ini-recommended /ext/filepro filepro.c /ext/session session.c /main main.c php_globals.h php_variables.c php_variables.h
At 11:19 02.03.2003, Zeev Suraski wrote: zeevSun Mar 2 05:19:17 2003 EDT Log: Add JIT initialization for _SERVER and _ENV (it's less important for the others, even though it should be fairly easy now too) argc/v foes no longer work for CLI for example you can no longer do: php run-tests.php directory Try: php run-tests.php tests/basic/012.phpt And we have a problem with $GLOBALS (try run-tests.php without my patch following this email) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h /main/streams plain_wrapper.c
At 02:39 25.02.2003, Ilia Alshanetsky wrote: iliaa Mon Feb 24 20:39:07 2003 EDT Log: Added locking to streams. Allow PHP to automatically release locks on files when terminating the stream. Fixed bugs in the handling of the 3rd optional parameter to flock(). What about updating README.STREAMS ? regards marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cgi cgi_main.c
At 21:28 13.02.2003, Shane Caraveo wrote: MFH? Marcus Boerger wrote: helly Thu Feb 13 14:46:41 2003 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: fix non FCGI build Sure - but i am trying to get my system fixed and reconfigured due to that bloody libtool problem ... AAARGSS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c
At 17:18 11.02.2003, Ilia Alshanetsky wrote: iliaa Tue Feb 11 11:18:43 2003 EDT Modified files: /php4/sapi/cli php_cli.c Log: Added -H option to CLI binary. This option can be used to hide any arguments including the script name passed to the CLI binary. Why will i hide command line arguments from command line, does this make sense? @@ -844,6 +849,14 @@ } CG(start_lineno) = lineno; *arg_excp = arg_free; /* reconstuct argv */ + + if (hide_argv) { + int i; + for (i = 1; i argc; i++) { + memset(argv[i], 0, strlen(argv[i])); + } + } + if (no_headers) { SG(headers_sent) = 1; SG(request_info).no_headers = 1; Are you sure this is correct? I mean the variables are registered in php_request_startup(TSRMLS_C)==FAILURE) above your change. And even if it works you shall never ever mess around with the stuff send be main (erm upd i did my self already - but see code above your change). regards marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c
At 21:14 11.02.2003, Ilia A. wrote: real data is avaliable within the PHP script. The only purpose of this code is to hide argv/argc from being visible via the ps command. Ilia Ok, now i see the point - that makes sense and indeed a good catch. manpage update follows marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main SAPI.c
At 00:17 12.02.2003, Stefan Esser wrote: On Wed, Feb 12, 2003 at 08:13:49AM +0900, Moriyoshi Koizumi wrote: some clarification here so I can find snprintf related bugs elsewhere. As long as snprintf must not truncate it will return the number of written bytes (excluding '\0'). If sprintf must truncate it either returns -1 or (if it is C99 compatible) the number of bytes that would have been written if there would be enough space. But we always have C99 compliant snprintf since we will use our own snprintf if the c-lib is not C99 compliant. We do so because we depend on some C99 specifications in out print functions - we found out in tests. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main SAPI.c
At 00:19 12.02.2003, Sascha Schumann wrote: On Wed, 12 Feb 2003, Stefan Esser wrote: On Wed, Feb 12, 2003 at 08:13:49AM +0900, Moriyoshi Koizumi wrote: some clarification here so I can find snprintf related bugs elsewhere. As long as snprintf must not truncate it will return the number of written bytes (excluding '\0'). If sprintf must truncate it either returns -1 or (if it is C99 compatible) the number of bytes that would have been written if there would be enough space. And that's the problem. snprintf usage should always look similar to this: snprintf(buf, sizeof(buf), fmt, ...); buf[sizeof(buf)-1] = '\0'; YES we need do do so for MSVC.6. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main SAPI.c
At 01:40 12.02.2003, Marcus Börger wrote: At 00:17 12.02.2003, Stefan Esser wrote: On Wed, Feb 12, 2003 at 08:13:49AM +0900, Moriyoshi Koizumi wrote: some clarification here so I can find snprintf related bugs elsewhere. As long as snprintf must not truncate it will return the number of written bytes (excluding '\0'). If sprintf must truncate it either returns -1 or (if it is C99 compatible) the number of bytes that would have been written if there would be enough space. But we always have C99 compliant snprintf since we will use our own snprintf if the c-lib is not C99 compliant. We do so because we depend on some C99 specifications in out print functions - we found out in tests. I meant this for *nix (e.g. everything that uses configure). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main SAPI.c
At 21:18 10.02.2003, you wrote: moriyoshi Mon Feb 10 15:18:08 2003 EDT Modified files: /php4/main SAPI.c Log: Fixed possible snprintf problem # besides snprintf returns int value, not uint / size_t... Why not use spprintf before you make it even more complex? Something like this: if(!strstr(lower_temp,realm)) { efree(result); spprintf(result, 0, %s realm=\%ld\,ptr, myuid); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main SAPI.c
At 21:40 10.02.2003, Moriyoshi Koizumi wrote: [EMAIL PROTECTED] (Marcus Börger) wrote: Why not use spprintf before you make it even more complex? Something like this: if(!strstr(lower_temp,realm)) { efree(result); spprintf(result, 0, %s realm=\%ld\,ptr, myuid); } Because spprintf is just considerably s..l..o..w... I always prefer to avoid using that function as long as I can reasonably estimate the length of result in advance. Moriyoshi Ah, Ok then. I see i should have made spprintf's interface to support an estimated sizebut then !! i see the real problem here, i overlooked it when rewriting the stuffyes it is really!! slowbut how about this change: cvs -z3 -q diff spprintf.c (in directory S:\php4-HEAD\main\) Index: spprintf.c === RCS file: /repository/php4/main/spprintf.c,v retrieving revision 1.11 diff -u -r1.11 spprintf.c --- spprintf.c 31 Dec 2002 15:58:54 - 1.11 +++ spprintf.c 10 Feb 2003 21:19:46 - @@ -177,6 +177,21 @@ cc++; \ } +#define INS_STRING(xbuf, s, slen, cc) \ + xbuf_resize(xbuf, s_len); \ + if (xbuf-nextb+slen xbuf-buf_end) { \ + fprintf(stderr, Using(%d); '%s'\n, slen, s);\ + memcpy(xbuf-nextb, s, slen); \ + xbuf-nextb += slen;\ + cc += slen; \ + s += slen; \ + } else {\ + for (i = s_len; i != 0; i--) { \ + INS_CHAR_NR(xbuf, *s, cc); \ + s++;\ + } \ + } + #define INS_CHAR(xbuf, ch, cc) \ xbuf_resize(xbuf, 1); \ INS_CHAR_NR(xbuf, ch, cc) @@ -582,11 +597,7 @@ /* * Print the string s. */ - xbuf_resize(xbuf, s_len); - for (i = s_len; i != 0; i--) { - INS_CHAR_NR(xbuf, *s, cc); - s++; - } + INS_STRING(xbuf, s, s_len, cc); if (adjust_width adjust == LEFT min_width s_len) PAD(xbuf, min_width, s_len, pad_char); This should besides some aditional setup in abot two additional function calls basically do the same then the typical strlen, strlen, malloc, memcpy, memcpy, s[x]=0 stuff. regards marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /main SAPI.c
Have you looked at smart_strs? That's the way to go, if you want to get rid of nasty size calculations/checks and ugly memcpy calls. Basically spprintf was designed to be an easy replacement for all the other sprintf derivates. But perhaps i should have used the smart strings inside it. Maybe we wouldnt have the floating point problem with more than 512 digits? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
At 20:57 09.02.2003, Jani Taskinen wrote: sniper Sun Feb 9 14:57:51 2003 EDT Modified files: /php4/ext/dba config.m4 Log: break: First one not needed, second missing. Thanks for the fix :-) marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c
At 15:56 08.02.2003, Jani Taskinen wrote: Just curious..but was there some agreement on keeping these obscure options?? I kinda missed the discussion.. --Jani Some few people were against and Edin liked the idea after playing around with it. So both maintainers of the cli sapi are on the pro side and i went further and made it a round thing. Again i did this to ease use - a thing many guys here are missing. If the discusion starts again and people are against there's no propbelem removing the feature. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/bcmath bcmath.c
At 22:07 04.02.2003, Andi Gutmans wrote: andiTue Feb 4 16:07:40 2003 EDT Modified files: /php4/ext/bcmathbcmath.c Log: - Please follow coding standards (this isn't java :) I only corrected this... -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
At 12:25 03.02.2003, Jani Taskinen wrote: Isn't XPM support available with anything but our bundled GD lib?? --Jani Current code says it is only available with bundled version so i added a notice on that. The second reason i did it was that many people will look at the info and think: Well it is not mentioned so it is not available. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c
At 19:43 03.02.2003, Jani Taskinen wrote: On Mon, 3 Feb 2003, Marcus Börger wrote: At 19:26 03.02.2003, Jani Taskinen wrote: I hope you're not mixing Xpm with XBM ? Since Xpm funcs ARE available in the GD lib from Boutell too.. I hope so, too. I had a look into the source and it has a #ifdef around teh call which results in XPM only being available in bundled library. Maybe someone has to check if the reasons Yeah, as you just added those? for doing so are meanwhile fixed by boutell. Apart from that i just enabled/fixed XBM during the weekend. Or what #ifdeds do you mean? --Jani I just added #ifdefs for the info output. The function call was already guarded by those #ifdefs. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c
At 08:41 03.02.2003, Sebastian Bergmann wrote: sebastian Mon Feb 3 02:41:06 2003 EDT Modified files: /php4/sapi/cli php_cli.c Log: Fix ZTS build. Thanks, i was sure i did latest changes before commit with a ZTS version...but it seems i have to many php source directories. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
Why? I thought when trying to link with only the new libraries i could test them alone. On which library did it fail for you? And if i reset LIBS what is the complete difference? marcus At 19:37 30.01.2003, Jani Taskinen wrote: configure: error: cannot find necessary library You need to reset the LIBS too.. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
At 11:55 28.01.2003, Jani Taskinen wrote: sniper Tue Jan 28 05:55:36 2003 EDT Modified files: /php4/ext/dba config.m4 Log: Fix configure. (typo?) It didn't notice that...it's from my test version where i could need some help but currently i am not at all knowing the problem really... marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
At 00:04 30.01.2003, Marcus Börger wrote: At 11:55 28.01.2003, Jani Taskinen wrote: sniper Tue Jan 28 05:55:36 2003 EDT Modified files: /php4/ext/dba config.m4 Log: Fix configure. (typo?) It didn't notice that...it's from my test version where i could need some help but currently i am not at all knowing the problem really... marcus Ok, one part of my problem is linking against a special version while having multiple versions of say db3. The following works for. Does it work for you, too? (Now it is *no* type) cvs -z3 -q diff config.m4 (in directory S:\php4-HEAD\ext\dba) Index: config.m4 === RCS file: /repository/php4/ext/dba/config.m4,v retrieving revision 1.38 diff -u -r1.38 config.m4 --- config.m4 28 Jan 2003 10:55:36 - 1.38 +++ config.m4 30 Jan 2003 00:47:29 - @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.38 2003/01/28 10:55:36 sniper Exp $ +dnl $Id: config.m4,v 1.29.2.6 2003/01/28 06:27:19 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -10,7 +10,8 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS - LDFLAGS=$1 $LDFLAGS +dnl LDFLAGS=$1 $LDFLAGS + LDFLAGS=$1 $2 LDFLAGS=$old_LDFLAGS ]) @@ -139,18 +140,20 @@ dnl parameters(version, library list, function) AC_DEFUN(PHP_DBA_DB_CHECK,[ for LIB in $2; do -PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ - AC_CHECK_LIB($LIB, $3, [ -AC_EGREP_CPP(yes,[ +if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then + PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ +AC_CHECK_LIB($LIB, $3, [ + AC_EGREP_CPP(yes,[ #include $THIS_INCLUDE yes #endif -],[ - THIS_LIBS=$LIB - break + ],[ +THIS_LIBS=$LIB +break + ]) ]) ]) -]) +fi done if test $1 = 4; then AC_MSG_CHECKING(for db4 minor version and patch level)
Re: [PHP-CVS] cvs: php4 /ext/mime_magic config.m4
At 10:23 27.01.2003, Jani Taskinen wrote: It still looks for '/usr/share/magic' file thus your fix doesn't fix anything. Attached is a bit better version of the config.m4, please let me know if it's ok to commit. --Jani Looks good to me marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magic config.m4
At 02:00 28.01.2003, Jani Taskinen wrote: sniper Mon Jan 27 20:00:16 2003 EDT Modified files: /php4/ext/mime_magicconfig.m4 Log: - Cleaned up and made less error-prone - Changed --enable-mime-magic - --with-mime-magic[=FILE] to allow specifying of the file during configure. Index: php4/ext/mime_magic/config.m4 diff -u php4/ext/mime_magic/config.m4:1.7 php4/ext/mime_magic/config.m4:1.8 --- php4/ext/mime_magic/config.m4:1.7 Sat Jan 25 05:51:04 2003 +++ php4/ext/mime_magic/config.m4 Mon Jan 27 20:00:15 2003 @@ -1,28 +1,37 @@ -dnl $Id: config.m4,v 1.7 2003/01/25 10:51:04 hholzgra Exp $ -dnl config.m4 for extension mime_magic +dnl +dnl $Id: config.m4,v 1.8 2003/01/28 01:00:15 sniper Exp $ +dnl -PHP_ARG_ENABLE(mime-magic, whether to enable mime_magic support, -[ --enable-mime-magic Enable mime_magic support]) +PHP_ARG_WITH(mime-magic, whether to include mime_magic support, +[ --with-mime-magic[=FILE] Include mime_magic support. FILE is the optional +pathname to the magic.mime file.]) -if test $PHP_MIME_MAGIC = yes; then - dnl PHP_SUBST(MIME_MAGIC_SHARED_LIBADD) +if test $PHP_MIME_MAGIC != no; then PHP_NEW_EXTENSION(mime_magic, mime_magic.c, $ext_shared) - # Try to see if we can find the path of the magic file in its - # default locations. - if test -f /usr/share/magic.mime ; then - PHP_MIME_MAGIC_FILE_PATH=/usr/share/magic.mime - elif test -f /usr/share/magic ; then - PHP_MIME_MAGIC_FILE_PATH=/usr/share/magic - elif test -f /usr/share/misc/magic.mime ; then - PHP_MIME_MAGIC_FILE_PATH=/usr/share/misc/magic.mime - elif test -f /etc/magic ; then - PHP_MIME_MAGIC_FILE_PATH=/etc/magic.mime + PHP_MIME_MAGIC_FILE_PATH= + + dnl + dnl Try to see if we can find the path of the magic file in its default locations. + dnl + if test $PHP_MIME_MAGIC = yes; then +if test -f $PHP_MIME_MAGIC; then + PHP_MIME_MAGIC_FILE_PATH=$PHP_MIME_MAGIC +else + AC_MSG_ERROR([File '$PHP_MIME_MAGIC' not found!]) +fi else - PHP_MIME_MAGIC_FILE_PATH= - fi +MAGIC_MIME_LOCATIONS=/usr/share/magic.mime /usr/share/misc/magic.mime /etc/magic.mime +for i in $MAGIC_MIME_LOCATIONS; do + if test -f $i; then +PHP_MIME_MAGIC_FILE_PATH=$i +break + fi +done + fi + AC_DEFINE_UNQUOTED(PHP_MIME_MAGIC_FILE_PATH,$PHP_MIME_MAGIC_FILE_PATH,[magic file path]) fi As far as i understand that code you are looking for a file called yes now. I guess you meant if the configure value is neither yes nor no search for that beeing a file. With check against no already done this looks like != instead of =: if test $PHP_MIME_MAGIC != yes; then if test -f $PHP_MIME_MAGIC; then -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mime_magic config.m4
At 11:51 25.01.2003, Hartmut Holzgraefe wrote: hholzgraSat Jan 25 05:51:04 2003 EDT Modified files: /php4/ext/mime_magicconfig.m4 Log: suggesting a plain magic file insteat of a mime one is a bad idea Index: php4/ext/mime_magic/config.m4 diff -u php4/ext/mime_magic/config.m4:1.6 php4/ext/mime_magic/config.m4:1.7 --- php4/ext/mime_magic/config.m4:1.6 Tue Sep 24 02:37:17 2002 +++ php4/ext/mime_magic/config.m4 Sat Jan 25 05:51:04 2003 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.6 2002/09/24 06:37:17 sas Exp $ +dnl $Id: config.m4,v 1.7 2003/01/25 10:51:04 hholzgra Exp $ dnl config.m4 for extension mime_magic PHP_ARG_ENABLE(mime-magic, whether to enable mime_magic support, @@ -18,7 +18,7 @@ elif test -f /usr/share/misc/magic.mime ; then PHP_MIME_MAGIC_FILE_PATH=/usr/share/misc/magic.mime elif test -f /etc/magic ; then - PHP_MIME_MAGIC_FILE_PATH=/etc/magic + PHP_MIME_MAGIC_FILE_PATH=/etc/magic.mime else PHP_MIME_MAGIC_FILE_PATH= fi Shouldn't you change the test above to elif test -f /etc/magic.mime ; then marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / configure.in
At 07:42 23.01.2003, Jani Taskinen wrote: sniper Thu Jan 23 01:42:43 2003 EDT Modified files: /php4 configure.in Log: remove this stupid highlight which causes trouble. Which trouble? Other parts of the scripts do exactly the same thing so please revert. regards marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard/tests/image getimagesize.phpt
At 00:57 18.01.2003, Ilia Alshanetsky wrote: iliaa Fri Jan 17 18:57:43 2003 EDT Modified files: /php4/ext/standard/tests/image getimagesize.phpt Log: Added missing test result. Thanks - i forgot to commit that one to marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /main SAPI.h
At 11:28 18.01.2003, Andi Gutmans wrote: At 06:42 PM 1/15/2003 +0100, Derick Rethans wrote: On Wed, 15 Jan 2003, Shane Caraveo wrote: Edin Kadribasic wrote: I think that we should relax this contraint a bit on PHP_4_3 due to the fact that head is not likely going to see realeased version for some time to come due to the move to PHP 5. What should realy happen is a PHP4_HEAD branch is made. It would allow for keeping the purity of the 4_3 branch while having a looser branch for work. It may sound like an extra step, but it's still a good thing to do. Right, but we can't make that branch from HEAD now because things were already moved/deleted/updated there, and as we're not going to release 4.4. anyway, why keep it 'pure'? It will only makes things much harder to handle. I'm -1 on creating a seperate branch. I agree with Derick. We should just stick to PHP_4_3. Andi Agre from me too! I will not go and make one more branch for more than one platform andand and -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/exif exif.c
At 19:32 18.01.2003, Ilia Alshanetsky wrote: iliaa Sat Jan 18 13:32:21 2003 EDT Modified files: /php4/ext/exif exif.c Log: Removed the no longer needed memory allocation checks. After my reworked patch - what made you sure EXIF_ERRLOG_FSREALLOC is not needed? marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/swf swf.c
At 21:35 18.01.2003, Ilia A. wrote: My next goal is to remove some 690 php_error() form ext/ and about 100 or so zend_error(). So, if you have any automated tools, they'd be of great help. Ilia I meant the php_error thing and for that i have a script: http://marcus-boerger.de/php/ext/docref.txt I hope that helps :-) marcus p.s: Wow excluding google bot it was downloaded 300 times...121 times referred from http://www.zend.com/zend/week/week112.php - iguess avin was a bit missleading in his summary. -- -- Marcus Börger - Looking for all sorts of freelance work - just ask... Did i help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/ho722v0rg1u0 --
Re: [PHP-CVS] cvs: php4 /ext/swf swf.c
At 21:35 18.01.2003, Marcus Börger wrote: At 21:35 18.01.2003, Ilia A. wrote: My next goal is to remove some 690 php_error() form ext/ and about 100 or so zend_error(). So, if you have any automated tools, they'd be of great help. Ilia I meant the php_error thing and for that i have a script: http://marcus-boerger.de/php/ext/docref.txt I hope that helps :-) marcus p.s: Wow excluding google bot it was downloaded 300 times...121 times referred from http://www.zend.com/zend/week/week112.php - iguess avin was a bit missleading in his summary. You can change all occurences when a) you skip main/main.c b) you use two sed commands in one go: cat ${i} | sed s/\(php_error\|zend_error\)\([[:space:]]*(\)\([^\]*\\)\(%s()\:\?[[:space:]]*\)\(.*\)\(,[[:space:]]*get_active_function_name[[:space:]]*([[:space:]]*TSRMLS_C[[:space:]]*)\)/php_error_docref(NULL TSRMLS_CC, \3\5/g | \ sed s/\(php_error\|zend_error\)\([[:space:]]*([[:space:]]*\)/php_error_docref(NULL TSRMLS_CC, /g \ $i.tmp sorry i do not have the time to make a new skrip. maybe tomorrow or on monday if you cna wait... marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php4 /ext/com .cvsignore COM.c CREDITS TODO VARIANT.c com.h conversion.c conversion.h dispatch.c php_COM.h php_VARIANT.h variant.h
At 09:57 11.01.2003, Harald Radi wrote: Removed files: /php4/ext/com the ZE2 version is located in ext/rpc/com so what's wrong ? ok my fault - i just missread the mail sorry marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/overload .cvsignore CREDITS README config.m4 overload.c overload.dsp php_overload.h
At 00:40 11.01.2003, Harald Radi wrote: phanto Fri Jan 10 18:40:13 2003 EDT Removed files: /php4/ext/overload .cvsignore config.m4 CREDITS overload.c overload.dsp php_overload.h README Log: this is now implemented by the engine itself But now you removed it for ZE1, too. Wouldn't it be better to simply disable overload in ZE2 as we did until you removed it? marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / NEWS
At 01:06 03.01.2003, Jani Taskinen wrote: sniper Thu Jan 2 19:06:24 2003 EDT Modified files: /php4 NEWS Log: - Removed entries that are going to 4.3.1 - Grouped the entries a bit. Index: php4/NEWS diff -u php4/NEWS:1.1297 php4/NEWS:1.1298 --- php4/NEWS:1.1297Mon Dec 30 20:33:05 2002 +++ php4/NEWS Thu Jan 2 19:06:23 2003 @@ -1,33 +1,16 @@ PHP 4 NEWS ||| ? ? ??? 200?, Version 4.4.0 -- Improved dba extension (Marcus) (snip) These are not in 4.3.1: -- Improved dba extension (Marcus) - . Made handler parameter of dba_(p)open() optional. - . Added php.ini option 'dba.default_handler' to specify a default handler. - . Added parameter full_info to dba_handlers() that can be set true to -receive information about the handlers such like the library version. These will be in 4.3.1: - . Added support for internal error handling of Berkeley db libraries. - . Disallow Berkeley db versions 4.1.0 to 4.1.24 due to locking problems. - . Disallow linkage of Berkeley db submodules against libraries with -different major version. - . Disallow configuring of more than one Berkeley db handler. (snip) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4(PHP_4_3) /ext/openssl openssl.c
At 14:38 12.12.2002, Edin Kadribasic wrote: Don't you thinks its a bit late (after RC3) for this large patch? Edin I don't think whitespace and php_error_docref changes are problematic. marcus - Original Message - From: Marcus Boerger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 12, 2002 2:21 PM Subject: [PHP-CVS] cvs: php4(PHP_4_3) /ext/openssl openssl.c helly Thu Dec 12 08:21:25 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/openssl openssl.c Log: MFH: ws, php_error_docref, typeconversion for cygwin -- 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: php4(PHP_4_3) /ext/openssl openssl.c
Thanks for noticing marcus At 15:07 12.12.2002, Derick Rethans wrote: On Thu, 12 Dec 2002, Marcus Börger wrote: At 14:38 12.12.2002, Edin Kadribasic wrote: Don't you thinks its a bit late (after RC3) for this large patch? Edin I don't think whitespace and php_error_docref changes are problematic. Right, but you _did_ break it : - if (timestr-length 13) { - zend_error(E_WARNING, %s(): extension author too lazy to parse %s correctly, get_active_function_name(TSRMLS_C), timestr-data); + if (timestr-length 13) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, %extension author too lazy to parse %s correctly, timestr-data); (notice the %e). To make sure such things dont happen we should not be doing this this far into the release process. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/cpdf config.m4
Once again i ask before commiting this to the branch. This and the last patch for cpdf add the necessary checks for the required libraries to avoid missleading error messages from configure in other modules. For me i search some time for configure problems in dba until noticing it was actually a problem with libraries needed by cpdf. marcus At 22:53 10.12.2002, Marcus Boerger wrote: helly Tue Dec 10 16:53:03 2002 EDT Modified files: /php4/ext/cpdf config.m4 Log: stick to check what result scheme, do not repeat messages and align messages correctly. Index: php4/ext/cpdf/config.m4 diff -u php4/ext/cpdf/config.m4:1.11 php4/ext/cpdf/config.m4:1.12 --- php4/ext/cpdf/config.m4:1.11Tue Dec 10 09:31:00 2002 +++ php4/ext/cpdf/config.m4 Tue Dec 10 16:53:02 2002 @@ -1,54 +1,58 @@ -dnl $Id: config.m4,v 1.11 2002/12/10 14:31:00 helly Exp $ +dnl $Id: config.m4,v 1.12 2002/12/10 21:53:02 helly Exp $ AC_DEFUN(CPDF_TEMP_SUBST,[ old_LIBS=$LIBS - old_withval=$withval $1 LIBS=$old_LIBS - withval=$old_withval ]) -AC_DEFUN(CPDF_LIB_TEST,[ +AC_DEFUN(CPDF_JPEG_TEST,[ CPDF_TEMP_SUBST([ -AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)]) AC_ARG_WITH(jpeg-dir, -[ --with-jpeg-dir[=DIR] jpeg dir for cpdflib 2.x],[ +[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[ for i in $withval /usr/local /usr; do if test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a; then - CPDF_JPEG_DIR=$i + CPDF_JPEG_DIR=$i + break; fi done if test -z $CPDF_JPEG_DIR; then +AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)]) AC_MSG_ERROR([libjpeg.(a|so) not found.]) fi LIBS=$LIBS -L$CPDF_JPEG_DIR/lib - AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) - PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib) -],[ - AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) +],) +AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) +if test -z $CPDF_JPEG_DIR; then PHP_ADD_LIBRARY(jpeg) -]) +else + PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib) +fi ]) +]) +AC_DEFUN(CPDF_TIFF_TEST,[ CPDF_TEMP_SUBST([ -AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)]) AC_ARG_WITH(tiff-dir, -[ --with-tiff-dir[=DIR] tiff dir for cpdflib 2.x],[ +[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[ for i in $withval /usr/local /usr; do if test -f $i/lib/libtiff.$SHLIB_SUFFIX_NAME -o -f $i/lib/libtiff.a; then - CPDF_TIFF_DIR=$i + CPDF_TIFF_DIR=$i + break; fi done if test -z $CPDF_TIFF_DIR; then +AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)]) AC_MSG_ERROR([libtiff.(a|so) not found.]) fi LIBS=$LIBS -L$CPDF_TIFF_DIR/lib - AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) - PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib) -],[ - AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) +],) +AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) +if test -z $CPDF_TIFF_DIR; then PHP_ADD_LIBRARY(tiff) -]) +else + PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib) +fi ]) ]) @@ -56,34 +60,37 @@ AC_ARG_WITH(cpdflib, [ --with-cpdflib[=DIR]Include cpdflib support (requires cpdflib = 2).], [ - case $withval in -no) - AC_MSG_RESULT(no) ;; -yes) - AC_MSG_RESULT(yes) - PHP_NEW_EXTENSION(cpdf, cpdf.c) - CPDF_LIB_TEST - AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])], -[AC_MSG_ERROR([Cpdf module requires cpdflib = 2.])]) - PHP_ADD_LIBRARY(cpdf) - ;; -*) - test -f $withval/include/cpdflib.h CPDFLIB_INCLUDE=$withval/include - if test -n $CPDFLIB_INCLUDE ; then -AC_MSG_RESULT(yes) -PHP_NEW_EXTENSION(cpdf, cpdf.c) -CPDF_LIB_TEST -old_LIBS=$LIBS -LIBS=$LIBS -L$withval/lib -AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])], - [AC_MSG_ERROR([Cpdflib module requires cpdflib = 2.])]) -LIBS=$old_LIBS -PHP_ADD_LIBRARY_WITH_PATH(cpdf, $withval/lib) -PHP_ADD_INCLUDE($CPDFLIB_INCLUDE) - else -AC_MSG_ERROR([required haeder not found]) - fi ;; - esac + if test $withval = no; then +AC_MSG_RESULT(no) + else +AC_MSG_RESULT(yes) +
Re: [PHP-CVS] cvs: php4 /ext/dba dba.c
At 19:38 09.12.2002, Sascha Schumann wrote: On Mon, 9 Dec 2002, Marcus Boerger wrote: helly Mon Dec 9 13:03:01 2002 EDT Modified files: /php4/ext/dba dba.c Log: Recheckin as unix # *** sorry ** a new diff tool converted it to dos before last comit *** sorry *** That's why you should run a 'cvs diff' _always_ before any commit. There is no exception for that rule. - Sascha In this special case that was the problem. I removed a part which i did not want to commit yet in the diff and that resulted in changing the file to dos. When you use wincvs you are alloed to do so by using an external diff tool and calling it in the commit dialog. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/oci8 config.m4 oci8.c php_oci8.h
In oci_do_connect() you simply changed the number of allowed parameters. What about guarding the 4th parameter by a define and emit a warning or error when using this with a version that does not support this parameter (e.g. 9)? And you could use zend_parse_parameters() to have better code. Maybe you like this (s means retireve a string parameter, | means rest is optional): char *userParam, *passParam, *dbParam, *charParam; int charParam_len, dbParam_len, passParam_len, userParam_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sss|s, userParam, userParam_len, passParam, passParam_len, dbParam, dbParam_len, charParam, charParam_len) == FAILURE) { RETURN_FALSE; } #ifndef HAVE_OCI9 if (ZEND_NUM_ARGS()==4) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Charset parameter only supported by OCI9 and above); } #endif /*HAVE_OCI9*/ regards marcus At 14:44 06.12.2002, Abdul-Kareem Abo-Namous wrote: abonamous Fri Dec 6 08:44:35 2002 EDT Modified files: /php4/ext/oci8 config.m4 oci8.c php_oci8.h Log: added support for multiple character sets. OCILogon now has a forth optional parameter, which is the character set requested by the string (i.e. we8iso8859p1). when left blank, NLS_LANG or default is used. config.m4 was changed to identify Oracle 9+ which is needed for this feature. all other oracle versions (lesser) fall back to the old behaviour. -- 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: php4 /ext/gd/tests conv_test.gif conv_test.jpeg conv_test.png conv_test.xpm gif2gd.phpt gif2jpg.phpt gif2png.phpt jpeg2png.phpt jpg2gd.phpt png2gd.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt
Hi Ilia, when testing conversion to gd2 you do not test for gd2 existance (imagegd2() function) instead you assume that the tests fail if one uses an external gd lib (what makes the function check needless of cause). But why is that so? And why not print out an error then? Maybe we direct the users to use the internal lib then and receive less bug reports. What i really didlike with your tests is that you simply verify that there is an output by checking that there is no error. I miss a check for the output here. For example yesturday i experimented with rle gifs and was glad when i got no more errors and warnings. But then when looking at the generated images i saw they contained bullshit. Therefore i suggest you generate an md5 hash from the output and verify that, too. Why is there 'jpegxxx' and jpgxxx'? What about png2jpg, png2xpm and jpeg2xpm? Last but not least it would have liked it more if the names were different: 'conv_'format1'2'format2'.phpt'. or 'gd_'format1'2'format2'.phpt'. regards marcus At 22:04 04.12.2002, Ilia Alshanetsky wrote: iliaa Wed Dec 4 16:04:07 2002 EDT Added files: /php4/ext/gd/tests conv_test.gif conv_test.jpeg conv_test.png conv_test.xpm gif2gd.phpt gif2jpg.phpt gif2png.phpt jpeg2png.phpt jpg2gd.phpt png2gd.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt Log: Added GD image conversion tests. -- 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: php4 /ext/standard base64.c dl.c exec.c http_fopen_wrapper.c incomplete_class.c levenshtein.c link.c math.c pack.c reg.c scanf.c uniqid.c url.c var.c
At 22:01 05.12.2002, Derick Rethans wrote: On Thu, 5 Dec 2002, Marcus Boerger wrote: helly Thu Dec 5 15:59:50 2002 EDT Modified files: /php4/ext/standardbase64.c dl.c exec.c http_fopen_wrapper.c incomplete_class.c levenshtein.c link.c math.c pack.c reg.c scanf.c uniqid.c url.c var.c Log: -php_error - php_error_docref -removed some cases where emalloc result was tested Can you please remove \n from error messages too while you're at it? (sorry for all those comments :) Derick No worry - i prefer comments! The '\n' is needed in the base64 reverse table. For the rest i guess they are wanted, aren't they? marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / TODO /ext/bz2 bz2.c /ext/sockets sockets.c
At 23:15 01.12.2002, Sterling Hughes wrote: sterlingSun Dec 1 17:15:41 2002 EDT Modified files: /php4 TODO /php4/ext/bz2 bz2.c /php4/ext/sockets sockets.c Log: TODO: Cleanup elements that have happened, or most likely won't happen. There is probably more that should be gone, but its still a move in the right direction. Other stuff is ws/formatting changes Index: php4/TODO diff -u php4/TODO:1.136 php4/TODO:1.137 --- php4/TODO:1.136 Wed Nov 13 04:11:19 2002 +++ php4/TODO Sun Dec 1 17:15:37 2002 @@ -3,9 +3,7 @@ Zend (...) -* Change PHP error messages, so that they point to pages or sections - in the PHP Manual. That is not only for all messages yet. See sockets.c in your commit down below. -* Activate all extensions by default that don't rely on external - dependencies. (eg ftp) (DONE?) So have we decided on that now? (...) Index: php4/ext/bz2/bz2.c diff -u php4/ext/bz2/bz2.c:1.61 php4/ext/bz2/bz2.c:1.62 --- php4/ext/bz2/bz2.c:1.61 Sat Oct 5 12:26:57 2002 +++ php4/ext/bz2/bz2.c Sun Dec 1 17:15:38 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.61 2002/10/05 16:26:57 wez Exp $ */ +/* $Id: bz2.c,v 1.62 2002/12/01 22:15:38 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -538,6 +538,6 @@ * tab-width: 4 * c-basic-offset: 4 * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim600: noet sw=4 ts=4 + * vim600: fdm=marker + * vim: noet sw=4 ts=4 */ Index: php4/ext/sockets/sockets.c diff -u php4/ext/sockets/sockets.c:1.125 php4/ext/sockets/sockets.c:1.126 --- php4/ext/sockets/sockets.c:1.125Sun Oct 27 22:05:04 2002 +++ php4/ext/sockets/sockets.c Sun Dec 1 17:15:39 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sockets.c,v 1.125 2002/10/28 03:05:04 sterling Exp $ */ +/* $Id: sockets.c,v 1.126 2002/12/01 22:15:39 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -797,7 +797,7 @@ } tmpbuf = erealloc(tmpbuf, retval + 1); - tmpbuf[ retval ] = '\0' ; + tmpbuf[retval] = '\0' ; RETURN_STRINGL(tmpbuf, retval, 0); } @@ -1069,7 +1069,8 @@ } default: - php_error(E_WARNING, %s() unsupported socket type '%d', must be AF_UNIX or AF_INET, get_active_function_name(TSRMLS_C), php_sock-type); + php_error(E_WARNING, %s() unsupported socket type '%d', must be AF_UNIX or AF_INET, + get_active_function_name(TSRMLS_C), php_sock-type); RETURN_FALSE; } @@ -2025,6 +2026,6 @@ * tab-width: 4 * c-basic-offset: 4 * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim600: noet sw=4 ts=4 + * vim600: fdm=marker + * vim: noet sw=4 ts=4 */ -- 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: php4 /ext/overload config.m4
I hate autoconf :-) But i will move to another check tonight (no time now). marcus At 14:06 01.12.2002, Derick Rethans wrote: On Sun, 1 Dec 2002, Marcus Boerger wrote: helly Sat Nov 30 19:38:31 2002 EDT Modified files: /php4/ext/overloadconfig.m4 Log: Skip overload for ZE2 Bug #20156 This change breaks the build for me with this error: ext/overload/config.m4:15: warning: Cannot check for file existence when cross compiling Derick Index: php4/ext/overload/config.m4 diff -u php4/ext/overload/config.m4:1.5 php4/ext/overload/config.m4:1.6 --- php4/ext/overload/config.m4:1.5 Tue Mar 12 11:27:22 2002 +++ php4/ext/overload/config.m4 Sat Nov 30 19:38:30 2002 @@ -1,11 +1,16 @@ dnl -dnl $Id: config.m4,v 1.5 2002/03/12 16:27:22 sas Exp $ +dnl $Id: config.m4,v 1.6 2002/12/01 00:38:30 helly Exp $ dnl - PHP_ARG_ENABLE(overload,whether to enable user-space object overloading support, [ --disable-overload Disable user-space object overloading support.], yes) + if test $PHP_OVERLOAD != no; then - AC_DEFINE(HAVE_OVERLOAD, 1, [ ]) - PHP_NEW_EXTENSION(overload, overload.c, $ext_shared) + AC_CHECK_FILE([Zend/zend_objects.h], [ + AC_MSG_CHECKING(for overload) + AC_MSG_RESULT(not needed with ZendEngine 2) + ], [ + AC_DEFINE(HAVE_OVERLOAD, 1, [ ]) + PHP_NEW_EXTENSION(overload, overload.c, $ext_shared) + ]) fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/overload config.m4
Oh great - you already did it while i was training :-))) thanks marcus At 18:24 01.12.2002, Jani Taskinen wrote: sniper Sun Dec 1 12:24:01 2002 EDT Modified files: /php4/ext/overload config.m4 Log: fix build.. Index: php4/ext/overload/config.m4 diff -u php4/ext/overload/config.m4:1.6 php4/ext/overload/config.m4:1.7 --- php4/ext/overload/config.m4:1.6 Sat Nov 30 19:38:30 2002 +++ php4/ext/overload/config.m4 Sun Dec 1 12:24:00 2002 @@ -1,16 +1,16 @@ dnl -dnl $Id: config.m4,v 1.6 2002/12/01 00:38:30 helly Exp $ +dnl $Id: config.m4,v 1.7 2002/12/01 17:24:00 sniper Exp $ dnl + PHP_ARG_ENABLE(overload,whether to enable user-space object overloading support, [ --disable-overload Disable user-space object overloading support.], yes) - if test $PHP_OVERLOAD != no; then - AC_CHECK_FILE([Zend/zend_objects.h], [ - AC_MSG_CHECKING(for overload) - AC_MSG_RESULT(not needed with ZendEngine 2) - ], [ - AC_DEFINE(HAVE_OVERLOAD, 1, [ ]) - PHP_NEW_EXTENSION(overload, overload.c, $ext_shared) - ]) + if test -f $php_abs_top_srcdir/Zend/zend_objects.h; then +AC_MSG_CHECKING(for overload) +AC_MSG_RESULT(not needed with ZendEngine 2) + else +AC_DEFINE(HAVE_OVERLOAD, 1, [ ]) +PHP_NEW_EXTENSION(overload, overload.c, $ext_shared) + fi fi -- 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: php4 /main fopen_wrappers.c
Why not simply change from E_ERROR to E_WARNING? marcus At 22:28 01.12.2002, Shane Caraveo wrote: shane Sun Dec 1 16:28:28 2002 EDT Modified files: /php4/main fopen_wrappers.c Log: php_error_docref aborts cgi. This broke using php as cgi under apache/mod_cgi with the cgi-script directive and bang lines in php scripts. removing it allows this to work again. Index: php4/main/fopen_wrappers.c diff -u php4/main/fopen_wrappers.c:1.153 php4/main/fopen_wrappers.c:1.154 --- php4/main/fopen_wrappers.c:1.153Fri Nov 8 17:48:01 2002 +++ php4/main/fopen_wrappers.c Sun Dec 1 16:28:27 2002 @@ -16,7 +16,7 @@ | Jim Winstead [EMAIL PROTECTED] | +--+ */ -/* $Id: fopen_wrappers.c,v 1.153 2002/11/08 22:48:01 iliaa Exp $ */ +/* $Id: fopen_wrappers.c,v 1.154 2002/12/01 21:28:27 shane Exp $ */ /* {{{ includes */ @@ -348,8 +348,8 @@ fp = NULL; } if (!fp) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, Unable to open %s, filename); STR_FREE(SG(request_info).path_translated); /* for same reason as above */ + SG(request_info).path_translated = NULL; return FAILURE; } -- 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
[PHP-CVS] ZE2 question
This is may be a nice token name, but i do not understand it. When trying to execute: $c = parent::function() I receive: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /usr/src/ph marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] ZE2 question
Ups - wrong list and wrong example - reposting to php-dev sorry ! At 17:16 28.11.2002, Marcus Börger wrote: This is may be a nice token name, but i do not understand it. When trying to execute: $c = parent::function() I receive: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /usr/src/ph marcus -- 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: php4 /ext/exif exif.c
Thats waht i thought, too. At 04:03 27.11.2002, Jani Taskinen wrote: Any added code that does not fix any bugs are not supposed to be MFH'd. --Jani On Wed, 27 Nov 2002, Marcus Börger wrote: Would you agree adding magic_quotes_runtime support is new functionality or commit that also? marcus AAt 02:46 27.11.2002, Marcus Boerger wrote: helly Tue Nov 26 20:46:37 2002 EDT Modified files: /php4/ext/exif exif.c Log: -Add magic_quotes_runtime support -Fix Canon Markernote -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - For Sale! - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
At 08:45 24.11.2002, Yasuo Ohgaki wrote: yohgaki Sun Nov 24 02:45:27 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Added missing '\0' Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.244 php4/ext/pgsql/pgsql.c:1.245 --- php4/ext/pgsql/pgsql.c:1.244Tue Nov 12 04:07:36 2002 +++ php4/ext/pgsql/pgsql.c Sun Nov 24 02:45:26 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.244 2002/11/12 09:07:36 yohgaki Exp $ */ +/* $Id: pgsql.c,v 1.245 2002/11/24 07:45:26 yohgaki Exp $ */ #include stdlib.h @@ -2730,7 +2730,8 @@ break; } } - buffer = erealloc(buffer, buflen); + buffer[buflen] = '\0'; + buffer = erealloc(buffer, buflen+1); if (buffer == NULL) return NULL; Erm shoudln't this better read: + buffer = erealloc(buffer, buflen+1); + buffer[buflen] = '\0'; as i understand the could it is possible that buflen will not be decremented and then you would write zero behind the allocated buffer. marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c config.m4 dns.c dns.h
No - go on - marcus At 07:35 19.11.2002, Derick Rethans wrote: On Tue, 19 Nov 2002, Marcus Boerger wrote: helly Mon Nov 18 21:34:14 2002 EDT Modified files: /php4/ext/standardbasic_functions.c config.m4 dns.c dns.h Log: -rename checkdnsrr to dns_check_record, keep old name as alias -rename getmxrr to dns_get_mx, keep old name as alias -added dns_get_record @Added dns_get_record() which allows to retrieve DNS information about @a host. (Marcus, Pollita) If you don't mind I'm going to change the parameter parser to the zend_parse_parameters function which should result in shorter (and usually better maintainable) code. regards, Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- 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: php4 /ext/standard image.c
Yes i thought also i think we should have one that has the bit 7 set for width and height and it should have one bit more set in the second byte. And width and height should be different. This would lead us to an image of (256+128) * (256+128+1) = 384 * 385 pixels in size. As most images are detected the same way only one image is needed so we can look for a very small image. marcus At 17:01 18.11.2002, Derick Rethans wrote: On Mon, 18 Nov 2002, Marcus Boerger wrote: helly Mon Nov 18 10:49:06 2002 EDT Modified files: /php4/ext/standardimage.c Log: Fixing unsigned/signed problems (and i thought about it before...) Maybe we can add rasmus images to our test suite, or something similar that triggers this error? Derick -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / configure.in /ext/db config.m4
Is this ok to be MFHed? marcus At 12:49 15.11.2002, Marcus Boerger wrote: helly Fri Nov 15 06:49:58 2002 EDT Modified files: /php4/ext/dbconfig.m4 /php4 configure.in Log: db is deprecated now Index: php4/ext/db/config.m4 diff -u php4/ext/db/config.m4:1.14 php4/ext/db/config.m4:1.15 --- php4/ext/db/config.m4:1.14 Tue Mar 12 11:47:01 2002 +++ php4/ext/db/config.m4 Fri Nov 15 06:49:57 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.14 2002/03/12 16:47:01 sas Exp $ +dnl $Id: config.m4,v 1.15 2002/11/15 11:49:57 helly Exp $ dnl # Checks for libraries. @@ -26,7 +26,7 @@ PHP_ARG_WITH(db, for xDBM support, -[ --with-db Include old xDBM support (deprecated)]) +[ --with-db Include old xDBM support (deprecated use --with-dba)]) if test $PHP_DB != no; then Index: php4/configure.in diff -u php4/configure.in:1.399 php4/configure.in:1.400 --- php4/configure.in:1.399 Thu Nov 14 19:20:16 2002 +++ php4/configure.in Fri Nov 15 06:49:58 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.399 2002/11/15 00:20:16 sas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.400 2002/11/15 11:49:58 helly Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -1232,6 +1232,17 @@ | If you are unable to fix this, send the file debug.log to the | | [EMAIL PROTECTED] mailing list and include appropiate | | information about your setup. | +X + fi + + if test $PHP_DB != no; then +cat X +++ +|*** WARNING *** | +|| +| You chose to compile PHP with DB extension. This extension is | +| deprecated and does not support databse locking correctly. Please | +| use DBA extension which is a full operational superset.| X fi -- 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: php4 /ext/domxml/tests domxml002.phpt
But we do not have a memleak any longer there. So it shouldn't crash nor report a memleak. marcus At 13:16 15.11.2002, Derick Rethans wrote: On Fri, 15 Nov 2002, Marcus Boerger wrote: helly Fri Nov 15 06:55:57 2002 EDT Modified files: /php4/ext/domxml/testsdomxml002.phpt Log: Showing memleaks for a memleak test is a good idea No, it's not. This test was to check if it _crashed_ if a memleak happened. Please revert. Derick Index: php4/ext/domxml/tests/domxml002.phpt diff -u php4/ext/domxml/tests/domxml002.phpt:1.2 php4/ext/domxml/tests/domxml002.phpt:1.3 --- php4/ext/domxml/tests/domxml002.phpt:1.2 Tue Oct 29 11:09:03 2002 +++ php4/ext/domxml/tests/domxml002.phpt Fri Nov 15 06:55:57 2002 -1,7 +1,5 --TEST-- Test 2: Memleak in accessing children() of document. ---INI-- -report_memleaks=0 --SKIPIF-- ?php require_once('skipif.inc'); ? --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd/tests bug19366.phpt
?????? there is no ini section any longer since it was empty At 16:33 15.11.2002, Derick Rethans wrote: On Fri, 15 Nov 2002, Marcus Boerger wrote: helly Fri Nov 15 10:22:07 2002 EDT Modified files: /php4/ext/gd/testsbug19366.phpt Log: Simplify and show skip reason Index: php4/ext/gd/tests/bug19366.phpt diff -u php4/ext/gd/tests/bug19366.phpt:1.1 php4/ext/gd/tests/bug19366.phpt:1.2 --- php4/ext/gd/tests/bug19366.phpt:1.1 Fri Oct 11 11:50:37 2002 +++ php4/ext/gd/tests/bug19366.phpt Fri Nov 15 10:22:07 2002 -1,10 +1,10 --TEST-- gdimagefill() function (Bug #19366 (fixed in bundled libgd)) --SKIPIF-- -?php if (!extension_loaded('gd') || !GD_BUNDLED) die(skip\n); ? ---POST-- ---GET-- ---INI-- +?php + if (!extension_loaded('gd')) die(skip gd extension not available\n); + if (!GD_BUNDLED) die('skip external GD libraries always fail'); +? Why did you move it to the --INI-- section? Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd/tests imagefilter.phpt test.png
The tests fails for me in lines 10 and 16. Maybe it would be much better to make an include file for the test blocks and then call it for each filter from a different .phpt file. marcus At 21:04 13.11.2002, Ilia Alshanetsky wrote: iliaa Wed Nov 13 15:04:00 2002 EDT Added files: /php4/ext/gd/tests test.png imagefilter.phpt Log: Added tests for imagefilter() function. Index: php4/ext/gd/tests/imagefilter.phpt +++ php4/ext/gd/tests/imagefilter.phpt --TEST-- imagefilter() function test --SKIPIF-- ?php if (!extension_loaded('gd')) { die(skip gd extension not avaliable.); } if (!GD_BUNDLED) { die(skip this test requires bundled gd library.); } ? --FILE-- ?php $no_arg_filters = array( IMG_FILTER_NEGATE, IMG_FILTER_GRAYSCALE, IMG_FILTER_EDGEDETECT, IMG_FILTER_GAUSSIAN_BLUR, IMG_FILTER_SELECTIVE_BLUR, IMG_FILTER_EMBOSS, IMG_FILTER_MEAN_REMOVAL ); $SAVE_DIR = dirname(__FILE__); $SOURCE_IMG = $SAVE_DIR . /test.png; foreach ($no_arg_filters as $filt) { $im = imagecreatefrompng($SOURCE_IMG); if (imagefilter($im, constant($filt))) { imagepng($im, $SAVE_DIR. $filt. .png); echo $filt success\n; echo md5_file($SAVE_DIR. $filt. .png) . \n; unlink($SAVE_DIR. $filt. .png); } else { echo $filt failed\n; } } $im = imagecreatefrompng($SOURCE_IMG); if (imagefilter($im, IMG_FILTER_SMOOTH, -1924.124)) { imagepng($im, $SAVE_DIR . IMG_FILTER_SMOOTH.png); echo IMG_FILTER_SMOOTH success\n; echo md5_file($SAVE_DIR . IMG_FILTER_SMOOTH.png) . \n; unlink($SAVE_DIR . IMG_FILTER_SMOOTH.png); } else { echo IMG_FILTER_SMOOTH failed\n; } $im = imagecreatefrompng($SOURCE_IMG); if (imagefilter($im, IMG_FILTER_COLORIZE, -127.12, -127.98, 127)) { imagepng($im, $SAVE_DIR . IMG_FILTER_COLORIZE.png); echo IMG_FILTER_COLORIZE success\n; echo md5_file($SAVE_DIR . IMG_FILTER_COLORIZE.png) . \n; unlink($SAVE_DIR . IMG_FILTER_COLORIZE.png); } else { echo IMG_FILTER_COLORIZE failed\n; } $im = imagecreatefrompng($SOURCE_IMG); if (imagefilter($im, IMG_FILTER_CONTRAST, -90)) { imagepng($im, $SAVE_DIR . IMG_FILTER_CONTRAST.png); echo IMG_FILTER_CONTRAST success\n; echo md5_file($SAVE_DIR . IMG_FILTER_CONTRAST.png) . \n; unlink($SAVE_DIR . IMG_FILTER_CONTRAST.png); } else { echo IMG_FILTER_CONTRAST failed\n; } $im = imagecreatefrompng($SOURCE_IMG); if (imagefilter($im, IMG_FILTER_BRIGHTNESS, 98)) { imagepng($im, $SAVE_DIR . IMG_FILTER_BRIGHTNESS.png); echo IMG_FILTER_BRIGHTNESS success\n; echo md5_file($SAVE_DIR . IMG_FILTER_BRIGHTNESS.png) . \n; unlink($SAVE_DIR . IMG_FILTER_BRIGHTNESS.png); } else { echo IMG_FILTER_BRIGHTNESS failed\n; } ? --EXPECT-- IMG_FILTER_NEGATE success 791b480b940ca777c541a6541a9a21ee IMG_FILTER_GRAYSCALE success b6c77efe4f07916b889671a6d58a7646 IMG_FILTER_EDGEDETECT success 4a93e345325edb6e168fc3b603461a42 IMG_FILTER_GAUSSIAN_BLUR success 731a19e0f796ce853879761228f25a06 IMG_FILTER_SELECTIVE_BLUR success 740e8618e131d1e9e61fa4f891e2e4bd IMG_FILTER_EMBOSS success 8e43cfced8d795bbce048a0402091b24 IMG_FILTER_MEAN_REMOVAL success e8ae73918566861d1c707df35c171317 IMG_FILTER_SMOOTH success 4bda59ccda7b531f19be13fdda7570c3 IMG_FILTER_COLORIZE success b7d1b39c3e7d98759da4437ee125 IMG_FILTER_CONTRAST success 837db2a6295b64b0ce3b27621e256b26 IMG_FILTER_BRIGHTNESS success 15d795db86637150f6cfc5f98d074dea -- 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: php4 /ext/mbstring mbstring.h
I just worked on the branch for the same problem :-) marcus At 13:06 14.11.2002, Wez Furlong wrote: wez Thu Nov 14 07:06:02 2002 EDT Modified files: /php4/ext/mbstring mbstring.h Log: Fix build for unix. Not sure if this needs merging to the branch (haven't got that far yet today). Index: php4/ext/mbstring/mbstring.h diff -u php4/ext/mbstring/mbstring.h:1.41 php4/ext/mbstring/mbstring.h:1.42 --- php4/ext/mbstring/mbstring.h:1.41 Wed Nov 13 18:11:14 2002 +++ php4/ext/mbstring/mbstring.hThu Nov 14 07:06:01 2002 -16,7 +16,7 +--+ */ -/* $Id: mbstring.h,v 1.41 2002/11/13 23:11:14 edink Exp $ */ +/* $Id: mbstring.h,v 1.42 2002/11/14 12:06:01 wez Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) -49,18 +49,18 #ifdef COMPILE_DL_MBSTRING #undef HAVE_MBSTRING #define HAVE_MBSTRING 1 -#undef MBSTRING_API -#define MBSTRING_API - #endif #ifdef PHP_WIN32 -#undef MBSTRING_API -#ifdef MBSTRING_EXPORTS -#define MBSTRING_API __declspec(dllexport) +# undef MBSTRING_API +# ifdef MBSTRING_EXPORTS +# define MBSTRING_API __declspec(dllexport) +# else +# define MBSTRING_API __declspec(dllimport) +# endif #else -#define MBSTRING_API __declspec(dllimport) -#endif +# undef MBSTRING_API +# define MBSTRING_API /* nothing special */ #endif -- 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: php4 /ext/gd gd.c
Plase make sure you are using a TSRM build while developing. [marcuszaphod PHP_4_3_0]$ ./configure --help|grep tsrm --with-tsrm-pth[=pth-config]Use GNU Pth. --with-tsrm-st --with-tsrm-pthreadsUse POSIX threads (default) marcus At 16:09 14.11.2002, Marcus Boerger wrote: helly Thu Nov 14 10:09:53 2002 EDT Modified files: /php4/ext/gdgd.c Log: Fix TSRM build Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.222 php4/ext/gd/gd.c:1.223 --- php4/ext/gd/gd.c:1.222 Wed Nov 13 15:02:58 2002 +++ php4/ext/gd/gd.cThu Nov 14 10:09:53 2002 -18,7 +18,7 +--+ */ -/* $Id: gd.c,v 1.222 2002/11/13 20:02:58 iliaa Exp $ */ +/* $Id: gd.c,v 1.223 2002/11/14 15:09:53 helly Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ -3806,7 +3806,7 gdImagePtr im_src; long brightness, tmp; - if (ZEND_NUM_ARGS()!=3 || zend_parse_parameters(3, zll, SIM, tmp, brightness) == FAILURE) { + if (ZEND_NUM_ARGS()!=3 || zend_parse_parameters(3 TSRMLS_CC, zll, SIM, tmp, brightness) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } -3826,7 +3826,7 gdImagePtr im_src; long contrast, tmp; - if (ZEND_NUM_ARGS()!=3 || zend_parse_parameters(3, rll, SIM, tmp, contrast) == FAILURE) { + if (ZEND_NUM_ARGS()!=3 || zend_parse_parameters(3 TSRMLS_CC, rll, SIM, tmp, contrast) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } -3846,7 +3846,7 gdImagePtr im_src; long r,g,b,tmp; - if (ZEND_NUM_ARGS()!=5 || zend_parse_parameters(5, r, SIM, tmp, r, g, b) == FAILURE) { + if (ZEND_NUM_ARGS()!=5 || zend_parse_parameters(5 TSRMLS_CC, r, SIM, tmp, r, g, b) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } -3962,7 +3962,7 gdImagePtr im_src; double weight; - if (ZEND_NUM_ARGS()!=3 || zend_parse_parameters(3, rld, SIM, tmp, weight) == FAILURE) { + if (ZEND_NUM_ARGS()!=3 || zend_parse_parameters(3 TSRMLS_CC, rld, SIM, tmp, weight) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } -3999,7 +3999,7 php_image_filter_smooth }; - if (ZEND_NUM_ARGS()2 || ZEND_NUM_ARGS()5 || zend_parse_parameters(2, rl, tmp, filtertype) == FAILURE) { + if (ZEND_NUM_ARGS()2 || ZEND_NUM_ARGS()5 || zend_parse_parameters(2 TSRMLS_CC, rl, tmp, filtertype) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } -- 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: php4 /ext/gd gd.c
Ups - Sorry - i missed that one of cause...thanks At 16:25 14.11.2002, Derick Rethans wrote: On Thu, 14 Nov 2002, Marcus Börger wrote: Plase make sure you are using a TSRM build while developing. [marcuszaphod PHP_4_3_0]$ ./configure --help|grep tsrm --with-tsrm-pth[=pth-config]Use GNU Pth. --with-tsrm-st --with-tsrm-pthreadsUse POSIX threads (default) You meant this switch I think, as those switches only select the threading library: --enable-experimental-zts Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- 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: php4 /ext/gd/libgd gd.c
I always compile with all warnings enabled and fix warnings for linux and windows builds. I am mostly using gcc -Wall -Wconversion -ggdb [marcuszaphod PHP_4_3_0]$ gcc -v Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs gcc version 2.96 2731 (Mandrake Linux 8.2 2.96-0.76mdk) Sometimes i use a sun as well but i am not fixing warnings for that target. The warning was about pxlLeft propably not bein initialised. This could not happen if every thing is ok. If not Setting it to 0 should result in something debugable. Or do you mean the other fix for the TSRM stuff? marcus At 16:27 14.11.2002, Ilia A. wrote: Which compiler are you using and with which options that gave you warning(s) on these lines? Ilia On November 14, 2002 10:08 am, Marcus Boerger wrote: helly Thu Nov 14 10:08:40 2002 EDT Modified files: /php4/ext/gd/libgdgd.c Log: Fix warnings (Marcus Pierre-Alain Joye) Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.25 php4/ext/gd/libgd/gd.c:1.26 --- php4/ext/gd/libgd/gd.c:1.25 Wed Nov 13 15:02:58 2002 +++ php4/ext/gd/libgd/gd.cThu Nov 14 10:08:39 2002 -2215,7 +2215,7 int i, r, g, b, a; FuncPtr f; - int pxlOldLeft, pxlLeft, pxlSrc; + int pxlOldLeft, pxlLeft=0, pxlSrc; if (src-trueColor) { f = gdImageGetTrueColorPixel; -2301,7 +2301,7 typedef int (*FuncPtr)(gdImagePtr, int, int); int i, iYPos=0, r, g, b, a; FuncPtr f; - int pxlOldLeft, pxlLeft, pxlSrc; + int pxlOldLeft, pxlLeft=0, pxlSrc; if (src-trueColor) { f = gdImageGetTrueColorPixel; -- 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: php4 /ext/gd/libgd gd.c
At 16:51 14.11.2002, Ilia A. wrote: On November 14, 2002 10:45 am, Marcus Börger wrote: I always compile with all warnings enabled and fix warnings for linux and windows builds. I am mostly using gcc -Wall -Wconversion -ggdb Thanks, I'll add -Wconversion to my CFLAGS. [marcuszaphod PHP_4_3_0]$ gcc -v Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs gcc version 2.96 2731 (Mandrake Linux 8.2 2.96-0.76mdk) Sometimes i use a sun as well but i am not fixing warnings for that target. The warning was about pxlLeft propably not bein initialised. This could not happen if every thing is ok. If not Setting it to 0 should result in something debugable. I've tried the fix on the regular gcc 2.95.3 and gcc 3.2 (Sun OS) both did not complain with the regular -Wall -g3 flags. Or do you mean the other fix for the TSRM stuff? My mistake, I usually don't compile with TSRM since some modules do not compile when I use experimental-zts. If this is so == report on php-dev list - my suggestion those or no longer maintained and should be fixed for tsrm and moved to pecl Ilia marcus At 16:27 14.11.2002, Ilia A. wrote: Which compiler are you using and with which options that gave you warning(s) on these lines? Ilia On November 14, 2002 10:08 am, Marcus Boerger wrote: helly Thu Nov 14 10:08:40 2002 EDT Modified files: /php4/ext/gd/libgdgd.c Log: Fix warnings (Marcus Pierre-Alain Joye) Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.25 php4/ext/gd/libgd/gd.c:1.26 --- php4/ext/gd/libgd/gd.c:1.25 Wed Nov 13 15:02:58 2002 +++ php4/ext/gd/libgd/gd.cThu Nov 14 10:08:39 2002 -2215,7 +2215,7 int i, r, g, b, a; FuncPtr f; - int pxlOldLeft, pxlLeft, pxlSrc; + int pxlOldLeft, pxlLeft=0, pxlSrc; if (src-trueColor) { f = gdImageGetTrueColorPixel; -2301,7 +2301,7 typedef int (*FuncPtr)(gdImagePtr, int, int); int i, iYPos=0, r, g, b, a; FuncPtr f; - int pxlOldLeft, pxlLeft, pxlSrc; + int pxlOldLeft, pxlLeft=0, pxlSrc; if (src-trueColor) { f = gdImageGetTrueColorPixel; -- 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: php4(PHP_4_3) / configure.in /main php_version.h
As far as i understood this should be EXTRA_VERSION=RC1, shouldn't it? marcus At 17:47 14.11.2002, you wrote: andrei Thu Nov 14 11:47:03 2002 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in /php4/main php_version.h Log: Go for RC1. Index: php4/configure.in diff -u php4/configure.in:1.396 php4/configure.in:1.396.2.1 --- php4/configure.in:1.396 Mon Nov 11 11:12:56 2002 +++ php4/configure.in Thu Nov 14 11:47:03 2002 -1,4 +1,4 -dnl ## $Id: configure.in,v 1.396 2002/11/11 16:12:56 iliaa Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.1 2002/11/14 16:47:03 andrei Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) -44,7 +44,7 MAJOR_VERSION=4 MINOR_VERSION=3 RELEASE_VERSION=0 -EXTRA_VERSION=-dev +EXTRA_VERSION=4.3.0RC1 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION dnl Define where extension directories are located in the configure context Index: php4/main/php_version.h diff -u php4/main/php_version.h:1.66 php4/main/php_version.h:1.66.2.1 --- php4/main/php_version.h:1.66Sun Oct 27 14:51:17 2002 +++ php4/main/php_version.h Thu Nov 14 11:47:03 2002 -3,5 +3,5 #define PHP_MAJOR_VERSION 4 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 0 -#define PHP_EXTRA_VERSION -dev -#define PHP_VERSION 4.3.0-dev +#define PHP_EXTRA_VERSION RC1 +#define PHP_VERSION 4.3.0RC1 -- 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: php4(PHP_4_3) / run-tests.php
Will we have extra safe_mode tests then? marcus At 19:38 14.11.2002, Ilia Alshanetsky wrote: iliaa Thu Nov 14 13:38:25 2002 EDT Modified files: (Branch: PHP_4_3) /php4 run-tests.php Log: MFH (disable safe_mode for test). Index: php4/run-tests.php diff -u php4/run-tests.php:1.119 php4/run-tests.php:1.119.2.1 --- php4/run-tests.php:1.119Sun Nov 10 03:56:28 2002 +++ php4/run-tests.php Thu Nov 14 13:38:25 2002 -540,6 +540,7 output_handler=, zlib.output_compression=Off, open_basedir=, + safe_mode=0, disable_functions=, error_reporting=2047, display_errors=1, -- 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: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c
At 18:59 06.11.2002, Sascha Schumann wrote: sas Wed Nov 6 12:59:04 2002 EDT Modified files: /php4/ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c Log: emalloc never returns 0, so we can simplify the code paths. also replace ecalloc with emalloc+memset, so that the latter can be inlined. Could you explain what you meant with the second part? ecmalloc is a call that uses memset. If memset can be inlined it would be inlined in ecalloc as well as in the other place. In other words i do not see the difference. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c
At 13:37 13.11.2002, Sascha Schumann wrote: On Wed, 13 Nov 2002, Marcus Börger wrote: At 18:59 06.11.2002, Sascha Schumann wrote: sas Wed Nov 6 12:59:04 2002 EDT Modified files: /php4/ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c Log: emalloc never returns 0, so we can simplify the code paths. also replace ecalloc with emalloc+memset, so that the latter can be inlined. Could you explain what you meant with the second part? ecmalloc is a call that uses memset. If memset can be inlined it would be inlined in ecalloc as well as in the other place. In other words i do not see the difference. The difference is the placement of the memset call. After the changes, a compiler which does not optimize across function borders can inline the memset call (e.g. GCC). memset() is a lot faster, if the compiler knows the size of the data field. You're right the compiler knows the size in the caller function but not in ecalloc of cause. Shouldn't then ecalloc be a compiler define? #define ecalloc(num, size) \ memset( emalloc(num*size), 0, num*size) marcus Have a look at the assembler code here http://www.mail-archive.com/dev;httpd.apache.org/msg02492.html - Sascha -- 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: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c
At 14:14 13.11.2002, Sascha Schumann wrote: You're right the compiler knows the size in the caller function but not in ecalloc of cause. Shouldn't then ecalloc be a compiler define? #define ecalloc(num, size) \ memset( emalloc(num*size), 0, num*size) It was like that until Aug 18th. A commit back then turned the fast macro back into a slow function again and added a division. With that kind of setup, the compiler has no chance to reduce and optimize the target code. By using emalloc+memset, we get compile-time reduction (no multiplication at run-time) and inlining for free. - Sascha Agree but with one single addition if num and size are both constants then the compiler does the multiplication at compiletime. So the above define shouldn't have a run-time multiplication where not necessary. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/ming ming.c
Hm i have a tsrm build but it compiled - thanks anyway. marcus At 15:18 12.11.2002, Ilia Alshanetsky wrote: iliaa Tue Nov 12 09:18:24 2002 EDT Modified files: /php4/ext/ming ming.c Log: Fixed compile error. Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.39 php4/ext/ming/ming.c:1.40 --- php4/ext/ming/ming.c:1.39 Tue Nov 12 08:16:12 2002 +++ php4/ext/ming/ming.cTue Nov 12 09:18:24 2002 -2707,13 +2707,14 /* {{{ todo PHP_MINIT_FUNCTION(ming) */ + /* custom error handler propagates ming errors up to php */ static void php_ming_error(char *msg, ...) { - TSRMLS_FETCH(); - va_list args; char *buffer; + + TSRMLS_FETCH(); va_start(args, msg); vspprintf(buffer, 0, msg, args); -- 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: php4 /ext/standard string.c
I do not get those so i do not fix them. At 05:17 09.11.2002, Maxim Maletsky wrote: Actually, i was just about to mention one thing - in math.c on line 779 (I think) it warn of an unasigned comparison compilation. I was about to work out a patch and submit it as I got no karma for that part. Why don't you take over it once you're there :) -- Maxim Maletsky [EMAIL PROTECTED] On Thu, 24 Oct 2002 19:11:50 - Marcus Börger [EMAIL PROTECTED] wrote: helly Thu Oct 24 15:11:50 2002 EDT Modified files: /php4/ext/standardstring.c Log: fix compiler warning Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.327 php4/ext/standard/string.c:1.328 --- php4/ext/standard/string.c:1.327 Tue Oct 22 14:27:56 2002 +++ php4/ext/standard/string.cThu Oct 24 15:11:49 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.327 2002/10/22 18:27:56 helly Exp $ */ +/* $Id: string.c,v 1.328 2002/10/24 19:11:49 helly Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -915,6 +915,7 @@ case 1: tok = args[0]; break; + default: case 2: str = args[0]; tok = args[1]; @@ -1198,7 +1199,7 @@ PHP_FUNCTION(pathinfo) { zval *tmp; - char *path, *ret; + char *path, *ret = NULL; int path_len; int opt = PHP_PATHINFO_ALL; @@ -3182,6 +3183,7 @@ if (Z_TYPE_PP(args[1]) == IS_ARRAY) { zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1])); + i=0; /* not needed in this case: only kill a compiler warning */ } else { i=1; } -- 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: php4 /ext/standard math.c
Why not use php_error_docref which automatically uses new error message format with functionname? marcus At 06:35 11.11.2002, Jason Greene wrote: jason Mon Nov 11 00:35:05 2002 EDT Modified files: /php4/ext/standard math.c Log: Report function name when log() triggers a base warning Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.94 php4/ext/standard/math.c:1.95 --- php4/ext/standard/math.c:1.94 Mon Nov 11 00:21:35 2002 +++ php4/ext/standard/math.cMon Nov 11 00:35:04 2002 -19,7 +19,7 +--+ */ -/* $Id: math.c,v 1.94 2002/11/11 05:21:35 jason Exp $ */ +/* $Id: math.c,v 1.95 2002/11/11 05:35:04 jason Exp $ */ #include php.h #include php_math.h -542,7 +542,7 convert_to_double_ex(base); if (Z_DVAL_PP(base) = 0.0) { - php_error(E_WARNING, base must be greater than 0, Z_DVAL_PP(base)); + php_error(E_WARNING, log(): base must be greater than 0, Z_DVAL_PP(base)); RETURN_FALSE; } RETURN_DOUBLE(log(Z_DVAL_PP(num)) / log(Z_DVAL_PP(base))); -- 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: php4 /tests/lang bug17882.phpt
At 19:57 10.11.2002, Derick Rethans wrote: On Sun, 10 Nov 2002, Moriyoshi Koizumi wrote: moriyoshi Sun Nov 10 13:43:19 2002 EDT Added files: /php4/tests/lang bug17882.phpt Log: Added a test case for bug #17882 [snip] --EXPECTF-- Fatal error: Cannot redeclare a() in %s/bug17882.php on line %d Isn't the line number always the same and actually useful to teest for in this case? Derick good catch. If the line number changes either the test system or some internals have changed. Both would require test redesign. marcus -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- 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: php4 /ext/standard/tests/image getimagesize.phpt image_type_to_mime_type.phpt skipif_imagetype.inc
Why remove the IMAGETYPE_SWC check comment here. I wrote it to the list complete, so everyone can see that some types are excluded. Anyway thanks for the swf/swc files and tests! marcus At 03:50 08.11.2002, Ilia Alshanetsky wrote: iliaa Thu Nov 7 21:50:28 2002 EDT Modified files: /php4/ext/standard/tests/image getimagesize.phpt image_type_to_mime_type.phpt skipif_imagetype.inc Log: Move SWC (compressed swf) check into a separate test because this check requires zlib. This separation allows us to skip the test if zlib is not available and not fail. (...) Index: php4/ext/standard/tests/image/skipif_imagetype.inc diff -u php4/ext/standard/tests/image/skipif_imagetype.inc:1.1 php4/ext/standard/tests/image/skipif_imagetype.inc:1.2 --- php4/ext/standard/tests/image/skipif_imagetype.inc:1.1 Sun Nov 3 08:52:45 2002 +++ php4/ext/standard/tests/image/skipif_imagetype.inc Thu Nov 7 21:50:28 2002 -1,16 +1,15 -?php -if (!defined('IMAGETYPE_GIF')) die('skip images of type GIF not supported'); -if (!defined('IMAGETYPE_JPEG'))die('skip images of type JPEG not supported'); -if (!defined('IMAGETYPE_PNG')) die('skip images of type PNG not supported'); -//if (!defined('IMAGETYPE_SWF')) die('skip images of type SWF not supported'); -if (!defined('IMAGETYPE_PSD')) die('skip images of type PSD not supported'); -if (!defined('IMAGETYPE_BMP')) die('skip images of type BMP not supported'); -if (!defined('IMAGETYPE_TIFF_II')) die('skip images of type TIFF not supported'); -if (!defined('IMAGETYPE_TIFF_MM')) die('skip images of type TIFF not supported'); -if (!defined('IMAGETYPE_JPC')) die('skip images of type JPC not supported'); -//if (!defined('IMAGETYPE_JP2')) die('skip images of type JP2 not supported'); -//if (!defined('IMAGETYPE_JPX')) die('skip images of type JPX not supported'); -//if (!defined('IMAGETYPE_JB2')) die('skip images of type JB2 not supported'); -//if (!defined('IMAGETYPE_SWC')) die('skip images of type SWC not supported'); // SWC requires zlib -if (!defined('IMAGETYPE_IFF')) die('skip images of type IFF not supported'); -? +?php +if (!defined('IMAGETYPE_GIF')) die('skip images of type GIF not supported'); +if (!defined('IMAGETYPE_JPEG'))die('skip images of type JPEG not supported'); +if (!defined('IMAGETYPE_PNG')) die('skip images of type PNG not supported'); +if (!defined('IMAGETYPE_SWF')) die('skip images of type SWF not supported'); +if (!defined('IMAGETYPE_PSD')) die('skip images of type PSD not supported'); +if (!defined('IMAGETYPE_BMP')) die('skip images of type BMP not supported'); +if (!defined('IMAGETYPE_TIFF_II')) die('skip images of type TIFF not supported'); +if (!defined('IMAGETYPE_TIFF_MM')) die('skip images of type TIFF not supported'); +if (!defined('IMAGETYPE_JPC')) die('skip images of type JPC not supported'); +//if (!defined('IMAGETYPE_JP2')) die('skip images of type JP2 not supported'); +//if (!defined('IMAGETYPE_JPX')) die('skip images of type JPX not supported'); +//if (!defined('IMAGETYPE_JB2')) die('skip images of type JB2 not supported'); +if (!defined('IMAGETYPE_IFF')) die('skip images of type IFF not supported'); +? -- 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: php4 /ext/standard/tests/strings htmlentities06.phpt
Thats clear. My comment had a different background: When there is no error until access to $php_errormsg you will receive your warning then. Thats why i used if($php_errormsg) ... marcus At 18:15 08.11.2002, Ilia A. wrote: We need to set it to NULL because it may be already set by another PHP operation prior to htmlentities(). Ilia On November 8, 2002 12:03 pm, Marcus Boerger wrote: helly Fri Nov 8 12:03:06 2002 EDT Modified files: /php4/ext/standard/tests/strings htmlentities06.phpt Log: hide possible warnings #Why should one initialize $php_errormsg to NULL #It would be easier to have it initialised by the system, wouldn't it? Index: php4/ext/standard/tests/strings/htmlentities06.phpt diff -u php4/ext/standard/tests/strings/htmlentities06.phpt:1.3 php4/ext/standard/tests/strings/htmlentities06.phpt:1.4 --- php4/ext/standard/tests/strings/htmlentities06.phpt:1.3 Thu Nov 7 20:12:03 2002 +++ php4/ext/standard/tests/strings/htmlentities06.phpt Fri Nov 8 12:03:06 2002 -5,9 +5,9 --SKIPIF-- ?php extension_loaded(mbstring) or die(skip mbstring not available\n); - mb_internal_encoding('ISO-8859-15'); + mb_internal_encoding('ISO-8859-15'); htmlentities(\xbc\xbd\xbe, ENT_QUOTES, ''); - if ($php_errormsg) { + if ($php_errormsg) { die(skip ISO-8859-15 chracter set is not supported on this platform.\n); } ? -- 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
[PHP-CVS] cvs: php4 /ext/dba dba_gdbm.c
helly Thu Nov 7 08:00:38 2002 EDT Modified files: /php4/ext/dba dba_gdbm.c Log: remove debug output and use php_error_docref instead Index: php4/ext/dba/dba_gdbm.c diff -u php4/ext/dba/dba_gdbm.c:1.15 php4/ext/dba/dba_gdbm.c:1.16 --- php4/ext/dba/dba_gdbm.c:1.15Wed Nov 6 12:59:03 2002 +++ php4/ext/dba/dba_gdbm.c Thu Nov 7 08:00:37 2002 -16,7 +16,7 +--+ */ -/* $Id: dba_gdbm.c,v 1.15 2002/11/06 17:59:03 sas Exp $ */ +/* $Id: dba_gdbm.c,v 1.16 2002/11/07 13:00:37 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -105,7 +105,7 if(gdbm_store(dba-dbf, gkey, gval, mode == 1 ? GDBM_INSERT : GDBM_REPLACE) == 0) return SUCCESS; - printf(XXX %s\n, gdbm_strerror(gdbm_errno)); + php_error_docref2(NULL TSRMLS_CC, key, val, E_WARNING, %s, +gdbm_strerror(gdbm_errno)); return FAILURE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba dba_flatfile.c /ext/dba/libflatfile flatfile.c flatfile.h
helly Thu Nov 7 18:03:16 2002 EDT Modified files: /php4/ext/dba dba_flatfile.c /php4/ext/dba/libflatfile flatfile.c flatfile.h Log: -rename anything to flatfile_xxx/FLATFILE_xxx -fix update function -add warnings for update function Index: php4/ext/dba/dba_flatfile.c diff -u php4/ext/dba/dba_flatfile.c:1.3 php4/ext/dba/dba_flatfile.c:1.4 --- php4/ext/dba/dba_flatfile.c:1.3 Wed Nov 6 12:59:03 2002 +++ php4/ext/dba/dba_flatfile.c Thu Nov 7 18:03:15 2002 -16,7 +16,7 +--+ */ -/* $Id: dba_flatfile.c,v 1.3 2002/11/06 17:59:03 sas Exp $ */ +/* $Id: dba_flatfile.c,v 1.4 2002/11/07 23:03:15 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -44,8 +44,8 #endif #endif -#define DBM_DATA flatfile *dba = info-dbf -#define DBM_GKEY datum gkey; gkey.dptr = (char *) key; gkey.dsize = keylen +#define FLATFILE_DATA flatfile *dba = info-dbf +#define FLATFILE_GKEY datum gkey; gkey.dptr = (char *) key; gkey.dsize = keylen #define TRUNC_IT(extension, mode) \ snprintf(buf, MAXPATHLEN, %s extension, info-path); \ -152,7 +152,7 DBA_CLOSE_FUNC(flatfile) { - DBM_DATA; + FLATFILE_DATA; if (dba-lockfn) { #if NFS_HACK -171,19 +171,15 efree(dba); } -#define DBM_FETCH(gkey) dbm_file_fetch((flatfile*)info-dbf, gkey TSRMLS_CC) -#define DBM_STORE(gkey, gval) dbm_file_store((flatfile*)info-dbf, gkey, gval, DBM_REPLACE TSRMLS_CC) -#define DBM_DELETE(gkey) dbm_file_delete((flatfile*)info-dbf, gkey TSRMLS_CC) -#define DBM_FIRSTKEY()dbm_file_firstkey((flatfile*)info-dbf TSRMLS_CC) -#define DBM_NEXTKEY(gkey) dbm_file_nextkey((flatfile*)info-dbf TSRMLS_CC) - DBA_FETCH_FUNC(flatfile) { datum gval; char *new = NULL; - DBM_GKEY; - gval = DBM_FETCH(gkey); + FLATFILE_DATA; + FLATFILE_GKEY; + + gval = flatfile_fetch(dba, gkey TSRMLS_CC); if(gval.dptr) { if(newlen) *newlen = gval.dsize; new = estrndup(gval.dptr, gval.dsize); -196,19 +192,31 { datum gval; - DBM_GKEY; + FLATFILE_DATA; + FLATFILE_GKEY; gval.dptr = (char *) val; gval.dsize = vallen; - return (DBM_STORE(gkey, gval) == -1 ? FAILURE : SUCCESS); + switch(flatfile_store(dba, gkey, gval, mode==1 ? FLATFILE_INSERT : +FLATFILE_REPLACE TSRMLS_CC)) { + case -1: + php_error_docref1(NULL TSRMLS_CC, key, E_WARNING, Operation not +possible); + return FAILURE; + default: + case 0: + return SUCCESS; + case 1: + php_error_docref1(NULL TSRMLS_CC, key, E_WARNING, Key already +exists); + return SUCCESS; + } } DBA_EXISTS_FUNC(flatfile) { datum gval; - DBM_GKEY; + FLATFILE_DATA; + FLATFILE_GKEY; - gval = DBM_FETCH(gkey); + gval = flatfile_fetch(dba, gkey TSRMLS_CC); if(gval.dptr) { efree(gval.dptr); return SUCCESS; -218,17 +226,18 DBA_DELETE_FUNC(flatfile) { - DBM_GKEY; - return(DBM_DELETE(gkey) == -1 ? FAILURE : SUCCESS); + FLATFILE_DATA; + FLATFILE_GKEY; + return(flatfile_delete(dba, gkey TSRMLS_CC) == -1 ? FAILURE : SUCCESS); } DBA_FIRSTKEY_FUNC(flatfile) { - DBM_DATA; + FLATFILE_DATA; if (dba-nextkey.dptr) efree(dba-nextkey.dptr); - dba-nextkey = DBM_FIRSTKEY(); + dba-nextkey = flatfile_firstkey(dba TSRMLS_CC); if(dba-nextkey.dptr) { if(newlen) *newlen = dba-nextkey.dsize; -239,16 +248,14 DBA_NEXTKEY_FUNC(flatfile) { - DBM_DATA; - datum lkey; + FLATFILE_DATA; if(!dba-nextkey.dptr) return NULL; - lkey = dba-nextkey; - dba-nextkey = DBM_NEXTKEY(lkey); - if (lkey.dptr) - efree(lkey.dptr); + if (dba-nextkey.dptr) + efree(dba-nextkey.dptr); + dba-nextkey = flatfile_nextkey(dba TSRMLS_CC); if(dba-nextkey.dptr) { if(newlen) *newlen = dba-nextkey.dsize; Index: php4/ext/dba/libflatfile/flatfile.c diff -u php4/ext/dba/libflatfile/flatfile.c:1.2 php4/ext/dba/libflatfile/flatfile.c:1.3 --- php4/ext/dba/libflatfile/flatfile.c:1.2 Wed Nov 6 04:17:51 2002 +++ php4/ext/dba/libflatfile/flatfile.c Thu Nov 7 18:03:16 2002 -19,7 +19,7 +--+ */ -/* $Id: flatfile.c,v 1.2 2002/11/06 09:17:51 helly Exp $ */ +/* $Id: flatfile.c,v 1.3 2002/11/07 23:03:16 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -44,11 +44,11 * ret = 1 key already exists - nothing done */ -/* {{{ dbm_file_store +/* {{{ flatfile_store */ -PHPAPI int dbm_file_store(flatfile
[PHP-CVS] cvs: php4 /ext/db/tests 003.phpt
helly Thu Nov 7 18:03:59 2002 EDT Modified files: /php4/ext/db/tests 003.phpt Log: expand test: see if another insert fails Index: php4/ext/db/tests/003.phpt diff -u php4/ext/db/tests/003.phpt:1.3 php4/ext/db/tests/003.phpt:1.4 --- php4/ext/db/tests/003.phpt:1.3 Tue Oct 22 14:40:30 2002 +++ php4/ext/db/tests/003.phpt Thu Nov 7 18:03:58 2002 -8,6 +8,7 if (dbmopen($db_file, n)) { dbminsert($db_file, key1, This is a test insert); dbmreplace($db_file, key1, This is the replacement text); + dbminsert($db_file, key1, This is another replacement text?); $a = dbmfetch($db_file, key1); dbmclose($db_file); echo $a; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba config.m4 dba.c dba_flatfile.c dba_flatile.c /ext/dba/libflatfile flatfile.c flatfile.h
helly Wed Nov 6 04:17:51 2002 EDT Added files: /php4/ext/dba dba_flatfile.c Removed files: /php4/ext/dba dba_flatile.c Modified files: /php4/ext/dba config.m4 dba.c /php4/ext/dba/libflatfile flatfile.c flatfile.h Log: Use the the name 'flatfile' correctly so the handler support can be built now. #I do not like the lock solution since a crashed php would leave the *lck #file locked now. Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.26 php4/ext/dba/config.m4:1.27 --- php4/ext/dba/config.m4:1.26 Tue Nov 5 23:16:17 2002 +++ php4/ext/dba/config.m4 Wed Nov 6 04:17:50 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.26 2002/11/06 04:16:17 helly Exp $ +dnl $Id: config.m4,v 1.27 2002/11/06 09:17:50 helly Exp $ dnl AC_DEFUN(PHP_TEMP_LDFLAGS,[ @@ -246,7 +246,7 @@ if test $withval = yes; then PHP_ADD_BUILD_DIR($ext_builddir/libflatfile) AC_DEFINE(DBA_FLATFILE, 1, [ ]) -flat_sources=php_flatfile.c libflatfile/flatfile.c +flat_sources=dba_flatfile.c libflatfile/flatfile.c THIS_RESULT=builtin fi ]) Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.53 php4/ext/dba/dba.c:1.54 --- php4/ext/dba/dba.c:1.53 Tue Nov 5 23:16:17 2002 +++ php4/ext/dba/dba.c Wed Nov 6 04:17:50 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dba.c,v 1.53 2002/11/06 04:16:17 helly Exp $ */ +/* $Id: dba.c,v 1.54 2002/11/06 09:17:50 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -35,6 +35,7 @@ #include php_cdb.h #include php_db2.h #include php_db3.h +#include php_flatfile.h /* {{{ dba_functions[] */ Index: php4/ext/dba/libflatfile/flatfile.c diff -u php4/ext/dba/libflatfile/flatfile.c:1.1 php4/ext/dba/libflatfile/flatfile.c:1.2 --- php4/ext/dba/libflatfile/flatfile.c:1.1 Tue Nov 5 23:16:18 2002 +++ php4/ext/dba/libflatfile/flatfile.c Wed Nov 6 04:17:51 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: flatfile.c,v 1.1 2002/11/06 04:16:18 helly Exp $ */ +/* $Id: flatfile.c,v 1.2 2002/11/06 09:17:51 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -36,7 +36,7 @@ #include unistd.h #endif -#include dbm.h +#include flatfile.h /* * ret = -1 means that database was opened for read-only @@ -46,7 +46,7 @@ /* {{{ dbm_file_store */ -PHPAPI int dbm_file_store(dba_dbm_data *dba, datum key_datum, datum value_datum, int mode TSRMLS_DC) { +PHPAPI int dbm_file_store(flatfile *dba, datum key_datum, datum value_datum, int mode +TSRMLS_DC) { if (mode == DBM_INSERT) { if (dbm_file_findkey(dba, key_datum TSRMLS_CC)) { return 1; @@ -77,7 +77,7 @@ /* {{{ dbm_file_fetch */ -PHPAPI datum dbm_file_fetch(dba_dbm_data *dba, datum key_datum TSRMLS_DC) { +PHPAPI datum dbm_file_fetch(flatfile *dba, datum key_datum TSRMLS_DC) { datum value_datum = {NULL, 0}; int num=0, buf_size=1024; char *buf; @@ -105,7 +105,7 @@ /* {{{ dbm_file_delete */ -PHPAPI int dbm_file_delete(dba_dbm_data *dba, datum key_datum TSRMLS_DC) { +PHPAPI int dbm_file_delete(flatfile *dba, datum key_datum TSRMLS_DC) { char *key = key_datum.dptr; int size = key_datum.dsize; @@ -164,7 +164,7 @@ /* {{{ dbm_file_findkey */ -PHPAPI int dbm_file_findkey(dba_dbm_data *dba, datum key_datum TSRMLS_DC) { +PHPAPI int dbm_file_findkey(flatfile *dba, datum key_datum TSRMLS_DC) { char *buf = NULL; int num; int buf_size=1024; @@ -211,7 +211,7 @@ /* {{{ dbm_file_firstkey */ -PHPAPI datum dbm_file_firstkey(dba_dbm_data *dba TSRMLS_DC) { +PHPAPI datum dbm_file_firstkey(flatfile *dba TSRMLS_DC) { datum buf; int num; int buf_size=1024; @@ -252,7 +252,7 @@ /* {{{ latfile_nextkey */ -PHPAPI datum dbm_file_nextkey(dba_dbm_data *dba TSRMLS_DC) { +PHPAPI datum dbm_file_nextkey(flatfile *dba TSRMLS_DC) { datum buf; int num; int buf_size=1024; Index: php4/ext/dba/libflatfile/flatfile.h diff -u php4/ext/dba/libflatfile/flatfile.h:1.1 php4/ext/dba/libflatfile/flatfile.h:1.2 --- php4/ext/dba/libflatfile/flatfile.h:1.1 Tue Nov 5 23:16:18 2002 +++ php4/ext/dba/libflatfile/flatfile.h Wed Nov 6 04:17:51 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: flatfile.h,v 1.1 2002/11/06 04:16:18 helly Exp $ */ +/* $Id: flatfile.h,v 1.2 2002/11/06 09:17:51 helly Exp $ */ #ifndef PHP_LIBDBM_H #define PHP_LIBDBM_H @@ -32,16 +32,16 @@ php_stream *fp; long CurrentFlatFilePos; datum nextkey; -} dba_dbm_data; +} flatfile; #define DBM_INSERT 0 #define DBM_REPLACE 1 -PHPAPI int dbm_file_store(dba_dbm_data *dba, datum key_datum, datum value_datum, int mode TSRMLS_DC); -PHPAPI datum
[PHP-CVS] cvs: php4 /ext/dba config.m4
helly Wed Nov 6 05:08:38 2002 EDT Modified files: /php4/ext/dba config.m4 Log: There shall never be an external library for this (hopefully). Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.27 php4/ext/dba/config.m4:1.28 --- php4/ext/dba/config.m4:1.27 Wed Nov 6 04:17:50 2002 +++ php4/ext/dba/config.m4 Wed Nov 6 05:08:38 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.27 2002/11/06 09:17:50 helly Exp $ +dnl $Id: config.m4,v 1.28 2002/11/06 10:08:38 helly Exp $ dnl AC_DEFUN(PHP_TEMP_LDFLAGS,[ -242,8 +242,8 AC_DBA_STD_RESULT AC_ARG_WITH(flatfile, -[ --with-flatfile[=DIR] Include FlatFile support],[ - if test $withval = yes; then +[ --with-flatfile Include FlatFile support],[ + if test $withval != no; then PHP_ADD_BUILD_DIR($ext_builddir/libflatfile) AC_DEFINE(DBA_FLATFILE, 1, [ ]) flat_sources=dba_flatfile.c libflatfile/flatfile.c -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba dba_flatfile.c
helly Wed Nov 6 05:43:41 2002 EDT Modified files: /php4/ext/dba dba_flatfile.c Log: fix locks and reading #i will extend the tests to guard on such failures Index: php4/ext/dba/dba_flatfile.c diff -u php4/ext/dba/dba_flatfile.c:1.1 php4/ext/dba/dba_flatfile.c:1.2 --- php4/ext/dba/dba_flatfile.c:1.1 Wed Nov 6 04:17:50 2002 +++ php4/ext/dba/dba_flatfile.c Wed Nov 6 05:43:41 2002 -16,7 +16,7 +--+ */ -/* $Id: dba_flatfile.c,v 1.1 2002/11/06 09:17:50 helly Exp $ */ +/* $Id: dba_flatfile.c,v 1.2 2002/11/06 10:43:41 helly Exp $ */ #ifdef HAVE_CONFIG_H #include config.h -157,16 +157,16 { DBM_DATA; + if (dba-lockfn) { #if NFS_HACK - VCWD_UNLINK(dba-lockfn); + VCWD_UNLINK(dba-lockfn); #else - if (dba-lockfn) { /*dba-lockfd = VCWD_OPEN_MODE(dba-lockfn, O_RDWR, 0644);*/ flock(dba-lockfd, LOCK_UN); close(dba-lockfd); - } #endif - efree(dba-lockfn); + efree(dba-lockfn); + } php_stream_close(dba-fp); if (dba-nextkey.dptr) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba/tests skipif.inc
helly Wed Nov 6 06:59:14 2002 EDT Modified files: /php4/ext/dba/tests skipif.inc Log: -convert from dos to unix file -disallow cdb_make Index: php4/ext/dba/tests/skipif.inc diff -u php4/ext/dba/tests/skipif.inc:1.2 php4/ext/dba/tests/skipif.inc:1.3 --- php4/ext/dba/tests/skipif.inc:1.2 Sun Nov 3 10:22:32 2002 +++ php4/ext/dba/tests/skipif.inc Wed Nov 6 06:59:14 2002 -1,12 +1,15 -?php - if (!extension_loaded('dba')) die('skip dba extension not available'); - if (!function_exists('dba_handlers')) die ('skip dba_handlers() not available'); - if (!sizeof(dba_handlers())) die('skip no handlers installed'); - // CDB currently supports only reading - $handler = dba_handlers(); - if ($handler[0]=='cdb') { - if (count($handler)==1) { - die('skip CDB currently supports only reading '); - } - } -? +?php + if (!extension_loaded('dba')) die('skip dba extension not available'); + if (!function_exists('dba_handlers')) die ('skip dba_handlers() not +available'); + if (!sizeof(dba_handlers())) die('skip no handlers installed'); + // CDB currently supports only reading + $handler = dba_handlers(); + if ($handler[0]=='cdb') { + if (count($handler)==1) { + die('skip CDB currently supports only reading'); + } + if ($handler[1]=='cdb_make' count($handler)==2) { + die('skip CDB currently supports only reading and creating'); + } + } +? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba/tests dba_handler.inc test.inc
helly Wed Nov 6 07:01:38 2002 EDT Modified files: /php4/ext/dba/tests dba_handler.inc test.inc Log: -convert from dos to unix file Index: php4/ext/dba/tests/dba_handler.inc diff -u php4/ext/dba/tests/dba_handler.inc:1.2 php4/ext/dba/tests/dba_handler.inc:1.3 --- php4/ext/dba/tests/dba_handler.inc:1.2 Wed Nov 6 06:18:00 2002 +++ php4/ext/dba/tests/dba_handler.inc Wed Nov 6 07:01:36 2002 -1,61 +1,61 -?php - echo database handler: $handler\n; - if (($db_file=dba_open($db_filename, n, $handler))!==FALSE) { - dba_insert(key1, Content String 1, $db_file); - dba_insert(key2, Content String 2, $db_file); - dba_insert(key3, Third Content String, $db_file); - dba_insert(key4, Another Content String, $db_file); - dba_insert(key5, The last content string, $db_file); - dba_delete(key3, $db_file); - dba_delete(key1, $db_file); - $a = dba_firstkey($db_file); - $i=0; - while($a) { - $a = dba_nextkey($db_file); - $i++; - } - echo $i; - for ($i=1; $i6; $i++) { - echo dba_exists(key$i, $db_file) ? Y : N; - } - echo \n; - echo dba_fetch(key2, $db_file).\n; - dba_replace(key2, Content 2 replaced, $db_file); - echo dba_fetch(key2, $db_file).\n; - dba_close($db_file); - } else { - echo Error creating database\n; - } - $db_writer=dba_open($db_filename, w, $handler); - if (($dba_reader=dba_open($db_filename, r, $handler))===false) { - echo Cannot read during write operation\n; - } else { - echo Read during write permitted\n; - } - if ($db_writer!==FALSE) { - dba_insert(key number 6, The 6th value, $db_writer); - dba_replace(key2, Content 2 replaced 2nd time, $db_writer); - dba_delete(key4, $db_writer); - echo dba_fetch(key2, $db_writer).\n; - echo dba_fetch(key number 6, $db_writer).\n; - dba_close($db_writer); // when the writer is open at least db3 would fail because of buffered io. - } else { - die(Error reopening database\n); - } - if (($db_file=dba_open($db_filename, r, $handler))!==FALSE) { - $key = dba_firstkey($db_file); - $res = array(); - while($key) { - $res[$key] = dba_fetch($key, $db_file); - $key = dba_nextkey($db_file); - } - ksort($res); - var_dump($res); - dba_close($db_file); - } else { - echo Error reading database\n; - } - if ($dba_reader) { - dba_close($dba_reader); - } +?php + echo database handler: $handler\n; + if (($db_file=dba_open($db_filename, n, $handler))!==FALSE) { + dba_insert(key1, Content String 1, $db_file); + dba_insert(key2, Content String 2, $db_file); + dba_insert(key3, Third Content String, $db_file); + dba_insert(key4, Another Content String, $db_file); + dba_insert(key5, The last content string, $db_file); + dba_delete(key3, $db_file); + dba_delete(key1, $db_file); + $a = dba_firstkey($db_file); + $i=0; + while($a) { + $a = dba_nextkey($db_file); + $i++; + } + echo $i; + for ($i=1; $i6; $i++) { + echo dba_exists(key$i, $db_file) ? Y : N; + } + echo \n; + echo dba_fetch(key2, $db_file).\n; + dba_replace(key2, Content 2 replaced, $db_file); + echo dba_fetch(key2, $db_file).\n; + dba_close($db_file); + } else { + echo Error creating database\n; + } + $db_writer=dba_open($db_filename, w, $handler); + if (($dba_reader=dba_open($db_filename, r, $handler))===false) { + echo Cannot read during write operation\n; + } else { + echo Read during write permitted\n; + } + if ($db_writer!==FALSE) { + dba_insert(key number 6, The 6th value, $db_writer); + dba_replace(key2, Content 2 replaced 2nd time, $db_writer); + dba_delete(key4, $db_writer); + echo dba_fetch(key2, $db_writer).\n; + echo dba_fetch(key number 6, $db_writer).\n; + dba_close($db_writer); // when the writer is open at least db3 would +fail because of buffered io. + } else { + die(Error reopening database\n); + } + if
[PHP-CVS] cvs: php4 /ext/dbx/tests 005.phpt
helly Wed Nov 6 11:56:44 2002 EDT Modified files: /php4/ext/dbx/tests 005.phpt Log: added missing magic_quotes_runtime=0 Index: php4/ext/dbx/tests/005.phpt diff -u php4/ext/dbx/tests/005.phpt:1.8 php4/ext/dbx/tests/005.phpt:1.9 --- php4/ext/dbx/tests/005.phpt:1.8 Mon Oct 28 04:41:15 2002 +++ php4/ext/dbx/tests/005.phpt Wed Nov 6 11:56:44 2002 -4,6 +4,8 ?php include_once(skipif.inc); ? +--INI-- +magic_quotes_runtime=0 --FILE-- ?php include_once(dbx_test.p); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php