[PHP-CVS] cvs: php-src /ext/sqlite sqlite.c
helly Thu Aug 28 19:36:47 2003 EDT Modified files: /php-src/ext/sqlite sqlite.c Log: Need to check if we got any value before destroying it Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.85 php-src/ext/sqlite/sqlite.c:1.86 --- php-src/ext/sqlite/sqlite.c:1.85Thu Aug 28 19:19:51 2003 +++ php-src/ext/sqlite/sqlite.c Thu Aug 28 19:36:46 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +--+ - $Id: sqlite.c,v 1.85 2003/08/28 23:19:51 helly Exp $ + $Id: sqlite.c,v 1.86 2003/08/28 23:36:46 helly Exp $ */ #ifdef HAVE_CONFIG_H @@ -941,7 +941,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.85 2003/08/28 23:19:51 helly Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.86 2003/08/28 23:36:46 helly Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1735,7 +1735,9 @@ if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) { zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not execute %s::%s()", class_name, ce->constructor->common.function_name); } else { - zval_ptr_dtor(&retval_ptr); + if (retval_ptr) { + zval_ptr_dtor(&retval_ptr); + } } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sqlite/tests sqlite_024.phpt sqlite_oo_024.phpt
helly Thu Aug 28 19:30:17 2003 EDT Modified files: /php-src/ext/sqlite/tests sqlite_024.phpt sqlite_oo_024.phpt Log: Match expected class and instantiated class Index: php-src/ext/sqlite/tests/sqlite_024.phpt diff -u php-src/ext/sqlite/tests/sqlite_024.phpt:1.1 php-src/ext/sqlite/tests/sqlite_024.phpt:1.2 --- php-src/ext/sqlite/tests/sqlite_024.phpt:1.1Thu Aug 28 19:19:51 2003 +++ php-src/ext/sqlite/tests/sqlite_024.phptThu Aug 28 19:30:16 2003 @@ -27,13 +27,13 @@ sqlite_query($db, "INSERT INTO strings VALUES('$str')"); } -echo "stdclass\n"; +echo "class24\n"; $res = sqlite_query($db, "SELECT a FROM strings", SQLITE_ASSOC); while (sqlite_has_more($res)) { var_dump(sqlite_fetch_object($res, 'class24')); } -echo "class24!\n"; +echo "stdclass\n"; $res = sqlite_query($db, "SELECT a FROM strings", SQLITE_ASSOC); while (sqlite_has_more($res)) { var_dump(sqlite_fetch_object($res)); @@ -42,7 +42,7 @@ echo "DONE!\n"; ?> --EXPECTF-- -stdclass +class24 class24::__construct object(class24)#%d (1) { ["a"]=> @@ -58,7 +58,7 @@ ["a"]=> string(5) "three" } -class24! +stdclass object(stdClass)#%d (1) { ["a"]=> string(3) "one" Index: php-src/ext/sqlite/tests/sqlite_oo_024.phpt diff -u php-src/ext/sqlite/tests/sqlite_oo_024.phpt:1.1 php-src/ext/sqlite/tests/sqlite_oo_024.phpt:1.2 --- php-src/ext/sqlite/tests/sqlite_oo_024.phpt:1.1 Thu Aug 28 19:19:51 2003 +++ php-src/ext/sqlite/tests/sqlite_oo_024.phpt Thu Aug 28 19:30:16 2003 @@ -27,13 +27,13 @@ $db->query("INSERT INTO strings VALUES('$str')"); } -echo "stdclass\n"; +echo "class24\n"; $res = $db->query("SELECT a FROM strings", SQLITE_ASSOC); while ($res->has_more()) { var_dump($res->fetch_object('class24')); } -echo "class24!\n"; +echo "stdclass\n"; $res = $db->query("SELECT a FROM strings", SQLITE_ASSOC); while ($res->has_more()) { var_dump($res->fetch_object()); @@ -42,7 +42,7 @@ echo "DONE!\n"; ?> --EXPECTF-- -stdclass +class24 class24::__construct object(class24)#%d (1) { ["a"]=> @@ -58,7 +58,7 @@ ["a"]=> string(5) "three" } -class24! +stdclass object(stdClass)#%d (1) { ["a"]=> string(3) "one" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sqlite php_sqlite.h sqlite.c /ext/sqlite/tests sqlite_024.phpt sqlite_oo_024.phpt
helly Thu Aug 28 19:19:53 2003 EDT Added files: /php-src/ext/sqlite/tests sqlite_024.phpt sqlite_oo_024.phpt Modified files: /php-src/ext/sqlite php_sqlite.h sqlite.c Log: Add sqlite_fetch_object() Index: php-src/ext/sqlite/php_sqlite.h diff -u php-src/ext/sqlite/php_sqlite.h:1.25 php-src/ext/sqlite/php_sqlite.h:1.26 --- php-src/ext/sqlite/php_sqlite.h:1.25Sun Jul 13 05:38:33 2003 +++ php-src/ext/sqlite/php_sqlite.h Thu Aug 28 19:19:51 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +--+ - $Id: php_sqlite.h,v 1.25 2003/07/13 09:38:33 wez Exp $ + $Id: php_sqlite.h,v 1.26 2003/08/28 23:19:51 helly Exp $ */ #ifndef PHP_SQLITE_H @@ -51,6 +51,7 @@ PHP_FUNCTION(sqlite_single_query); PHP_FUNCTION(sqlite_fetch_array); +PHP_FUNCTION(sqlite_fetch_object); PHP_FUNCTION(sqlite_fetch_single); PHP_FUNCTION(sqlite_fetch_all); PHP_FUNCTION(sqlite_current); Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.84 php-src/ext/sqlite/sqlite.c:1.85 --- php-src/ext/sqlite/sqlite.c:1.84Mon Aug 25 16:55:14 2003 +++ php-src/ext/sqlite/sqlite.c Thu Aug 28 19:19:51 2003 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +--+ - $Id: sqlite.c,v 1.84 2003/08/25 20:55:14 helly Exp $ + $Id: sqlite.c,v 1.85 2003/08/28 23:19:51 helly Exp $ */ #ifdef HAVE_CONFIG_H @@ -161,6 +161,7 @@ PHP_FE(sqlite_array_query, NULL) PHP_FE(sqlite_single_query, NULL) PHP_FE(sqlite_fetch_array, NULL) + PHP_FE(sqlite_fetch_object, NULL) PHP_FE(sqlite_fetch_single, NULL) PHP_FALIAS(sqlite_fetch_string, sqlite_fetch_single, NULL) PHP_FE(sqlite_fetch_all, NULL) @@ -214,6 +215,7 @@ function_entry sqlite_funcs_query[] = { PHP_ME_MAPPING(fetch_array, sqlite_fetch_array, NULL) + PHP_ME_MAPPING(fetch_object, sqlite_fetch_object, NULL) PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL) PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL) PHP_ME_MAPPING(column, sqlite_column, NULL) @@ -236,6 +238,7 @@ function_entry sqlite_funcs_ub_query[] = { PHP_ME_MAPPING(fetch_array, sqlite_fetch_array, NULL) + PHP_ME_MAPPING(fetch_object, sqlite_fetch_object, NULL) PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL) PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL) PHP_ME_MAPPING(column, sqlite_column, NULL) @@ -938,7 +941,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.84 2003/08/25 20:55:14 helly Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.85 2003/08/28 23:19:51 helly Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1159,7 +1162,7 @@ php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + php_std_error_handling(); RETURN_NULL(); } if (errmsg) { @@ -1167,18 +1170,18 @@ } if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + php_std_error_handling(); RETURN_NULL(); } if (php_check_open_basedir(filename TSRMLS_CC)) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + php_std_error_handling(); RETURN_NULL(); } php_sqlite_open(filename, mode, NULL, return_value, errmsg, return_value TSRMLS_CC); - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + php_std_error_handling(); } /* }}} */ @@ -1657,6 +1660,84 @@ } php_sqlite_fetch_array(res, mode, decode_binary, 1, return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto object sqlite_fetch_object(resource result [, string class_name [, bool decode_binary]]) + Fetches the next row from a result set as an object. */ +PHP_FUNCTION(sqlite_fetch_object) +{ + zval *zres; + zend_bool decode_binary = 1; + struct php_sqlite_result *res; + zval *object = getThis(); + char *class_name; + int class_name_len; + zend_class_entry *ce; + zval dataset; +
[PHP-CVS] cvs: php-src /ext/sqlite/tests sqlite_oo_014.phpt sqlite_oo_021.phpt sqlite_oo_022.phpt
helly Thu Aug 28 19:18:39 2003 EDT Modified files: /php-src/ext/sqlite/tests sqlite_oo_014.phpt sqlite_oo_021.phpt sqlite_oo_022.phpt Log: Error messages show the class now Index: php-src/ext/sqlite/tests/sqlite_oo_014.phpt diff -u php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.1 php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.2 --- php-src/ext/sqlite/tests/sqlite_oo_014.phpt:1.1 Sun Jun 22 13:19:46 2003 +++ php-src/ext/sqlite/tests/sqlite_oo_014.phpt Thu Aug 28 19:18:38 2003 @@ -59,7 +59,7 @@ } } -Notice: fetch_all(): One or more rowsets were already returned in %ssqlite_oo_014.php on line %d +Notice: sqlite_ub_query::fetch_all(): One or more rowsets were already returned in %ssqlite_oo_014.php on line %d array(0) { } unbuffered with fetch_array Index: php-src/ext/sqlite/tests/sqlite_oo_021.phpt diff -u php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.1 php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.2 --- php-src/ext/sqlite/tests/sqlite_oo_021.phpt:1.1 Wed Jun 25 12:59:24 2003 +++ php-src/ext/sqlite/tests/sqlite_oo_021.phpt Thu Aug 28 19:18:38 2003 @@ -38,7 +38,7 @@ string(1) "4" } -Warning: single_query(): no such table: test in %s on line %d +Warning: sqlite_db::single_query(): no such table: test in %s on line %d bool(false) NULL array(1) { Index: php-src/ext/sqlite/tests/sqlite_oo_022.phpt diff -u php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.1 php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.2 --- php-src/ext/sqlite/tests/sqlite_oo_022.phpt:1.1 Wed Jul 9 12:55:07 2003 +++ php-src/ext/sqlite/tests/sqlite_oo_022.phpt Thu Aug 28 19:18:38 2003 @@ -38,7 +38,7 @@ --EXPECTF-- SEEK:-1 -Warning: seek(): row -1 out of range in %ssqlite_oo_022.php on line %d +Warning: sqlite_query::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d array(1) { [0]=> string(3) "one" @@ -60,7 +60,7 @@ } SEEK:3 -Warning: seek(): row 3 out of range in %ssqlite_oo_022.php on line %d +Warning: sqlite_query::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d array(1) { [0]=> string(5) "three" @@ -68,7 +68,7 @@ AGAIN SEEK:-1 -Warning: seek(): row -1 out of range in %ssqlite_oo_022.php on line %d +Warning: sqlite_query::seek(): row -1 out of range in %ssqlite_oo_022.php on line %d array(1) { [0]=> string(5) "three" @@ -90,7 +90,7 @@ } SEEK:3 -Warning: seek(): row 3 out of range in %ssqlite_oo_022.php on line %d +Warning: sqlite_query::seek(): row 3 out of range in %ssqlite_oo_022.php on line %d array(1) { [0]=> string(5) "three" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
helly Thu Aug 28 19:04:27 2003 EDT Modified files: /php-src/ext/pgsql pgsql.c Log: format string fix and number of arguments Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.293 php-src/ext/pgsql/pgsql.c:1.294 --- php-src/ext/pgsql/pgsql.c:1.293 Thu Aug 28 17:06:44 2003 +++ php-src/ext/pgsql/pgsql.c Thu Aug 28 19:04:27 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.293 2003/08/28 21:06:44 andrey Exp $ */ +/* $Id: pgsql.c,v 1.294 2003/08/28 23:04:27 helly Exp $ */ #include @@ -576,12 +576,12 @@ if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Cannot create new link. Too many open links (%d)", PGG(num_links)); +"Cannot create new link. Too many open links (%ld)", PGG(num_links)); goto err; } if (PGG(max_persistent)!=-1 && PGG(num_persistent)>=PGG(max_persistent)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Cannot create new link. Too many open persistent links (%d)", PGG(num_persistent)); +"Cannot create new link. Too many open persistent links (%ld)", PGG(num_persistent)); goto err; } @@ -678,7 +678,7 @@ } } if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%d)", PGG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%ld)", PGG(num_links)); goto err; } if (connstring) { @@ -2312,7 +2312,7 @@ } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC, "lsr", &oid_long, &file_out, &name_len, &pgsql_link) == SUCCESS) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, " %s(): Old API is used"); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Old API is used"); if (oid_long <= InvalidOid) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c
abies Thu Aug 28 18:12:07 2003 EDT Modified files: /php-src/ext/interbase interbase.c Log: Prototype fixes Return number of affected rows by ibase_query() and ibase_execute() if > 0 # Second change was actually introduced in 1.149, but never # mentioned in the CVS log Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.163 php-src/ext/interbase/interbase.c:1.164 --- php-src/ext/interbase/interbase.c:1.163 Thu Aug 28 12:48:22 2003 +++ php-src/ext/interbase/interbase.c Thu Aug 28 18:12:06 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.163 2003/08/28 16:48:22 abies Exp $ */ +/* $Id: interbase.c,v 1.164 2003/08/28 22:12:06 abies Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -185,7 +185,7 @@ } /* }}} */ -/* {{{ proto string ibase_errcode(void) +/* {{{ proto int ibase_errcode(void) Return error code */ PHP_FUNCTION(ibase_errcode) { @@ -704,7 +704,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Interbase Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.163 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.164 $"); #ifdef COMPILE_DL_INTERBASE php_info_print_table_row(2, "Dynamic Module", "Yes"); #endif @@ -2033,7 +2033,7 @@ } /* }}} */ -/* {{{ proto resource ibase_query([resource link_identifier [, resource link_identifier ] ,] string query [, int bind_args]) +/* {{{ proto mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]]) Execute a query */ PHP_FUNCTION(ibase_query) { @@ -2188,7 +2188,7 @@ } /* }}} */ -/* {{{ proto ibase_affected_rows( [ resource link_identifier ] ) +/* {{{ proto int ibase_affected_rows( [ resource link_identifier ] ) Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement */ PHP_FUNCTION(ibase_affected_rows) { @@ -2847,7 +2847,7 @@ } /* }}} */ -/* {{{ proto resource ibase_execute(resource query [, int bind_args [, int ...]]) +/* {{{ proto mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]]) Execute a previously prepared query */ PHP_FUNCTION(ibase_execute) { @@ -2927,7 +2927,7 @@ /* }}} */ #if HAVE_STRFTIME -/* {{{ proto int ibase_timefmt(string format) +/* {{{ proto bool ibase_timefmt(string format) Sets the format of timestamp, date and time columns returned from queries */ PHP_FUNCTION(ibase_timefmt) { @@ -3254,7 +3254,7 @@ } /* }}} */ -/* {{{ proto int ibase_blob_create([resource link_identifier]) +/* {{{ proto resource ibase_blob_create([resource link_identifier]) Create blob for adding data */ PHP_FUNCTION(ibase_blob_create) { @@ -3299,7 +3299,7 @@ } /* }}} */ -/* {{{ proto int ibase_blob_open([ resource link_identifier, ] string blob_id) +/* {{{ proto resource ibase_blob_open([ resource link_identifier, ] string blob_id) Open blob for retrieving data parts */ PHP_FUNCTION(ibase_blob_open) { @@ -3356,7 +3356,7 @@ } /* }}} */ -/* {{{ proto bool ibase_blob_add(int blob_id, string data) +/* {{{ proto bool ibase_blob_add(resource blob_handle, string data) Add data into created blob */ PHP_FUNCTION(ibase_blob_add) { @@ -3382,7 +3382,7 @@ } /* }}} */ -/* {{{ proto string ibase_blob_get(int blob_id, int len) +/* {{{ proto string ibase_blob_get(resource blob_handle, int len) Get len bytes data from open blob */ PHP_FUNCTION(ibase_blob_get) { @@ -3448,7 +3448,7 @@ } /* }}} */ -/* {{{ proto bool ibase_blob_close(int blob_id) +/* {{{ proto string ibase_blob_close(resource blob_handle) Close blob */ PHP_FUNCTION(ibase_blob_close) { @@ -3456,7 +3456,7 @@ } /* }}} */ -/* {{{ proto bool ibase_blob_cancel(int blob_id) +/* {{{ proto bool ibase_blob_cancel(resource blob_handle) Cancel creating blob */ PHP_FUNCTION(ibase_blob_cancel) { @@ -3464,7 +3464,7 @@ } /* }}} */ -/* {{{ proto object ibase_blob_info([ resource link_identifier, ] string blob_id_str) +/* {{{ proto array ibase_blob_info([ resource link_identifier, ] string blob_id) Return blob length and other useful info */ PHP_FUNCTION(ibase_blob_info) { @@ -3545,7 +3545,7 @@ } /* }}} */ -/* {{{ proto bool ibase_blob_echo([ resource link_identifier, ] string blob_id_str) +/* {{{ proto bool ibase_blob_echo([ resource link_identifier, ] string blob_id) Output blob contents to browser */ PHP_FUNCTION(ibase_blob_echo) { @@ -3884,7 +3884,7 @@ } /* }}} */ -/* {{{ proto string ibase_wait_event([resource link,] string event [, string event [, ...]]) +/* {{{ proto string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]]) Waits for any one of the passed Interbase events to be posted by the database, and returns its name */ PHP_FUNCTION(ibase_wait_event) { @@ -4015,7
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/pgsql pgsql.c
andrey Thu Aug 28 17:09:22 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/pgsql pgsql.c Log: MFH : str is string not a long Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.244.2.24 php-src/ext/pgsql/pgsql.c:1.244.2.25 --- php-src/ext/pgsql/pgsql.c:1.244.2.24Thu Aug 28 13:54:03 2003 +++ php-src/ext/pgsql/pgsql.c Thu Aug 28 17:09:21 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.244.2.24 2003/08/28 17:54:03 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.244.2.25 2003/08/28 21:09:21 andrey Exp $ */ #include @@ -2026,7 +2026,8 @@ if (argc > 2) { convert_to_long_ex(z_len); if (Z_LVAL_PP(z_len) > Z_STRLEN_PP(str)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %ld. Tried to write %ld.", Z_LVAL_PP(str), Z_LVAL_PP(z_len)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %ld.", + Z_STRLEN_PP(str), Z_LVAL_PP(z_len)); RETURN_FALSE; } if (Z_LVAL_PP(z_len) < 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
andrey Thu Aug 28 17:06:45 2003 EDT Modified files: /php-src/ext/pgsql pgsql.c Log: this is the right parameter Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.292 php-src/ext/pgsql/pgsql.c:1.293 --- php-src/ext/pgsql/pgsql.c:1.292 Thu Aug 28 17:00:22 2003 +++ php-src/ext/pgsql/pgsql.c Thu Aug 28 17:06:44 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.292 2003/08/28 21:00:22 andrey Exp $ */ +/* $Id: pgsql.c,v 1.293 2003/08/28 21:06:44 andrey Exp $ */ #include @@ -2147,7 +2147,7 @@ RETURN_FALSE; } if (Z_LVAL_PP(z_len) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %d was specified", Z_STRLEN_PP(str)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %ld was specified", Z_LVAL_PP(z_len)); RETURN_FALSE; } len = Z_LVAL_PP(z_len); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/db db.c /ext/dbase dbase.c /ext/filepro filepro.c /ext/gd gd.c /ext/msql php_msql.c /ext/mssql php_mssql.c /ext/mysqli mysqli_api.c /ext/odbc birdstep.c /ext/pgsql pgsql.c /ext/pspell pspell.c /ext/sybase php_sybase_db.c
andrey Thu Aug 28 17:00:26 2003 EDT Modified files: /php-src/ext/db db.c /php-src/ext/dbase dbase.c /php-src/ext/fileprofilepro.c /php-src/ext/gd gd.c /php-src/ext/msql php_msql.c /php-src/ext/mssql php_mssql.c /php-src/ext/mysqli mysqli_api.c /php-src/ext/odbc birdstep.c /php-src/ext/pgsql pgsql.c /php-src/ext/pspell pspell.c /php-src/ext/sybase php_sybase_db.c Log: format string fixes Index: php-src/ext/db/db.c diff -u php-src/ext/db/db.c:1.90 php-src/ext/db/db.c:1.91 --- php-src/ext/db/db.c:1.90Mon Aug 11 20:55:58 2003 +++ php-src/ext/db/db.c Thu Aug 28 17:00:12 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: db.c,v 1.90 2003/08/12 00:55:58 iliaa Exp $ */ +/* $Id: db.c,v 1.91 2003/08/28 21:00:12 andrey Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -505,7 +505,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -531,7 +531,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -599,7 +599,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -675,7 +675,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -724,7 +724,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -771,7 +771,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -833,7 +833,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } Index: php-src/ext/dbase/dbase.c diff -u php-src/ext/dbase/dbase.c:1.67 php-src/ext/dbase/dbase.c:1.68 --- php-src/ext/dbase/dbase.c:1.67 Thu Jul 31 14:28:47 2003 +++ php-src/ext/dbase/dbase.c Thu Aug 28 17:00:13 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dbase.c,v 1.67 2003/07/31 18:28:47 sniper Exp $ */ +/* $Id: dbase.c,v 1.68 2003/08/28 21:00:13 andrey Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -163,7 +163,7 @@ convert_to_long_ex(dbh_id); dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type); if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %d", Z_LVAL_PP(dbh_id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id)); RETURN_FALSE; } @@ -187,7 +187,7 @@ convert_to_long_ex(dbh_id); dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type); if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %d", Z_LVAL_PP(dbh_id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id)); RETURN_FALSE; } @@ -210,7 +210,7 @@ convert_to_long_ex(dbh_id); dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type); if (!dbh || dbh_type != DBase_GLO
[PHP-CVS] cvs: php-src /ext/mysqli mysqli_profiler.c
andrey Thu Aug 28 16:51:18 2003 EDT Modified files: /php-src/ext/mysqli mysqli_profiler.c Log: misplaced quote Index: php-src/ext/mysqli/mysqli_profiler.c diff -u php-src/ext/mysqli/mysqli_profiler.c:1.8 php-src/ext/mysqli/mysqli_profiler.c:1.9 --- php-src/ext/mysqli/mysqli_profiler.c:1.8Mon Aug 11 20:55:56 2003 +++ php-src/ext/mysqli/mysqli_profiler.cThu Aug 28 16:51:18 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]>| +--+ - $Id: mysqli_profiler.c,v 1.8 2003/08/12 00:55:56 iliaa Exp $ + $Id: mysqli_profiler.c,v 1.9 2003/08/28 20:51:18 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -447,7 +447,7 @@ RETURN_FALSE; } if (!(connection = php_mysqli_create_socket(name, port))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to host %s on port %d, name, port"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to host %s on port %d", name, port); RETURN_FALSE; } prmain = ecalloc(1, sizeof(PR_MAIN)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session session.c
andrey Thu Aug 28 16:43:19 2003 EDT Modified files: /php-src/ext/sessionsession.c Log: \n at the end of the message is not needed Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.373 php-src/ext/session/session.c:1.374 --- php-src/ext/session/session.c:1.373 Thu Aug 28 13:34:33 2003 +++ php-src/ext/session/session.c Thu Aug 28 16:43:18 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.373 2003/08/28 17:34:33 sas Exp $ */ +/* $Id: session.c,v 1.374 2003/08/28 20:43:18 andrey Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1154,7 +1154,7 @@ PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &nrdels TSRMLS_CC); #if 0 if (nrdels != -1) - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "purged %d expired session objects\n", nrdels); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "purged %d expired session objects", nrdels); #endif } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/sybase_ct php_sybase_ct.c
andrey Thu Aug 28 16:29:14 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sybase_ct php_sybase_ct.c Log: format string fix and \n at the end of the message is not needed Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.7 php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.8 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.7 Thu Aug 28 12:31:51 2003 +++ php-src/ext/sybase_ct/php_sybase_ct.c Thu Aug 28 16:29:13 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.73.2.7 2003/08/28 16:31:51 sniper Exp $ */ +/* $Id: php_sybase_ct.c,v 1.73.2.8 2003/08/28 20:29:13 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -1437,7 +1437,7 @@ /* Retry deadlocks up until deadlock_retry_count times */ if (sybase_ptr->deadlock && SybCtG(deadlock_retry_count) != -1 && ++deadlock_count > SybCtG(deadlock_retry_count)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Retried deadlock %d times [max: %d], giving up\n", deadlock_count- 1, SybCtG(deadlock_retry_count)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Retried deadlock %d times [max: %d], giving up", deadlock_count- 1, SybCtG(deadlock_retry_count)); if (result != NULL) { _free_sybase_result(result); } @@ -1904,7 +1904,7 @@ } if (Z_LVAL_PP(row) < 0 || Z_LVAL_PP(row) >= result->num_rows) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Bad row offset (%d)", Z_LVAL_PP(row)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Bad row offset (%ld)", Z_LVAL_PP(row)); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/sybase php_sybase_db.c
andrey Thu Aug 28 16:27:54 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sybase php_sybase_db.c Log: format string fixes Index: php-src/ext/sybase/php_sybase_db.c diff -u php-src/ext/sybase/php_sybase_db.c:1.38.2.10 php-src/ext/sybase/php_sybase_db.c:1.38.2.11 --- php-src/ext/sybase/php_sybase_db.c:1.38.2.10Tue Aug 5 12:02:37 2003 +++ php-src/ext/sybase/php_sybase_db.c Thu Aug 28 16:27:53 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_sybase_db.c,v 1.38.2.10 2003/08/05 16:02:37 sniper Exp $ */ +/* $Id: php_sybase_db.c,v 1.38.2.11 2003/08/28 20:27:53 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -957,7 +957,7 @@ result = (sybase_result *) zend_list_find(Z_LVAL_PP(sybase_result_index),&type); if (type!=php_sybase_module.le_result) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"%d is not a Sybase result index",Z_LVAL_PP(sybase_result_index)); + php_error_docref(NULL TSRMLS_CC, E_WARNING,"%ld is not a Sybase result index", Z_LVAL_PP(sybase_result_index)); RETURN_FALSE; } zend_list_delete(Z_LVAL_PP(sybase_result_index)); @@ -1078,7 +1078,7 @@ result = (sybase_result *) zend_list_find(Z_LVAL_PP(sybase_result_index),&type); if (type!=php_sybase_module.le_result) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"%d is not a Sybase result index",Z_LVAL_PP(sybase_result_index)); + php_error_docref(NULL TSRMLS_CC, E_WARNING,"%ld is not a Sybase result index", Z_LVAL_PP(sybase_result_index)); RETURN_FALSE; } @@ -1314,7 +1314,7 @@ convert_to_long_ex(row); if (Z_LVAL_PP(row)<0 || Z_LVAL_PP(row)>=result->num_rows) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Sybase: Bad row offset (%d)",Z_LVAL_PP(row)); + php_error_docref(NULL TSRMLS_CC, E_WARNING,"Sybase: Bad row offset (%ld)", Z_LVAL_PP(row)); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/session session.c
andrey Thu Aug 28 16:26:33 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sessionsession.c Log: \n at the end of the message is not needed Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.336.2.26 php-src/ext/session/session.c:1.336.2.27 --- php-src/ext/session/session.c:1.336.2.26Thu Aug 28 13:34:30 2003 +++ php-src/ext/session/session.c Thu Aug 28 16:26:32 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.336.2.26 2003/08/28 17:34:30 sas Exp $ */ +/* $Id: session.c,v 1.336.2.27 2003/08/28 20:26:32 andrey Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1055,7 +1055,7 @@ PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), &nrdels TSRMLS_CC); #if 0 if (nrdels != -1) - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "purged %d expired session objects\n", nrdels); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "purged %d expired session objects", nrdels); #endif } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/gd gd.c
andrey Thu Aug 28 16:25:32 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/gd gd.c Log: format string fix Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.30 php-src/ext/gd/gd.c:1.221.2.31 --- php-src/ext/gd/gd.c:1.221.2.30 Thu Jun 19 11:48:07 2003 +++ php-src/ext/gd/gd.c Thu Aug 28 16:25:31 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.30 2003/06/19 15:48:07 iliaa Exp $ */ +/* $Id: gd.c,v 1.221.2.31 2003/08/28 20:25:31 andrey Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -3166,7 +3166,7 @@ of_ind = zend_list_find(Z_LVAL_PP(fnt), &type); if (type != le_ps_font) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a Type 1 font index", Z_LVAL_PP(fnt)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a Type 1 font index", Z_LVAL_PP(fnt)); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/iconv iconv.c
iliaa Thu Aug 28 16:05:25 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/iconv iconv.c Log: One more warning fix. Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.65.2.10 php-src/ext/iconv/iconv.c:1.65.2.11 --- php-src/ext/iconv/iconv.c:1.65.2.10 Wed Aug 13 14:22:17 2003 +++ php-src/ext/iconv/iconv.c Thu Aug 28 16:05:24 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: iconv.c,v 1.65.2.10 2003/08/13 18:22:17 moriyoshi Exp $ */ +/* $Id: iconv.c,v 1.65.2.11 2003/08/28 20:05:24 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -269,7 +269,7 @@ out_p = out_buf; while (in_left > 0) { - result = iconv(cd, (const char **) &in_p, &in_left, (char **) &out_p, &out_left); + result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left); out_size = bsz - out_left; if (result == (size_t)(-1)) { if (errno == E2BIG && in_left > 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/calendar calendar.c /ext/db db.c /ext/dio dio.c /ext/filepro filepro.c /ext/hyperwave hw.c /ext/ldap ldap.c /ext/mssql php_mssql.c /ext/pspell pspell.c /ext/sockets sockets.c /ext/sysvsem sysvsem.c /ext/sysvshm sysvshm.c /ext/xmlrpc xmlrpc-epi-php.c /ext/xslt sablot.c /ext/zlib zlib.c
iliaa Thu Aug 28 16:01:35 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/calendar calendar.c /php-src/ext/db db.c /php-src/ext/diodio.c /php-src/ext/fileprofilepro.c /php-src/ext/hyperwave hw.c /php-src/ext/ldap ldap.c /php-src/ext/mssql php_mssql.c /php-src/ext/pspell pspell.c /php-src/ext/socketssockets.c /php-src/ext/sysvsemsysvsem.c /php-src/ext/sysvshmsysvshm.c /php-src/ext/xmlrpc xmlrpc-epi-php.c /php-src/ext/xslt sablot.c /php-src/ext/zlib zlib.c Log: Compiler warning fixes. Index: php-src/ext/calendar/calendar.c diff -u php-src/ext/calendar/calendar.c:1.30.2.2 php-src/ext/calendar/calendar.c:1.30.2.3 --- php-src/ext/calendar/calendar.c:1.30.2.2Tue Dec 31 11:34:11 2002 +++ php-src/ext/calendar/calendar.c Thu Aug 28 16:01:24 2003 @@ -18,7 +18,7 @@ | Wez Furlong <[EMAIL PROTECTED]>| +--+ */ -/* $Id: calendar.c,v 1.30.2.2 2002/12/31 16:34:11 sebastian Exp $ */ +/* $Id: calendar.c,v 1.30.2.3 2003/08/28 20:01:24 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -161,7 +161,7 @@ } convert_to_long_ex(cal); if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) { - zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); + zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); RETURN_FALSE; } @@ -203,7 +203,7 @@ convert_to_long_ex(year); if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) { - zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); + zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); RETURN_FALSE; } @@ -239,7 +239,7 @@ convert_to_long_ex(year); if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) { - zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); + zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); RETURN_FALSE; } @@ -265,7 +265,7 @@ convert_to_long_ex(cal); if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) { - zend_error(E_WARNING, "%s(): invalid calendar ID %d", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); + zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal)); RETURN_FALSE; } calendar = &cal_conversion_table[Z_LVAL_PP(cal)]; Index: php-src/ext/db/db.c diff -u php-src/ext/db/db.c:1.81.2.3 php-src/ext/db/db.c:1.81.2.4 --- php-src/ext/db/db.c:1.81.2.3Thu Mar 6 15:58:14 2003 +++ php-src/ext/db/db.c Thu Aug 28 16:01:25 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: db.c,v 1.81.2.3 2003/03/06 20:58:14 sesser Exp $ */ +/* $Id: db.c,v 1.81.2.4 2003/08/28 20:01:25 iliaa Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -513,7 +513,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -539,7 +539,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -607,7 +607,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -683,7 +683,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %d", Z_LVAL_P(id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid database identifier %ld", Z_LVAL_P(id)); RETURN_FALSE; } @@ -732,7 +732,7 @@ info = php_find_dbm(id TSRMLS_CC); if (!info) { - php_er
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/ftp php_ftp.c /ext/imap php_imap.c /ext/mysql php_mysql.c /main streams.c
iliaa Thu Aug 28 15:18:58 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/ftpphp_ftp.c /php-src/ext/imap php_imap.c /php-src/ext/mysql php_mysql.c /php-src/main streams.c Log: MFH: Compiler warning fixes. Index: php-src/ext/ftp/php_ftp.c diff -u php-src/ext/ftp/php_ftp.c:1.74.2.11 php-src/ext/ftp/php_ftp.c:1.74.2.12 --- php-src/ext/ftp/php_ftp.c:1.74.2.11 Thu Aug 7 12:03:05 2003 +++ php-src/ext/ftp/php_ftp.c Thu Aug 28 15:18:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_ftp.c,v 1.74.2.11 2003/08/07 16:03:05 zeev Exp $ */ +/* $Id: php_ftp.c,v 1.74.2.12 2003/08/28 19:18:55 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1161,7 +1161,7 @@ RETURN_TRUE; break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option); RETURN_FALSE; break; } @@ -1190,7 +1190,7 @@ RETURN_BOOL(ftp->autoseek); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option); RETURN_FALSE; break; } Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.142.2.18 php-src/ext/imap/php_imap.c:1.142.2.19 --- php-src/ext/imap/php_imap.c:1.142.2.18 Tue Jun 17 10:13:25 2003 +++ php-src/ext/imap/php_imap.c Thu Aug 28 15:18:55 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_imap.c,v 1.142.2.18 2003/06/17 14:13:25 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.19 2003/08/28 19:18:55 iliaa Exp $ */ #define IMAP41 @@ -632,7 +632,7 @@ if (EG(error_reporting) & E_NOTICE) { ecur = IMAPG(imap_errorstack); while (ecur != NIL) { - php_error(E_NOTICE, "%s(): %s (errflg=%d)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg); + php_error(E_NOTICE, "%s(): %s (errflg=%ld)", get_active_function_name(TSRMLS_C), ecur->LTEXT, ecur->errflg); ecur = ecur->next; } } Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.174.2.21 php-src/ext/mysql/php_mysql.c:1.174.2.22 --- php-src/ext/mysql/php_mysql.c:1.174.2.21Fri Aug 8 09:36:44 2003 +++ php-src/ext/mysql/php_mysql.c Thu Aug 28 15:18:56 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.174.2.21 2003/08/08 13:36:44 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.174.2.22 2003/08/28 19:18:56 iliaa Exp $ */ /* TODO: * @@ -652,12 +652,12 @@ list_entry new_le; if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MySG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links)); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } if (MySG(max_persistent)!=-1 && MySG(num_persistent)>=MySG(max_persistent)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%d)", MySG(num_persistent)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%ld)", MySG(num_persistent)); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } @@ -762,7 +762,7 @@ } } if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MySG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links)); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } @@ -1772,7 +1772,7 @@ convert_to_long_ex(row); if (Z_LVAL_PP(row)<0 || Z_LVAL_PP(row)>=(int)mysql_num_rows(mysql_result)) { -
[PHP-CVS] cvs: php-src /ext/ftp php_ftp.c /ext/imap php_imap.c /ext/mysql php_mysql.c /main/streams cast.c
iliaa Thu Aug 28 15:17:36 2003 EDT Modified files: /php-src/main/streams cast.c /php-src/ext/ftpphp_ftp.c /php-src/ext/imap php_imap.c /php-src/ext/mysql php_mysql.c Log: Fixed compiler warnings. Index: php-src/main/streams/cast.c diff -u php-src/main/streams/cast.c:1.8 php-src/main/streams/cast.c:1.9 --- php-src/main/streams/cast.c:1.8 Sat Jun 28 07:24:47 2003 +++ php-src/main/streams/cast.c Thu Aug 28 15:17:31 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: cast.c,v 1.8 2003/06/28 11:24:47 wez Exp $ */ +/* $Id: cast.c,v 1.9 2003/08/28 19:17:31 iliaa Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -266,7 +266,7 @@ * know that they should try something else */ php_error_docref(NULL TSRMLS_CC, E_WARNING, - "%d bytes of buffered data lost during stream conversion!", + "%ld bytes of buffered data lost during stream conversion!", stream->writepos - stream->readpos); } Index: php-src/ext/ftp/php_ftp.c diff -u php-src/ext/ftp/php_ftp.c:1.93 php-src/ext/ftp/php_ftp.c:1.94 --- php-src/ext/ftp/php_ftp.c:1.93 Thu Aug 7 12:03:17 2003 +++ php-src/ext/ftp/php_ftp.c Thu Aug 28 15:17:32 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_ftp.c,v 1.93 2003/08/07 16:03:17 zeev Exp $ */ +/* $Id: php_ftp.c,v 1.94 2003/08/28 19:17:32 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1167,7 +1167,7 @@ RETURN_TRUE; break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option); RETURN_FALSE; break; } @@ -1196,7 +1196,7 @@ RETURN_BOOL(ftp->autoseek); break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%d'", option); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown option '%ld'", option); RETURN_FALSE; break; } Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.174 php-src/ext/imap/php_imap.c:1.175 --- php-src/ext/imap/php_imap.c:1.174 Mon Aug 11 20:55:57 2003 +++ php-src/ext/imap/php_imap.c Thu Aug 28 15:17:33 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_imap.c,v 1.174 2003/08/12 00:55:57 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.175 2003/08/28 19:17:33 iliaa Exp $ */ #define IMAP41 @@ -646,7 +646,7 @@ if (EG(error_reporting) & E_NOTICE) { ecur = IMAPG(imap_errorstack); while (ecur != NIL) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s (errflg=%d)", ecur->LTEXT, ecur->errflg); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s (errflg=%ld)", ecur->LTEXT, ecur->errflg); ecur = ecur->next; } } Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.198 php-src/ext/mysql/php_mysql.c:1.199 --- php-src/ext/mysql/php_mysql.c:1.198 Mon Aug 11 20:55:56 2003 +++ php-src/ext/mysql/php_mysql.c Thu Aug 28 15:17:34 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.198 2003/08/12 00:55:56 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.199 2003/08/28 19:17:34 iliaa Exp $ */ /* TODO: * @@ -652,12 +652,12 @@ list_entry new_le; if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", MySG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links)); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } if (MySG(max_persistent)!=-1 && MySG(num_persistent)>=MySG(max_persistent)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%d)", MySG(num_persistent)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open persistent links (%ld)", MySG(num_persistent));
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dba dba.c
iliaa Thu Aug 28 13:56:52 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/dbadba.c Log: MFH: Fixed format error. Index: php-src/ext/dba/dba.c diff -u php-src/ext/dba/dba.c:1.61.2.21 php-src/ext/dba/dba.c:1.61.2.22 --- php-src/ext/dba/dba.c:1.61.2.21 Tue Jul 29 14:26:59 2003 +++ php-src/ext/dba/dba.c Thu Aug 28 13:56:51 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.61.2.21 2003/07/29 18:26:59 iliaa Exp $ */ +/* $Id: dba.c,v 1.61.2.22 2003/08/28 17:56:51 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -674,7 +674,7 @@ if (*pmode=='t') { pmode++; if (!lock_flag) { - php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)", hptr->name); + php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)"); FREENOW; RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dba dba.c
iliaa Thu Aug 28 13:56:42 2003 EDT Modified files: /php-src/ext/dbadba.c Log: Fixed format error. Index: php-src/ext/dba/dba.c diff -u php-src/ext/dba/dba.c:1.99 php-src/ext/dba/dba.c:1.100 --- php-src/ext/dba/dba.c:1.99 Sun Aug 17 13:14:11 2003 +++ php-src/ext/dba/dba.c Thu Aug 28 13:56:41 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.99 2003/08/17 17:14:11 helly Exp $ */ +/* $Id: dba.c,v 1.100 2003/08/28 17:56:41 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -676,7 +676,7 @@ if (*pmode=='t') { pmode++; if (!lock_flag) { - php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)", hptr->name); + php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "You cannot combine modifiers - (no lock) and t (test lock)"); FREENOW; RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/pgsql pgsql.c
iliaa Thu Aug 28 13:54:04 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/pgsql pgsql.c Log: Fixed format errors & warning. Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.244.2.23 php-src/ext/pgsql/pgsql.c:1.244.2.24 --- php-src/ext/pgsql/pgsql.c:1.244.2.23Wed Aug 27 20:33:48 2003 +++ php-src/ext/pgsql/pgsql.c Thu Aug 28 13:54:03 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.244.2.23 2003/08/28 00:33:48 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.244.2.24 2003/08/28 17:54:03 iliaa Exp $ */ #include @@ -540,12 +540,12 @@ if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Cannot create new link. Too many open links (%d).", PGG(num_links)); +"Cannot create new link. Too many open links (%ld).", PGG(num_links)); goto err; } if (PGG(max_persistent)!=-1 && PGG(num_persistent)>=PGG(max_persistent)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, -"Cannot create new link. Too many open persistent links (%d).", PGG(num_persistent)); +"Cannot create new link. Too many open persistent links (%ld).", PGG(num_persistent)); goto err; } @@ -633,7 +633,7 @@ } } if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%d).", PGG(num_links)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create new link. Too many open links (%ld).", PGG(num_links)); goto err; } if (connstring) { @@ -1254,7 +1254,7 @@ convert_to_long_ex(row); pgsql_row = Z_LVAL_PP(row); if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d.", Z_LVAL_PP(row), Z_LVAL_PP(result)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on PostgreSQL result index %ld.", Z_LVAL_PP(row), Z_LVAL_PP(result)); RETURN_FALSE; } } @@ -1337,7 +1337,7 @@ pgsql_row = Z_LVAL_PP(row); pg_result->row = pgsql_row; if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d.", Z_LVAL_PP(row), Z_LVAL_PP(result)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on PostgreSQL result index %ld.", Z_LVAL_PP(row), Z_LVAL_PP(result)); RETURN_FALSE; } } else { @@ -1510,7 +1510,7 @@ convert_to_long_ex(row); pgsql_row = Z_LVAL_PP(row); if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d.", Z_LVAL_PP(row), Z_LVAL_PP(result)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on PostgreSQL result index %ld.", Z_LVAL_PP(row), Z_LVAL_PP(result)); RETURN_FALSE; } } @@ -2026,11 +2026,11 @@ if (argc > 2) { convert_to_long_ex(z_len); if (Z_LVAL_PP(z_len) > Z_STRLEN_PP(str)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %d.", Z_LVAL_PP(str), Z_LVAL_PP(z_len)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %ld. Tried to write %ld.", Z_LVAL_PP(str), Z_LVAL_PP(z_len)); RETURN_FALSE; } if (Z_LVAL_PP(z_len) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %d was specified.", Z_LVAL_PP(str), Z_LVAL_PP(z_len)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %ld was specified.", Z_LVAL_PP(z_len));
[PHP-CVS] cvs: php-src(PHP_4_3) /sapi/apache php_apache.c
iliaa Thu Aug 28 13:49:09 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/apachephp_apache.c Log: MFH: Fixed format bug Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.69.2.3 php-src/sapi/apache/php_apache.c:1.69.2.4 --- php-src/sapi/apache/php_apache.c:1.69.2.3 Fri Jan 3 16:32:24 2003 +++ php-src/sapi/apache/php_apache.cThu Aug 28 13:49:08 2003 @@ -17,7 +17,7 @@ | David Sklar <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_apache.c,v 1.69.2.3 2003/01/03 21:32:24 derick Exp $ */ +/* $Id: php_apache.c,v 1.69.2.4 2003/08/28 17:49:08 iliaa Exp $ */ #include "php_apache_http.h" @@ -415,7 +415,7 @@ convert_to_string_ex(filename); if(!(rr = sub_req_lookup_uri((*filename)->value.str.val, ((request_rec *) SG(server_context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "URI lookup failed", (*filename)->value.str.val); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "URI lookup failed '%s'", (*filename)->value.str.val); RETURN_FALSE; } object_init(return_value); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache php_apache.c
iliaa Thu Aug 28 13:48:58 2003 EDT Modified files: /php-src/sapi/apachephp_apache.c Log: Fixed format bug Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.81 php-src/sapi/apache/php_apache.c:1.82 --- php-src/sapi/apache/php_apache.c:1.81 Tue Jun 10 16:03:44 2003 +++ php-src/sapi/apache/php_apache.cThu Aug 28 13:48:58 2003 @@ -17,7 +17,7 @@ | David Sklar <[EMAIL PROTECTED]> | +--+ */ -/* $Id: php_apache.c,v 1.81 2003/06/10 20:03:44 imajes Exp $ */ +/* $Id: php_apache.c,v 1.82 2003/08/28 17:48:58 iliaa Exp $ */ #include "php_apache_http.h" @@ -416,7 +416,7 @@ convert_to_string_ex(filename); if(!(rr = sub_req_lookup_uri((*filename)->value.str.val, ((request_rec *) SG(server_context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "URI lookup failed", (*filename)->value.str.val); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "URI lookup failed '%s'", (*filename)->value.str.val); RETURN_FALSE; } object_init(return_value); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session session.c
sas Thu Aug 28 13:34:34 2003 EDT Modified files: /php-src/ext/sessionsession.c Log: format string fix Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.372 php-src/ext/session/session.c:1.373 --- php-src/ext/session/session.c:1.372 Mon Aug 25 22:03:41 2003 +++ php-src/ext/session/session.c Thu Aug 28 13:34:33 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.372 2003/08/26 02:03:41 sniper Exp $ */ +/* $Id: session.c,v 1.373 2003/08/28 17:34:33 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -732,7 +732,7 @@ break; case HASH_KEY_IS_LONG: php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The session bug compatibility code will not " - "try to locate the global variable $%d due to its " + "try to locate the global variable $%lu due to its " "numeric nature.", num_key); break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/session session.c
sas Thu Aug 28 13:34:31 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sessionsession.c Log: format string fix Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.336.2.25 php-src/ext/session/session.c:1.336.2.26 --- php-src/ext/session/session.c:1.336.2.25Mon Aug 25 22:16:23 2003 +++ php-src/ext/session/session.c Thu Aug 28 13:34:30 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.336.2.25 2003/08/26 02:16:23 sniper Exp $ */ +/* $Id: session.c,v 1.336.2.26 2003/08/28 17:34:30 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -633,7 +633,7 @@ break; case HASH_KEY_IS_LONG: php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The session bug compatibility code will not " - "try to locate the global variable $%d due to its " + "try to locate the global variable $%lu due to its " "numeric nature.", num_key); break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /win32 php_modules.dsw
sniper Thu Aug 28 13:25:35 2003 EDT Modified files: /php-src/win32 php_modules.dsw Log: - added mcve to the modules workspace Index: php-src/win32/php_modules.dsw diff -u php-src/win32/php_modules.dsw:1.57 php-src/win32/php_modules.dsw:1.58 --- php-src/win32/php_modules.dsw:1.57 Thu Jun 26 10:57:48 2003 +++ php-src/win32/php_modules.dsw Thu Aug 28 13:25:34 2003 @@ -279,6 +279,18 @@ ### +Project: "mcve"=..\ext\mcve\mcve.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +### + Project: "mhash"=..\ext\mhash\mhash.dsp - Package Owner=<4> Package=<5> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/pcre php_pcre.c
sas Thu Aug 28 13:16:02 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/pcre php_pcre.c Log: fix error message Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.132.2.8 php-src/ext/pcre/php_pcre.c:1.132.2.9 --- php-src/ext/pcre/php_pcre.c:1.132.2.8 Sat Jun 28 20:08:29 2003 +++ php-src/ext/pcre/php_pcre.c Thu Aug 28 13:16:01 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.132.2.8 2003/06/29 00:08:29 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.132.2.9 2003/08/28 17:16:01 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -753,7 +753,7 @@ /* Run the code */ if (zend_eval_string(code.c, &retval, compiled_string_description TSRMLS_CC) == FAILURE) { efree(compiled_string_description); - zend_error(E_ERROR, "Failed evaluating code:\n%s", code); + zend_error(E_ERROR, "Failed evaluating code:\n%s", code.c); /* zend_error() does not return in this case */ } efree(compiled_string_description); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve config.m4
rasmus Thu Aug 28 13:14:29 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mcve config.m4 Log: Fix the build The DOS line endings in this file caused buildconf to build a broken configure script on fbsd Index: php-src/ext/mcve/config.m4 diff -u php-src/ext/mcve/config.m4:1.2.4.1 php-src/ext/mcve/config.m4:1.2.4.2 --- php-src/ext/mcve/config.m4:1.2.4.1 Thu Aug 28 10:34:15 2003 +++ php-src/ext/mcve/config.m4 Thu Aug 28 13:14:28 2003 @@ -1,26 +1,26 @@ -dnl config.m4 for PHP4 MCVE Extension - -PHP_ARG_WITH(mcve, for MCVE support, -[ --with-mcve[=DIR] Include MCVE support]) - -if test "$PHP_MCVE" != "no"; then - if test -r $PHP_MCVE/include/mcve.h; then - MCVE_DIR=$PHP_MCVE - else -for i in /usr /usr/local /usr/local/mcve ; do - if test -r $i/include/mcve.h; then -MCVE_DIR=$i - fi -done - fi - - if test -z "$MCVE_DIR"; then -AC_MSG_ERROR(not found. Please check your MCVE installation; mcve.h NOT FOUND) - fi - - PHP_ADD_INCLUDE($MCVE_DIR/include) - PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) - PHP_NEW_EXTENSION(mcve, mcve.c, $ext_shared) - PHP_SUBST(MCVE_SHARED_LIBADD) - AC_DEFINE(HAVE_MCVE, 1, [ ]) -fi +dnl config.m4 for PHP4 MCVE Extension + +PHP_ARG_WITH(mcve, for MCVE support, +[ --with-mcve[=DIR] Include MCVE support]) + +if test "$PHP_MCVE" != "no"; then + if test -r $PHP_MCVE/include/mcve.h; then + MCVE_DIR=$PHP_MCVE + else +for i in /usr /usr/local /usr/local/mcve ; do + if test -r $i/include/mcve.h; then +MCVE_DIR=$i + fi +done + fi + + if test -z "$MCVE_DIR"; then +AC_MSG_ERROR(not found. Please check your MCVE installation; mcve.h NOT FOUND) + fi + + PHP_ADD_INCLUDE($MCVE_DIR/include) + PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD) + PHP_NEW_EXTENSION(mcve, mcve.c, $ext_shared) + PHP_SUBST(MCVE_SHARED_LIBADD) + AC_DEFINE(HAVE_MCVE, 1, [ ]) +fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c
sas Thu Aug 28 13:09:45 2003 EDT Modified files: /php-src/ext/pcre php_pcre.c Log: Fix error message Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.143 php-src/ext/pcre/php_pcre.c:1.144 --- php-src/ext/pcre/php_pcre.c:1.143 Sat Jun 28 20:09:41 2003 +++ php-src/ext/pcre/php_pcre.c Thu Aug 28 13:09:44 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.143 2003/06/29 00:09:41 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.144 2003/08/28 17:09:44 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -751,7 +751,7 @@ /* Run the code */ if (zend_eval_string(code.c, &retval, compiled_string_description TSRMLS_CC) == FAILURE) { efree(compiled_string_description); - php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code:\n%s", code); + php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code:\n%s", code.c); /* zend_error() does not return in this case */ } efree(compiled_string_description); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main SAPI.c main.c /main/streams streams.c
sas Thu Aug 28 13:07:42 2003 EDT Modified files: /php-src/main SAPI.c main.c /php-src/main/streams streams.c Log: kill warnings Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.176 php-src/main/SAPI.c:1.177 --- php-src/main/SAPI.c:1.176 Mon Aug 11 15:36:26 2003 +++ php-src/main/SAPI.c Thu Aug 28 13:07:40 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.176 2003/08/11 19:36:26 helly Exp $ */ +/* $Id: SAPI.c,v 1.177 2003/08/28 17:07:40 sas Exp $ */ #include #include @@ -186,7 +186,7 @@ int allocated_bytes=SAPI_POST_BLOCK_SIZE+1; if (SG(request_info).content_length > SG(post_max_size)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %d bytes exceeds the limit of %d bytes", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); return; } @@ -199,7 +199,7 @@ } SG(read_post_bytes) += read_bytes; if (SG(read_post_bytes) > SG(post_max_size)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %d bytes", SG(post_max_size)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %ld bytes", SG(post_max_size)); return; } if (read_bytes < SAPI_POST_BLOCK_SIZE) { Index: php-src/main/main.c diff -u php-src/main/main.c:1.569 php-src/main/main.c:1.570 --- php-src/main/main.c:1.569 Mon Aug 25 16:51:40 2003 +++ php-src/main/main.c Thu Aug 28 13:07:40 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.569 2003/08/25 20:51:40 helly Exp $ */ +/* $Id: main.c,v 1.570 2003/08/28 17:07:40 sas Exp $ */ /* {{{ includes */ @@ -519,7 +519,7 @@ docref = get_active_function_name(TSRMLS_C); if (!docref) docref = "Unknown"; - php_error(type, "%s(%s): %s", class_name, space, docref, params, buffer); + php_error(type, "%s%s%s(%s): %s ", class_name, space, docref, params, buffer); } if (PG(track_errors) && EG(active_symbol_table)) { Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.32 php-src/main/streams/streams.c:1.33 --- php-src/main/streams/streams.c:1.32 Tue Jul 29 14:26:34 2003 +++ php-src/main/streams/streams.c Thu Aug 28 13:07:40 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: streams.c,v 1.32 2003/07/29 18:26:34 iliaa Exp $ */ +/* $Id: streams.c,v 1.33 2003/08/28 17:07:40 sas Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1505,8 +1505,8 @@ php_stream *stream = NULL; php_stream_wrapper *wrapper = NULL; char *path_to_open; - int persistent = options & STREAM_OPEN_PERSISTENT; #if ZEND_DEBUG + int persistent = options & STREAM_OPEN_PERSISTENT; char *copy_of_path = NULL; #endif @@ -1574,7 +1574,7 @@ char *tmp = estrdup(path); php_strip_url_passwd(tmp); php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, "could not make seekable - %s", - tmp, strerror(errno)); + tmp); efree(tmp); options ^= REPORT_ERRORS; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard assert.c file.c filters.c fsock.c math.c proc_open.c scanf.c
sas Thu Aug 28 12:49:58 2003 EDT Modified files: /php-src/ext/standard assert.c file.c filters.c fsock.c math.c proc_open.c scanf.c Log: fix format strings Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.57 php-src/ext/standard/assert.c:1.58 --- php-src/ext/standard/assert.c:1.57 Wed Aug 13 20:37:42 2003 +++ php-src/ext/standard/assert.c Thu Aug 28 12:49:57 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.57 2003/08/14 00:37:42 iliaa Exp $ */ +/* $Id: assert.c,v 1.58 2003/08/28 16:49:57 sas Exp $ */ /* {{{ includes/startup/misc */ @@ -276,7 +276,7 @@ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %d", Z_LVAL_PP(what)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %ld", Z_LVAL_PP(what)); break; } Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.355 php-src/ext/standard/file.c:1.356 --- php-src/ext/standard/file.c:1.355 Mon Aug 11 19:16:53 2003 +++ php-src/ext/standard/file.c Thu Aug 28 12:49:57 2003 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.355 2003/08/11 23:16:53 iliaa Exp $ */ +/* $Id: file.c,v 1.356 2003/08/28 16:49:57 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -547,7 +547,7 @@ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The 2nd parameter should be either a string or an array.", flags); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The 2nd parameter should be either a string or an array."); numbytes = -1; break; @@ -588,7 +588,7 @@ return; } if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%d' flag is not supported.", flags); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%ld' flag is not supported.", flags); RETURN_FALSE; } Index: php-src/ext/standard/filters.c diff -u php-src/ext/standard/filters.c:1.35 php-src/ext/standard/filters.c:1.36 --- php-src/ext/standard/filters.c:1.35 Thu Aug 28 12:28:33 2003 +++ php-src/ext/standard/filters.c Thu Aug 28 12:49:57 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: filters.c,v 1.35 2003/08/28 16:28:33 sas Exp $ */ +/* $Id: filters.c,v 1.36 2003/08/28 16:49:57 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -1500,15 +1500,15 @@ switch (err) { case PHP_CONV_ERR_UNKNOWN: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername, err); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername); goto out_failure; case PHP_CONV_ERR_INVALID_SEQ: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid base64 sequence", inst->filtername, err); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid base64 sequence", inst->filtername); goto out_failure; case PHP_CONV_ERR_UNEXPECTED_EOS: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unexpected end of stream", inst->filtername, err); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unexpected end of stream", inst->filtername); goto out_failure; default: @@ -1573,15 +1573,15 @@ switch (err) { case PHP_CONV_ERR_UNKNOWN: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername, err); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): unknown error", inst->filtername); goto out_failure; case PHP_CONV_ERR_INVALID_SEQ: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "stre
[PHP-CVS] cvs: php-src /main php.h
sas Thu Aug 28 12:49:43 2003 EDT Modified files: /php-src/main php.h Log: add format attribute where appropiate Index: php-src/main/php.h diff -u php-src/main/php.h:1.195 php-src/main/php.h:1.196 --- php-src/main/php.h:1.195Thu Aug 28 10:53:36 2003 +++ php-src/main/php.h Thu Aug 28 12:49:43 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.195 2003/08/28 14:53:36 sas Exp $ */ +/* $Id: php.h,v 1.196 2003/08/28 16:49:43 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -228,12 +228,7 @@ #define PHP_GCC_VERSION ZEND_GCC_VERSION #define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC - -#if PHP_GCC_VERSION >= 2007 -# define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) -#else -# define PHP_ATTRIBUTE_FORMAT(type, idx, first) -#endif +#define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF #include "snprintf.h" @@ -284,9 +279,10 @@ BEGIN_EXTERN_C(); void phperror(char *error); PHPAPI int php_write(void *buf, uint size TSRMLS_DC); -PHPAPI int php_printf(const char *format, ...); +PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, + 2); PHPAPI void php_log_err(char *log_message TSRMLS_DC); -int Debug(char *format, ...); +int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C(); @@ -301,12 +297,21 @@ BEGIN_EXTERN_C(); PHPAPI void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC); -PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) ; +PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); + +#ifdef ZTS +#define PHP_ATTR_FMT_OFFSET 1 +#else +#define PHP_ATTR_FMT_OFFSET 0 +#endif /* PHPAPI void php_error(int type, const char *format, ...); */ -PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...); -PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...); -PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...); +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); +PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); +PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); END_EXTERN_C(); #define php_error_docref php_error_docref0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c
abies Thu Aug 28 12:48:23 2003 EDT Modified files: /php-src/ext/interbase interbase.c Log: Fixed some format strings Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.162 php-src/ext/interbase/interbase.c:1.163 --- php-src/ext/interbase/interbase.c:1.162 Wed Aug 27 20:11:16 2003 +++ php-src/ext/interbase/interbase.c Thu Aug 28 12:48:22 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.162 2003/08/28 00:11:16 abies Exp $ */ +/* $Id: interbase.c,v 1.163 2003/08/28 16:48:22 abies Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -704,7 +704,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Interbase Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.162 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.163 $"); #ifdef COMPILE_DL_INTERBASE php_info_print_table_row(2, "Dynamic Module", "Yes"); #endif @@ -887,12 +887,12 @@ list_entry new_le; if ((IBG(max_links) != -1) && (IBG(num_links) >= IBG(max_links))) { - _php_ibase_module_error("Too many open links (%d)" TSRMLS_CC, IBG(num_links)); + _php_ibase_module_error("Too many open links (%ld)" TSRMLS_CC, IBG(num_links)); efree(hashed_details); RETURN_FALSE; } if ((IBG(max_persistent) != -1) && (IBG(num_persistent) >= IBG(max_persistent))) { - _php_ibase_module_error("Too many open persistent links (%d)" TSRMLS_CC, IBG(num_persistent)); + _php_ibase_module_error("Too many open persistent links (%ld)" TSRMLS_CC, IBG(num_persistent)); efree(hashed_details); RETURN_FALSE; } @@ -953,7 +953,7 @@ } } if ((IBG(max_links) != -1) && (IBG(num_links) >= IBG(max_links))) { - _php_ibase_module_error("Too many open links (%d)" TSRMLS_CC, IBG(num_links)); + _php_ibase_module_error("Too many open links (%ld)" TSRMLS_CC, IBG(num_links)); efree(hashed_details); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c php_odbc_includes.h
sniper Thu Aug 28 12:35:33 2003 EDT Modified files: /php-src/ext/odbc php_odbc.c php_odbc_includes.h Log: Revert the patch per Dan\´s request Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.173 php-src/ext/odbc/php_odbc.c:1.174 --- php-src/ext/odbc/php_odbc.c:1.173 Thu Aug 28 05:55:11 2003 +++ php-src/ext/odbc/php_odbc.c Thu Aug 28 12:35:32 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.173 2003/08/28 09:55:11 sniper Exp $ */ +/* $Id: php_odbc.c,v 1.174 2003/08/28 16:35:32 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -460,7 +460,6 @@ REGISTER_LONG_CONSTANT("SQL_CHAR", SQL_CHAR, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("SQL_VARCHAR", SQL_VARCHAR, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("SQL_LONGVARCHAR", SQL_LONGVARCHAR, CONST_PERSISTENT | CONST_CS); - REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_LONGVARBINARY, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("SQL_DECIMAL", SQL_DECIMAL, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("SQL_NUMERIC", SQL_NUMERIC, CONST_PERSISTENT | CONST_CS); REGISTER_LONG_CONSTANT("SQL_BIT", SQL_BIT, CONST_PERSISTENT | CONST_CS); @@ -654,7 +653,6 @@ case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: - case SQL_BLOB: case SQL_LONGVARCHAR: result->values[i].value = NULL; break; @@ -669,7 +667,7 @@ default: rc = SQLColAttributes(result->stmt, (UWORD)(i+1), SQL_COLUMN_DISPLAY_SIZE, NULL, 0, NULL, &displaysize); - displaysize = displaysize <= result->longreadlen ? displaysize : + displaysize = displaysize <= result->longreadlen ? displaysize : result->longreadlen; result->values[i].value = (char *)emalloc(displaysize + 1); rc = SQLBindCol(result->stmt, (UWORD)(i+1), SQL_C_CHAR, result->values[i].value, @@ -1419,19 +1417,7 @@ Z_STRVAL_P(tmp) = empty_string; break; } - - if (result->binmode == 1) { - sql_c_type = SQL_C_BINARY; - } - case SQL_BLOB: - if (result->binmode <= 0) { - Z_STRVAL_P(tmp) = empty_string; - break; - } - - if (result->binmode == 1) { - sql_c_type = SQL_C_BINARY; - } + if (result->binmode == 1) sql_c_type = SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { Z_STRVAL_P(tmp) = empty_string; @@ -1590,19 +1576,7 @@ Z_STRVAL_P(tmp) = empty_string; break; } - - if (result->binmode == 1) { - sql_c_type = SQL_C_BINARY; - } - case SQL_BLOB: - if (result->binmode <= 0) { - Z_STRVAL_P(tmp) = empty_string; - break; - } - - if (result->binmode == 1) { - sql_c_type = SQL_C_BINARY; - } + if (result->binmode == 1) sql_c_type = SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { Z_STRVAL_P(tmp) = empty_string; @@ -1820,15 +1794,8 @@ case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: - if (result->binmode <= 1) - sql_c_type = SQL_C_BINARY; - if (result->binmode <= 0) - break; - case SQL_BLOB: - if (result->binmode <= 1) -
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/sybase_ct php_sybase_ct.c
sniper Thu Aug 28 12:31:52 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sybase_ct php_sybase_ct.c Log: sync with HEAD Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.6 php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.7 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.6 Thu Aug 28 12:28:27 2003 +++ php-src/ext/sybase_ct/php_sybase_ct.c Thu Aug 28 12:31:51 2003 @@ -4,10 +4,10 @@ +--+ | Copyright (c) 1997-2003 The PHP Group| +--+ - | This source file is subject to version 2.02 of the PHP license, | + | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.73.2.6 2003/08/28 16:28:27 sniper Exp $ */ +/* $Id: php_sybase_ct.c,v 1.73.2.7 2003/08/28 16:31:51 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -505,92 +505,92 @@ strcpy(hashed_details, "sybase_"); break; case 1: { - zval *yyhost; + zval **yyhost; - if (getParameters(ht, 1, &yyhost)==FAILURE) { + if (zend_get_parameters_ex(1, &yyhost) == FAILURE) { RETURN_FALSE; } - convert_to_string(yyhost); - host = Z_STRVAL_P(yyhost); + convert_to_string_ex(yyhost); + host = Z_STRVAL_PP(yyhost); user=passwd=charset=appname=NULL; - hashed_details_length = Z_STRLEN_P(yyhost)+6+5; + hashed_details_length = Z_STRLEN_PP(yyhost)+6+5; hashed_details = (char *) emalloc(hashed_details_length+1); - sprintf(hashed_details, "sybase_%s", Z_STRVAL_P(yyhost)); + sprintf(hashed_details, "sybase_%s", Z_STRVAL_PP(yyhost)); } break; case 2: { - zval *yyhost, *yyuser; + zval **yyhost, **yyuser; - if (getParameters(ht, 2, &yyhost, &yyuser)==FAILURE) { + if (zend_get_parameters_ex(2, &yyhost, &yyuser) == FAILURE) { RETURN_FALSE; } - convert_to_string(yyhost); - convert_to_string(yyuser); - host = Z_STRVAL_P(yyhost); - user = Z_STRVAL_P(yyuser); + convert_to_string_ex(yyhost); + convert_to_string_ex(yyuser); + host = Z_STRVAL_PP(yyhost); + user = Z_STRVAL_PP(yyuser); passwd=charset=appname=NULL; - hashed_details_length = Z_STRLEN_P(yyhost)+Z_STRLEN_P(yyuser)+6+5; + hashed_details_length = Z_STRLEN_PP(yyhost)+Z_STRLEN_PP(yyuser)+6+5; hashed_details = (char *) emalloc(hashed_details_length+1); - sprintf(hashed_details, "sybase_%s_%s___", Z_STRVAL_P(yyhost), Z_STRVAL_P(yyuser)); + sprintf(hashed_details, "sybase_%s_%s___", Z_STRVAL_PP(yyhost), Z_STRVAL_PP(yyuser)); } break; case 3: { - zval *yyhost, *yyuser, *yypasswd; + zval **yyhost, **yyuser, **yypasswd; - if (getParameters(ht, 3, &yyhost, &yyuser, &yypasswd) == FAILURE) { + if (zend_get_parameters_ex(3, &yyhost, &yyuser, &yypasswd) == FAILURE) {
[PHP-CVS] cvs: php-src /ext/standard exec.c filters.c fsock.c ftp_fopen_wrapper.c http_fopen_wrapper.c var.c
sas Thu Aug 28 12:28:34 2003 EDT Modified files: /php-src/ext/standard exec.c filters.c fsock.c ftp_fopen_wrapper.c http_fopen_wrapper.c var.c Log: kill warnings Index: php-src/ext/standard/exec.c diff -u php-src/ext/standard/exec.c:1.103 php-src/ext/standard/exec.c:1.104 --- php-src/ext/standard/exec.c:1.103 Mon Aug 11 19:16:53 2003 +++ php-src/ext/standard/exec.c Thu Aug 28 12:28:33 2003 @@ -16,7 +16,7 @@ | Ilia Alshanetsky <[EMAIL PROTECTED]> | +--+ */ -/* $Id: exec.c,v 1.103 2003/08/11 23:16:53 iliaa Exp $ */ +/* $Id: exec.c,v 1.104 2003/08/28 16:28:33 sas Exp $ */ #include #include "php.h" @@ -79,7 +79,7 @@ goto err; } b = strrchr(cmd, PHP_DIR_SEPARATOR); - spprintf(&d, 0, "%s%s%s%s", PG(safe_mode_exec_dir), (b ? "" : "/"), (b ? b : cmd), (c ? " " : ""), (c ? c : "")); + spprintf(&d, 0, "%s%s%s%s%s", PG(safe_mode_exec_dir), (b ? "" : "/"), (b ? b : cmd), (c ? " " : ""), (c ? c : "")); if (c) { *(c - 1) = ' '; } Index: php-src/ext/standard/filters.c diff -u php-src/ext/standard/filters.c:1.34 php-src/ext/standard/filters.c:1.35 --- php-src/ext/standard/filters.c:1.34 Tue Jun 10 16:03:37 2003 +++ php-src/ext/standard/filters.c Thu Aug 28 12:28:33 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: filters.c,v 1.34 2003/06/10 20:03:37 imajes Exp $ */ +/* $Id: filters.c,v 1.35 2003/08/28 16:28:33 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -1181,6 +1181,7 @@ return PHP_CONV_ERR_SUCCESS; } +#if IT_WAS_USED static php_conv_err_t php_conv_get_long_prop_ex(const HashTable *ht, long *pretval, char *field_name, size_t field_name_len) { zval **tmpval; @@ -1202,6 +1203,7 @@ } return PHP_CONV_ERR_SUCCESS; } +#endif static php_conv_err_t php_conv_get_ulong_prop_ex(const HashTable *ht, unsigned long *pretval, char *field_name, size_t field_name_len) { @@ -1252,6 +1254,7 @@ } +#if IT_WAS_USED static int php_conv_get_int_prop_ex(const HashTable *ht, int *pretval, char *field_name, size_t field_name_len) { long l; @@ -1264,6 +1267,7 @@ } return err; } +#endif static int php_conv_get_uint_prop_ex(const HashTable *ht, unsigned int *pretval, char *field_name, size_t field_name_len) { @@ -1661,7 +1665,7 @@ php_stream_filter *retval = NULL; char *dot; - int conv_mode; + int conv_mode = 0; if (filterparams != NULL && Z_TYPE_P(filterparams) != IS_ARRAY) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid filter parameter", filtername); Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.114 php-src/ext/standard/fsock.c:1.115 --- php-src/ext/standard/fsock.c:1.114 Thu Aug 28 11:16:20 2003 +++ php-src/ext/standard/fsock.cThu Aug 28 12:28:33 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.114 2003/08/28 15:16:20 sas Exp $ */ +/* $Id: fsock.c,v 1.115 2003/08/28 16:28:33 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -56,7 +56,7 @@ } if (port > 0) { - hostname_len = spprintf(&hostname, 0, "%s:%d", host, port); + hostname_len = spprintf(&hostname, 0, "%s:%ld", host, port); } else { hostname_len = host_len; hostname = host; Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.61 php-src/ext/standard/ftp_fopen_wrapper.c:1.62 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.61 Mon Aug 25 18:25:33 2003 +++ php-src/ext/standard/ftp_fopen_wrapper.cThu Aug 28 12:28:33 2003 @@ -18,7 +18,7 @@ | Sara Golemon <[EMAIL PROTECTED]> | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.61 2003/08/25 22:25:33 pollita Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.62 2003/08/28 16:28:33 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -477,7 +477,7 @@ php_stream_context_get_option(context, "ftp", "resume_pos", &tmpzval) == SUCCESS && Z_TYPE_PP(tmpzval) == IS_LONG && Z_LVAL_PP(tmpzval) > 0) { - snprintf(tmp_line, 511, "REST %u\r\n", Z_LVAL_PP(tmpzval)); + snprintf(tmp_line, 511, "REST %ld\r\n", Z_LVAL_PP(tmpzval)); php_stream_write_string(stream, tmp_line); result = GET_FTP_RESULT(stream); if (result < 300 |
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/sybase_ct php_sybase_ct.c
sniper Thu Aug 28 12:28:28 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sybase_ct php_sybase_ct.c Log: MFH: some emalloc() -> safe_emalloc() fixes Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.5 php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.6 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.5 Thu Aug 28 12:16:59 2003 +++ php-src/ext/sybase_ct/php_sybase_ct.c Thu Aug 28 12:28:27 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.73.2.5 2003/08/28 16:16:59 sniper Exp $ */ +/* $Id: php_sybase_ct.c,v 1.73.2.6 2003/08/28 16:28:27 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -1043,7 +1043,7 @@ result->data = (zval **) erealloc(result->data, sizeof(zval *)*SYBASE_ROWS_BLOCK*(++result->blocks_initialized)); } if (result->store || 1 == result->num_rows) { - result->data[i] = (zval *) emalloc(sizeof(zval)*result->num_fields); + result->data[i] = (zval *) safe_emalloc(sizeof(zval), result->num_fields, 0); } for (j=0; jnum_fields; j++) { @@ -1104,7 +1104,7 @@ } result = (sybase_result *) emalloc(sizeof(sybase_result)); - result->data = (zval **) emalloc(sizeof(zval *)*SYBASE_ROWS_BLOCK); + result->data = (zval **) safe_emalloc(sizeof(zval *), SYBASE_ROWS_BLOCK, 0); result->fields = NULL; result->sybase_ptr = sybase_ptr; result->cur_field=result->cur_row=result->num_rows=0; @@ -1112,12 +1112,12 @@ result->last_retcode = 0; result->store= store; result->blocks_initialized= 1; - result->tmp_buffer = (char **) emalloc(sizeof(char *)*num_fields); - result->lengths = (CS_INT *) emalloc(sizeof(CS_INT)*num_fields); - result->indicators = (CS_SMALLINT *) emalloc(sizeof(CS_INT)*num_fields); - result->datafmt = (CS_DATAFMT *) emalloc(sizeof(CS_DATAFMT)*num_fields); - result->numerics = (unsigned char *) emalloc(sizeof(unsigned char)*num_fields); - result->types = (CS_INT *) emalloc(sizeof(CS_INT)*num_fields); + result->tmp_buffer = (char **) safe_emalloc(sizeof(char *), num_fields, 0); + result->lengths = (CS_INT *) safe_emalloc(sizeof(CS_INT), num_fields, 0); + result->indicators = (CS_SMALLINT *) safe_emalloc(sizeof(CS_INT), num_fields, 0); + result->datafmt = (CS_DATAFMT *) safe_emalloc(sizeof(CS_DATAFMT), num_fields, 0); + result->numerics = (unsigned char *) safe_emalloc(sizeof(unsigned char), num_fields, 0); + result->types = (CS_INT *) safe_emalloc(sizeof(CS_INT), num_fields, 0); for (i=0; icmd, i+1, &result->datafmt[i]); @@ -1181,7 +1181,7 @@ ct_bind(sybase_ptr->cmd, i+1, &result->datafmt[i], result->tmp_buffer[i], &result->lengths[i], &result->indicators[i]); } - result->fields = (sybase_field *) emalloc(sizeof(sybase_field)*num_fields); + result->fields = (sybase_field *) safe_emalloc(sizeof(sybase_field), num_fields, 0); j=0; for (i=0; iactive_result_index= buffered ? id : 0; } @@ -2057,7 +2057,7 @@ WRONG_PARAM_COUNT; } - params = emalloc(sizeof(zval **) * argc); + params = safe_emalloc(sizeof(zval **), argc, 0); if (zend_get_parameters_array_ex(argc, params) == FAILURE) { efree(params); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sybase_ct php_sybase_ct.c
sniper Thu Aug 28 12:19:09 2003 EDT Modified files: /php-src/ext/sybase_ct php_sybase_ct.c Log: MFB Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.84 php-src/ext/sybase_ct/php_sybase_ct.c:1.85 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.84 Mon Aug 11 20:55:55 2003 +++ php-src/ext/sybase_ct/php_sybase_ct.c Thu Aug 28 12:19:08 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.84 2003/08/12 00:55:55 iliaa Exp $ */ +/* $Id: php_sybase_ct.c,v 1.85 2003/08/28 16:19:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -1384,8 +1384,21 @@ case CS_CURSOR_RESULT: case CS_PARAM_RESULT: case CS_ROW_RESULT: - /* Unexpected results, cancel them. */ + if (status != Q_RESULT) { + result = php_sybase_fetch_result_set(sybase_ptr, buffered, store); + if (result == NULL) { + ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_ALL); + sybase_ptr->dead = 1; + RETURN_FALSE; + } + status = Q_RESULT; + } else { + /* Unexpected results, cancel them. */ + ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT); + } + break; case CS_STATUS_RESULT: + /* Unexpected results, cancel them. */ ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT); break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/sybase_ct php_sybase_ct.c
sniper Thu Aug 28 12:17:00 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/sybase_ct php_sybase_ct.c Log: - Fixed bug #23682 (sybase_query() and multiple result sets: not returning first row set) Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.4 php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.5 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.4 Sat Jan 11 18:50:59 2003 +++ php-src/ext/sybase_ct/php_sybase_ct.c Thu Aug 28 12:16:59 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.73.2.4 2003/01/11 23:50:59 iliaa Exp $ */ +/* $Id: php_sybase_ct.c,v 1.73.2.5 2003/08/28 16:16:59 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -1386,8 +1386,21 @@ case CS_CURSOR_RESULT: case CS_PARAM_RESULT: case CS_ROW_RESULT: - /* Unexpected results, cancel them. */ + if (status != Q_RESULT) { + result = php_sybase_fetch_result_set(sybase_ptr, buffered, store); + if (result == NULL) { + ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_ALL); + sybase_ptr->dead = 1; + RETURN_FALSE; + } + status = Q_RESULT; + } else { + /* Unexpected results, cancel them. */ + ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT); + } + break; case CS_STATUS_RESULT: + /* Unexpected results, cancel them. */ ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT); break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/zlib zlib.c
On 2003-08-28 14:46:03, Jani Taskinen wrote: > Please MFH this fix (and move the NEWS entry to PHP_4_3 branch NEWS) Ok, I committed it to PHP_4_3. I think it's the correct solution, but I hope, every browser which uses "deflate" thinks so, too (a little test with mozilla forced to deflate mode worked). Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
sr Thu Aug 28 12:07:03 2003 EDT Modified files: /php-srcNEWS Log: Remove NEWS entry because fix was committed to 4.3 branch. Index: php-src/NEWS diff -u php-src/NEWS:1.1462 php-src/NEWS:1.1463 --- php-src/NEWS:1.1462 Sun Aug 24 09:59:34 2003 +++ php-src/NEWSThu Aug 28 12:06:49 2003 @@ -44,7 +44,6 @@ - Fixed bug #19859 (allow fast_call_user_function to support __call). (Stanislav) - Fixed bug #17988 (strtotime failed to parse postgresql timestamp). (Derick) -- Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan) 29 Jun 2003, PHP 5 Beta 1 - Removed the bundled MySQL client library. (Sterling) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/zlib zlib.c
sr Thu Aug 28 12:05:18 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/zlib zlib.c Log: MFH: Fixed bug #25218 ("deflate" compressed pages had a gzip header, which should only be sent with "gzip" compressed pages). Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.363 php-src/NEWS:1.1247.2.364 --- php-src/NEWS:1.1247.2.363 Thu Aug 28 10:36:49 2003 +++ php-src/NEWSThu Aug 28 12:05:17 2003 @@ -7,6 +7,7 @@ - Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara) - Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) - Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia) +- Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan) 25 Aug 2003, Version 4.3.3 - Upgraded the bundled Expat library to version 1.95.6. (Jani) Index: php-src/ext/zlib/zlib.c diff -u php-src/ext/zlib/zlib.c:1.153.2.13 php-src/ext/zlib/zlib.c:1.153.2.14 --- php-src/ext/zlib/zlib.c:1.153.2.13 Sun Aug 10 21:57:10 2003 +++ php-src/ext/zlib/zlib.c Thu Aug 28 12:05:17 2003 @@ -18,7 +18,7 @@ | Jade Nicoletti <[EMAIL PROTECTED]> | +--+ */ -/* $Id: zlib.c,v 1.153.2.13 2003/08/11 01:57:10 sniper Exp $ */ +/* $Id: zlib.c,v 1.153.2.14 2003/08/28 16:05:17 sr Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -687,7 +687,7 @@ Bytef *buffer; uInt prev_outlen, outlen; int err; - int start_offset = (do_start?10:0); + int start_offset = ((do_start && ZLIBG(compression_coding) == CODING_GZIP) ? 10 : 0); int end_offset = (do_end?8:0); outlen = (uint)(sizeof(char) * (str_length * 1.001f + 12) + 1); /* leave some room for a trailing \0 */ @@ -764,14 +764,14 @@ ZLIBG(stream).next_in = (Bytef*) str; ZLIBG(stream).avail_in = (uInt) str_length; - if (ZLIBG(compression_coding) == 1) { + if (ZLIBG(compression_coding) == CODING_GZIP) { ZLIBG(crc) = crc32(ZLIBG(crc), (const Bytef *) str, str_length); } err = php_do_deflate(str_length, (Bytef **) newstr, new_length, do_start, do_end TSRMLS_CC); /* TODO: error handling (err may be Z_STREAM_ERROR, Z_BUF_ERROR, ?) */ - if (do_start) { + if (do_start && ZLIBG(compression_coding) == CODING_GZIP) { /* Write a very simple .gz header: */ (*newstr)[0] = gz_magic[0]; (*newstr)[1] = gz_magic[1]; @@ -781,7 +781,7 @@ *new_length += 10; } if (do_end) { - if (ZLIBG(compression_coding) == 1) { + if (ZLIBG(compression_coding) == CODING_GZIP) { char *trailer = (*newstr)+(*new_length); /* write crc & stream.total_in in LSB order */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main SAPI.c streams.c
sas Thu Aug 28 12:04:19 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main SAPI.c streams.c Log: fix format strings Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.155.2.12 php-src/main/SAPI.c:1.155.2.13 --- php-src/main/SAPI.c:1.155.2.12 Mon Aug 11 15:40:52 2003 +++ php-src/main/SAPI.c Thu Aug 28 12:04:18 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.155.2.12 2003/08/11 19:40:52 helly Exp $ */ +/* $Id: SAPI.c,v 1.155.2.13 2003/08/28 16:04:18 sas Exp $ */ #include #include @@ -186,7 +186,7 @@ int allocated_bytes=SAPI_POST_BLOCK_SIZE+1; if (SG(request_info).content_length > SG(post_max_size)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %d bytes exceeds the limit of %d bytes", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); return; } @@ -199,7 +199,7 @@ } SG(read_post_bytes) += read_bytes; if (SG(read_post_bytes) > SG(post_max_size)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %d bytes", SG(post_max_size)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %ld bytes", SG(post_max_size)); return; } if (read_bytes < SAPI_POST_BLOCK_SIZE) { Index: php-src/main/streams.c diff -u php-src/main/streams.c:1.125.2.74 php-src/main/streams.c:1.125.2.75 --- php-src/main/streams.c:1.125.2.74 Tue Aug 26 21:10:25 2003 +++ php-src/main/streams.c Thu Aug 28 12:04:18 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.125.2.74 2003/08/27 01:10:25 iliaa Exp $ */ +/* $Id: streams.c,v 1.125.2.75 2003/08/28 16:04:18 sas Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -2653,7 +2653,7 @@ char *tmp = estrdup(path); php_strip_url_passwd(tmp); php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, "could not make seekable - %s", - tmp, strerror(errno)); + tmp); efree(tmp); options ^= REPORT_ERRORS; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard assert.c fsock.c math.c scanf.c var.c
sas Thu Aug 28 12:01:50 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard assert.c fsock.c math.c scanf.c var.c Log: fix format strings Index: php-src/ext/standard/assert.c diff -u php-src/ext/standard/assert.c:1.50.2.2 php-src/ext/standard/assert.c:1.50.2.3 --- php-src/ext/standard/assert.c:1.50.2.2 Wed Aug 13 20:38:21 2003 +++ php-src/ext/standard/assert.c Thu Aug 28 12:01:49 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: assert.c,v 1.50.2.2 2003/08/14 00:38:21 iliaa Exp $ */ +/* $Id: assert.c,v 1.50.2.3 2003/08/28 16:01:49 sas Exp $ */ /* {{{ includes/startup/misc */ @@ -280,7 +280,7 @@ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %d", Z_LVAL_PP(what)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown value %ld", Z_LVAL_PP(what)); break; } Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.106.2.9 php-src/ext/standard/fsock.c:1.106.2.10 --- php-src/ext/standard/fsock.c:1.106.2.9 Thu Aug 28 11:15:35 2003 +++ php-src/ext/standard/fsock.cThu Aug 28 12:01:49 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.106.2.9 2003/08/28 15:15:35 sas Exp $ */ +/* $Id: fsock.c,v 1.106.2.10 2003/08/28 16:01:49 sas Exp $ */ /* converted to PHP Streams and moved much code to main/network.c [wez] */ @@ -229,7 +229,7 @@ err = php_socket_errno(); if (stream == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to %s:%d", host, port); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to %s:%ld", host, port); } else if (context) { php_stream_context_set(stream, context); } Index: php-src/ext/standard/math.c diff -u php-src/ext/standard/math.c:1.97.2.6 php-src/ext/standard/math.c:1.97.2.7 --- php-src/ext/standard/math.c:1.97.2.6Sat Aug 9 12:13:47 2003 +++ php-src/ext/standard/math.c Thu Aug 28 12:01:49 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: math.c,v 1.97.2.6 2003/08/09 16:13:47 iliaa Exp $ */ +/* $Id: math.c,v 1.97.2.7 2003/08/28 16:01:49 sas Exp $ */ #include "php.h" #include "php_math.h" @@ -968,11 +968,11 @@ convert_to_long_ex(frombase); convert_to_long_ex(tobase); if (Z_LVAL_PP(frombase) < 2 || Z_LVAL_PP(frombase) > 36) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `from base' (%d)", Z_LVAL_PP(frombase)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `from base' (%ld)", Z_LVAL_PP(frombase)); RETURN_FALSE; } if (Z_LVAL_PP(tobase) < 2 || Z_LVAL_PP(tobase) > 36) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `to base' (%d)", Z_LVAL_PP(tobase)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid `to base' (%ld)", Z_LVAL_PP(tobase)); RETURN_FALSE; } Index: php-src/ext/standard/scanf.c diff -u php-src/ext/standard/scanf.c:1.16.4.5 php-src/ext/standard/scanf.c:1.16.4.6 --- php-src/ext/standard/scanf.c:1.16.4.5 Tue Apr 22 22:37:29 2003 +++ php-src/ext/standard/scanf.cThu Aug 28 12:01:49 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: scanf.c,v 1.16.4.5 2003/04/23 02:37:29 iliaa Exp $ */ +/* $Id: scanf.c,v 1.16.4.6 2003/08/28 16:01:49 sas Exp $ */ /* scanf.c -- @@ -408,7 +408,7 @@ gotSequential = 1; if (gotXpg) { mixedXPG: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot mix \"%\" and \"%n$\" conversion specifiers"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "cannot mix \"%\" and \"%n$\" conversion specifiers"); goto error; } @@ -495,7 +495,7 @@ goto error; default: { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad scan conversion character \"%c\"", ch); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad scan conversion character \"%c\"", *ch); goto error; } } @@ -545,7 +545,7 @@ } for (i = 0; i < numVars; i++) { if (nassign[i] > 1) { -php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variable is assigned by multiple \"%n$\" conversion specifiers"); +php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", "Variable is assigned by multiple \"%n$\" conversion specifiers"); goto error; } else if (!xpgSize && (nassign[i] == 0)) { /* @@ -564,7 +564,7 @@ badIndex:
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard exec.c
sas Thu Aug 28 11:54:35 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard exec.c Log: fix format strings Index: php-src/ext/standard/exec.c diff -u php-src/ext/standard/exec.c:1.84.2.11 php-src/ext/standard/exec.c:1.84.2.12 --- php-src/ext/standard/exec.c:1.84.2.11 Thu Aug 7 11:50:18 2003 +++ php-src/ext/standard/exec.c Thu Aug 28 11:54:35 2003 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf | +--+ */ -/* $Id: exec.c,v 1.84.2.11 2003/08/07 15:50:18 zeev Exp $ */ +/* $Id: exec.c,v 1.84.2.12 2003/08/28 15:54:35 sas Exp $ */ #include #include "php.h" @@ -752,13 +752,13 @@ #ifdef PHP_WIN32 descriptors[ndesc].childend = dup_fd_as_handle(fd); if (descriptors[ndesc].childend == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %d", nindex); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %lu", nindex); goto exit_fail; } #else descriptors[ndesc].childend = dup(fd); if (descriptors[ndesc].childend < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %d - %s", nindex, strerror(errno)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to dup File-Handle for descriptor %lu - %s", nindex, strerror(errno)); goto exit_fail; } #endif @@ -783,7 +783,7 @@ if (zend_hash_index_find(Z_ARRVAL_PP(descitem), 1, (void **)&zmode) == SUCCESS) { convert_to_string_ex(zmode); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'pipe'", Z_STRVAL_PP(ztype)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'pipe'"); goto exit_fail; } @@ -825,14 +825,14 @@ if (zend_hash_index_find(Z_ARRVAL_PP(descitem), 1, (void **)&zfile) == SUCCESS) { convert_to_string_ex(zfile); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing file name parameter for 'file'", Z_STRVAL_PP(ztype)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing file name parameter for 'file'"); goto exit_fail; } if (zend_hash_index_find(Z_ARRVAL_PP(descitem), 2, (void **)&zmode) == SUCCESS) { convert_to_string_ex(zmode); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'file'", Z_STRVAL_PP(ztype)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing mode parameter for 'file'"); goto exit_fail; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main php.h
sas Thu Aug 28 11:52:16 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main php.h Log: add PHP_ATTRIBUTE_FORMAT to more functions # uncovers a nice number of incorrect format strings Index: php-src/main/php.h diff -u php-src/main/php.h:1.178.2.6 php-src/main/php.h:1.178.2.7 --- php-src/main/php.h:1.178.2.6Thu Aug 28 10:48:34 2003 +++ php-src/main/php.h Thu Aug 28 11:52:15 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.178.2.6 2003/08/28 14:48:34 sas Exp $ */ +/* $Id: php.h,v 1.178.2.7 2003/08/28 15:52:15 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -222,12 +222,7 @@ #define PHP_GCC_VERSION ZEND_GCC_VERSION #define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC - -#if PHP_GCC_VERSION >= 2007 -# define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) -#else -# define PHP_ATTRIBUTE_FORMAT(type, idx, first) -#endif +#define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF #include "snprintf.h" @@ -278,19 +273,28 @@ void phperror(char *error); PHPAPI int php_write(void *buf, uint size TSRMLS_DC); -PHPAPI int php_printf(const char *format, ...); +PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI void php_log_err(char *log_message TSRMLS_DC); -int Debug(char *format, ...); +int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); #define php_error zend_error -PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) ; +PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); + +#ifdef ZTS +#define PHP_ATTR_FMT_OFFSET 1 +#else +#define PHP_ATTR_FMT_OFFSET 0 +#endif /* PHPAPI void php_error(int type, const char *format, ...); */ -PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...); -PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...); -PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...); +PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); +PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); +PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...) + PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); #define php_error_docref php_error_docref0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard fsock.c
sas Thu Aug 28 11:16:21 2003 EDT Modified files: /php-src/ext/standard fsock.c Log: fix format string (long port) Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.113 php-src/ext/standard/fsock.c:1.114 --- php-src/ext/standard/fsock.c:1.113 Tue Jun 10 16:03:37 2003 +++ php-src/ext/standard/fsock.cThu Aug 28 11:16:20 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.113 2003/06/10 20:03:37 imajes Exp $ */ +/* $Id: fsock.c,v 1.114 2003/08/28 15:16:20 sas Exp $ */ #include "php.h" #include "php_globals.h" @@ -52,7 +52,7 @@ } if (persistent) { - spprintf(&hashkey, 0, "pfsockopen__%s:%d", host, port); + spprintf(&hashkey, 0, "pfsockopen__%s:%ld", host, port); } if (port > 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard fsock.c
sas Thu Aug 28 11:15:36 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard fsock.c Log: fix format (long port) Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.106.2.8 php-src/ext/standard/fsock.c:1.106.2.9 --- php-src/ext/standard/fsock.c:1.106.2.8 Fri Jun 27 12:42:51 2003 +++ php-src/ext/standard/fsock.cThu Aug 28 11:15:35 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: fsock.c,v 1.106.2.8 2003/06/27 16:42:51 sniper Exp $ */ +/* $Id: fsock.c,v 1.106.2.9 2003/08/28 15:15:35 sas Exp $ */ /* converted to PHP Streams and moved much code to main/network.c [wez] */ @@ -156,7 +156,7 @@ } if (persistent) { - spprintf(&hashkey, 0, "pfsockopen__%s:%d", host, port); + spprintf(&hashkey, 0, "pfsockopen__%s:%ld", host, port); switch(php_stream_from_persistent_id(hashkey, &stream TSRMLS_CC)) { case PHP_STREAM_PERSISTENT_SUCCESS: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/odbc php_odbc.c php_odbc_includes.h
On Thursday, August 28, 2003, at 10:38 AM, Jani Taskinen wrote: On Thu, 28 Aug 2003, Dan Kalowsky wrote: Thank you. If you had read the commit you would notice that this is for some people to test via a snapshot. If it worked, I planned to leave it in, if not, out it comes. But it's of no use if it can't be compiled. :) Having left this patch on a web page for people to download, I've found none of them have had issues with it. It seems that SQL_BLOB may only be a DB2 thing. I see no reason to keep this patch in any further, so feel free to revert it, or tell me how to remove the TAG status (1.173) before I revert it incorrectly. >---< Dan Kalowsky"Tonight I think I'll walk alone, http://www.deadmime.org/~dankI'll find myself as I go home" [EMAIL PROTECTED]- "Temptation", [EMAIL PROTECTED] New Order -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mcve .cvsignore config.m4 mcve.c mcve.dsp php_mcve.h
sniper Thu Aug 28 10:58:01 2003 EDT Modified files: /php-src/ext/mcve .cvsignore mcve.dsp config.m4 mcve.c php_mcve.h Log: MFB Index: php-src/ext/mcve/.cvsignore diff -u /dev/null php-src/ext/mcve/.cvsignore:1.2 --- /dev/null Thu Aug 28 10:58:01 2003 +++ php-src/ext/mcve/.cvsignore Thu Aug 28 10:58:01 2003 @@ -0,0 +1,20 @@ +*.lo +*.la +.deps +*.plg +*.opt +*.ncb +Release +Release_inline +Debug_TS +Release_TS +Release_TSDbg +Release_TS_inline +Debug_TS +Release_bundled +Release_inline_bundled +Debug_bundled +Release_TS_bundled +Release_TSDbg_bundled +Release_TS_inline_bundled +Debug_TS_bundled Index: php-src/ext/mcve/mcve.dsp diff -u /dev/null php-src/ext/mcve/mcve.dsp:1.2 --- /dev/null Thu Aug 28 10:58:01 2003 +++ php-src/ext/mcve/mcve.dsp Thu Aug 28 10:58:01 2003 @@ -0,0 +1,107 @@ +# Microsoft Developer Studio Project File - Name="mcve" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=mcve - Win32 Debug_TS +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "mcve.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "mcve.mak" CFG="mcve - Win32 Debug_TS" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "mcve - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "mcve - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mcve - Win32 Release_TS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_TS" +# PROP BASE Intermediate_Dir "Release_TS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_TS" +# PROP Intermediate_Dir "Release_TS" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MCVE_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MCVE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_MCVE=1 /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 php4ts.lib libmcve.lib ssleay32.lib libeay32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_mcve.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" + +!ELSEIF "$(CFG)" == "mcve - Win32 Debug_TS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_TS" +# PROP BASE Intermediate_Dir "Debug_TS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_TS" +# PROP Intermediate_Dir "Debug_TS" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "mcve_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_MCVE" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_MCVE=1 /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 php4ts_debug.lib libmcve.lib ssleay32.lib libeay32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_mcve.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" + +!ENDIF + +# Begin Target + +# Name "mcve - Wi
[PHP-CVS] cvs: php-src /main php.h
sas Thu Aug 28 10:53:37 2003 EDT Modified files: /php-src/main php.h Log: Use ZEND_GCC_VERSION and ZEND_ATTRIBUTE_MALLOC Index: php-src/main/php.h diff -u php-src/main/php.h:1.194 php-src/main/php.h:1.195 --- php-src/main/php.h:1.194Thu Aug 28 01:23:08 2003 +++ php-src/main/php.h Thu Aug 28 10:53:36 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.194 2003/08/28 05:23:08 sas Exp $ */ +/* $Id: php.h,v 1.195 2003/08/28 14:53:36 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -226,7 +226,10 @@ #define LONG_MIN (- LONG_MAX - 1) #endif -#ifdef __GNUC__ +#define PHP_GCC_VERSION ZEND_GCC_VERSION +#define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC + +#if PHP_GCC_VERSION >= 2007 # define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) #else # define PHP_ATTRIBUTE_FORMAT(type, idx, first) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main php.h
sas Thu Aug 28 10:48:35 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main php.h Log: Use ZEND_GCC_VERSION and ZEND_ATTRIBUTE_MALLOC Index: php-src/main/php.h diff -u php-src/main/php.h:1.178.2.5 php-src/main/php.h:1.178.2.6 --- php-src/main/php.h:1.178.2.5Thu Aug 28 01:25:26 2003 +++ php-src/main/php.h Thu Aug 28 10:48:34 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.178.2.5 2003/08/28 05:25:26 sas Exp $ */ +/* $Id: php.h,v 1.178.2.6 2003/08/28 14:48:34 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -220,7 +220,10 @@ #define LONG_MIN (- LONG_MAX - 1) #endif -#ifdef __GNUC__ +#define PHP_GCC_VERSION ZEND_GCC_VERSION +#define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC + +#if PHP_GCC_VERSION >= 2007 # define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) #else # define PHP_ATTRIBUTE_FORMAT(type, idx, first) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/odbc php_odbc.c php_odbc_includes.h
On Thu, 28 Aug 2003, Dan Kalowsky wrote: >On Thursday, August 28, 2003, at 06:08 AM, Jani Taskinen wrote: > >> On Wed, 27 Aug 2003, Dan Kalowsky wrote: >> >>> + REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_LONGVARBINARY, >>> CONST_PERSISTENT | CONST_CS); >> >> Isn't above supposed to be instead this: >> >> REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_BLOB, CONST_PERSISTENT | >> CONST_CS); > >Don't mess with bits you don't understand. To answer your question, no >it shouldn't. Fine. >> I fixed one typo already, maybe you should TEST before you commit >> things? > >Thank you. If you had read the commit you would notice that this is >for some people to test via a snapshot. If it worked, I planned to >leave it in, if not, out it comes. But it's of no use if it can't be compiled. :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/curl .cvsignore
sniper Thu Aug 28 10:25:13 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/curl .cvsignore Log: missing entries Index: php-src/ext/curl/.cvsignore diff -u php-src/ext/curl/.cvsignore:1.6 php-src/ext/curl/.cvsignore:1.6.4.1 --- php-src/ext/curl/.cvsignore:1.6 Sat Apr 20 05:29:55 2002 +++ php-src/ext/curl/.cvsignore Thu Aug 28 10:25:12 2003 @@ -1,13 +1,15 @@ -*.lo -*.la -.deps -*.plg -*.opt -*.ncb -Release -Release_inline -Debug -Release_TS -Release_TSDbg -Release_TS_inline -Debug_TS +*.lo +*.la +.deps +*.plg +*.opt +*.ncb +Release +Release_inline +Debug +Release_TS +Release_TS_SSL +Release_TSDbg +Release_TS_inline +Debug_TS +Debug_TS_SSL -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mcve .cvsignore
sniper Thu Aug 28 10:08:44 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/mcve .cvsignore Log: missing .cvsignore Index: php-src/ext/mcve/.cvsignore +++ php-src/ext/mcve/.cvsignore -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/odbc php_odbc.c php_odbc_includes.h
On Thursday, August 28, 2003, at 06:08 AM, Jani Taskinen wrote: On Wed, 27 Aug 2003, Dan Kalowsky wrote: + REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_LONGVARBINARY, CONST_PERSISTENT | CONST_CS); Isn't above supposed to be instead this: REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_BLOB, CONST_PERSISTENT | CONST_CS); Don't mess with bits you don't understand. To answer your question, no it shouldn't. I fixed one typo already, maybe you should TEST before you commit things? Thank you. If you had read the commit you would notice that this is for some people to test via a snapshot. If it worked, I planned to leave it in, if not, out it comes. >---< Dan Kalowsky"I've learned to fake it, http://www.deadmime.org/~dankand just smile along." [EMAIL PROTECTED]- "Candy", [EMAIL PROTECTED] Iggy Pop -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
andrey Thu Aug 28 08:18:52 2003 EDT Modified files: /php-src/ext/standard basic_functions.c Log: proto fix Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.623 php-src/ext/standard/basic_functions.c:1.624 --- php-src/ext/standard/basic_functions.c:1.623Wed Aug 20 16:51:10 2003 +++ php-src/ext/standard/basic_functions.c Thu Aug 28 08:18:51 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.623 2003/08/20 20:51:10 bfrance Exp $ */ +/* $Id: basic_functions.c,v 1.624 2003/08/28 12:18:51 andrey Exp $ */ #include "php.h" #include "php_streams.h" @@ -2521,7 +2521,7 @@ /* }}} */ -/* {{{ proto bool print_r(mixed var [, bool return]) +/* {{{ proto mixed print_r(mixed var [, bool return]) Prints out or returns information about the specified variable */ PHP_FUNCTION(print_r) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cli php_cli.c
stasThu Aug 28 07:50:33 2003 EDT Modified files: /php-src/sapi/cli php_cli.c Log: MF4: -m fix for premature extension unloading Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.101 php-src/sapi/cli/php_cli.c:1.102 --- php-src/sapi/cli/php_cli.c:1.101Sun Aug 24 09:10:02 2003 +++ php-src/sapi/cli/php_cli.c Thu Aug 28 07:50:32 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.101 2003/08/24 13:10:02 helly Exp $ */ +/* $Id: php_cli.c,v 1.102 2003/08/28 11:50:32 stas Exp $ */ #include "php.h" #include "php_globals.h" @@ -166,6 +166,7 @@ zend_llist sorted_exts; zend_llist_copy(&sorted_exts, &zend_extensions); + sorted_exts.dtor = NULL; zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC); zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL TSRMLS_CC); zend_llist_destroy(&sorted_exts); -- 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) /sapi/cli php_cli.c
What about HEAD and same in sapi/cgi?? --Jani On Thu, 28 Aug 2003, Stanislav Malyshev wrote: >stas Thu Aug 28 07:34:51 2003 EDT > > Modified files: (Branch: PHP_4_3) >/php-src/sapi/cli php_cli.c > Log: > Null dtor so that extensions won't be unloaded prematurely by list > destruction > > >Index: php-src/sapi/cli/php_cli.c >diff -u php-src/sapi/cli/php_cli.c:1.51.2.28 php-src/sapi/cli/php_cli.c:1.51.2.29 >--- php-src/sapi/cli/php_cli.c:1.51.2.28 Tue Aug 12 21:30:39 2003 >+++ php-src/sapi/cli/php_cli.c Thu Aug 28 07:34:51 2003 >@@ -164,6 +164,7 @@ > zend_llist sorted_exts; > > zend_llist_copy(&sorted_exts, &zend_extensions); >+ sorted_exts.dtor = NULL; > zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC); > zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) > print_extension_info, NULL TSRMLS_CC); > zend_llist_destroy(&sorted_exts); > > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/zlib zlib.c
Please MFH this fix (and move the NEWS entry to PHP_4_3 branch NEWS) --Jani On Sun, 24 Aug 2003, Stefan Roehrich wrote: >sr Sun Aug 24 09:59:35 2003 EDT > > Modified files: >/php-src NEWS >/php-src/ext/zlib zlib.c > Log: > Fixed bug #25218 ("deflate" compressed pages had a gzip header, which > should only be sent with "gzip" compressed pages). > > >Index: php-src/NEWS >diff -u php-src/NEWS:1.1461 php-src/NEWS:1.1462 >--- php-src/NEWS:1.1461Thu Aug 21 20:14:21 2003 >+++ php-src/NEWS Sun Aug 24 09:59:34 2003 >@@ -44,6 +44,7 @@ > - Fixed bug #19859 (allow fast_call_user_function to support __call). > (Stanislav) > - Fixed bug #17988 (strtotime failed to parse postgresql timestamp). (Derick) >+- Fixed bug #25218 ("deflate" compressed pages had a gzip header). (Stefan) > > 29 Jun 2003, PHP 5 Beta 1 > - Removed the bundled MySQL client library. (Sterling) >Index: php-src/ext/zlib/zlib.c >diff -u php-src/ext/zlib/zlib.c:1.176 php-src/ext/zlib/zlib.c:1.177 >--- php-src/ext/zlib/zlib.c:1.176 Sun Aug 24 09:32:50 2003 >+++ php-src/ext/zlib/zlib.cSun Aug 24 09:59:34 2003 >@@ -19,7 +19,7 @@ >+--+ > */ > >-/* $Id: zlib.c,v 1.176 2003/08/24 13:32:50 sr Exp $ */ >+/* $Id: zlib.c,v 1.177 2003/08/24 13:59:34 sr Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" >@@ -702,7 +702,7 @@ > Bytef *buffer; > uInt prev_outlen, outlen; > int err; >- int start_offset = (do_start ? 10 : 0); >+ int start_offset = ((do_start && ZLIBG(compression_coding) == CODING_GZIP) ? >10 : 0); > int end_offset = (do_end ? 8 : 0); > > outlen = (uint) (sizeof(char) * (str_length * 1.001f + 12) + 1); /* leave some > room for a trailing \0 */ >@@ -776,14 +776,14 @@ > ZLIBG(stream).next_in = (Bytef *) str; > ZLIBG(stream).avail_in = (uInt) str_length; > >- if (ZLIBG(compression_coding) == 1) { >+ if (ZLIBG(compression_coding) == CODING_GZIP) { > ZLIBG(crc) = crc32(ZLIBG(crc), (const Bytef *) str, str_length); > } > > err = php_do_deflate(str_length, (Bytef **) newstr, new_length, do_start, > do_end TSRMLS_CC); > /* TODO: error handling (err may be Z_STREAM_ERROR, Z_BUF_ERROR, ?) */ > >- if (do_start) { >+ if (do_start && ZLIBG(compression_coding) == CODING_GZIP) { > /* Write a very simple .gz header: */ > (*newstr)[0] = gz_magic[0]; > (*newstr)[1] = gz_magic[1]; >@@ -793,7 +793,7 @@ > *new_length += 10; > } > if (do_end) { >- if (ZLIBG(compression_coding) == 1) { >+ if (ZLIBG(compression_coding) == CODING_GZIP) { > char *trailer = (*newstr) + (*new_length); > > /* write crc & stream.total_in in LSB order */ > > -- https://www.paypal.com/xclick/[EMAIL PROTECTED]&no_note=1&tax=0¤cy_code=EUR -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /sapi/cli php_cli.c
stasThu Aug 28 07:34:51 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/cli php_cli.c Log: Null dtor so that extensions won't be unloaded prematurely by list destruction Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.51.2.28 php-src/sapi/cli/php_cli.c:1.51.2.29 --- php-src/sapi/cli/php_cli.c:1.51.2.28Tue Aug 12 21:30:39 2003 +++ php-src/sapi/cli/php_cli.c Thu Aug 28 07:34:51 2003 @@ -164,6 +164,7 @@ zend_llist sorted_exts; zend_llist_copy(&sorted_exts, &zend_extensions); + sorted_exts.dtor = NULL; zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC); zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL TSRMLS_CC); zend_llist_destroy(&sorted_exts); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/odbc php_odbc.c php_odbc_includes.h
On Wed, 27 Aug 2003, Dan Kalowsky wrote: >+ REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_LONGVARBINARY, CONST_PERSISTENT | >CONST_CS); Isn't above supposed to be instead this: REGISTER_LONG_CONSTANT("SQL_BLOB", SQL_BLOB, CONST_PERSISTENT | CONST_CS); I fixed one typo already, maybe you should TEST before you commit things? --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c
sniper Thu Aug 28 05:55:12 2003 EDT Modified files: /php-src/ext/odbc php_odbc.c Log: typofix Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.172 php-src/ext/odbc/php_odbc.c:1.173 --- php-src/ext/odbc/php_odbc.c:1.172 Wed Aug 27 14:21:51 2003 +++ php-src/ext/odbc/php_odbc.c Thu Aug 28 05:55:11 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_odbc.c,v 1.172 2003/08/27 18:21:51 kalowsky Exp $ */ +/* $Id: php_odbc.c,v 1.173 2003/08/28 09:55:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1430,7 +1430,7 @@ } if (result->binmode == 1) { - sql_c-type = SQL_C_BINARY; + sql_c_type = SQL_C_BINARY; } case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/iconv config.m4
moriyoshi Thu Aug 28 02:05:13 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/iconv config.m4 Log: MFH(r-1.25): add further check for "#include MACRO" style syntax Index: php-src/ext/iconv/config.m4 diff -u php-src/ext/iconv/config.m4:1.19.2.3 php-src/ext/iconv/config.m4:1.19.2.4 --- php-src/ext/iconv/config.m4:1.19.2.3Wed Jul 30 17:57:02 2003 +++ php-src/ext/iconv/config.m4 Thu Aug 28 02:05:13 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.19.2.3 2003/07/30 21:57:02 sniper Exp $ +dnl $Id: config.m4,v 1.19.2.4 2003/08/28 06:05:13 moriyoshi Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, @@ -114,13 +114,22 @@ AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not]) ]) +AC_MSG_CHECKING([if your cpp allows macro usage in include lines]) +AC_TRY_COMPILE([ +#define FOO <$PHP_ICONV_H_PATH> +#include FOO +], [], [ + AC_MSG_RESULT([yes]) + PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>]) + AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) +], [ + AC_MSG_RESULT([no]) +]) + CFLAGS="$iconv_cflags_save" LDFLAGS="$iconv_ldflags_save" -PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>]) -AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) - -PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) +PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-I\"$PHP_ICONV_PREFIX/include\"]) PHP_SUBST(ICONV_SHARED_LIBADD) else AC_MSG_ERROR(Please reinstall the iconv library.) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/iconv config.m4
moriyoshi Thu Aug 28 02:04:49 2003 EDT Modified files: /php-src/ext/iconv config.m4 Log: Add further check for "#include MACRO" style syntax Index: php-src/ext/iconv/config.m4 diff -u php-src/ext/iconv/config.m4:1.24 php-src/ext/iconv/config.m4:1.25 --- php-src/ext/iconv/config.m4:1.24Wed Jul 30 17:56:45 2003 +++ php-src/ext/iconv/config.m4 Thu Aug 28 02:04:48 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.24 2003/07/30 21:56:45 sniper Exp $ +dnl $Id: config.m4,v 1.25 2003/08/28 06:04:48 moriyoshi Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, @@ -114,13 +114,22 @@ AC_DEFINE([ICONV_SUPPORTS_ERRNO],0,[Whether iconv supports error no or not]) ]) +AC_MSG_CHECKING([if your cpp allows macro usage in include lines]) +AC_TRY_COMPILE([ +#define FOO <$PHP_ICONV_H_PATH> +#include FOO +], [], [ + AC_MSG_RESULT([yes]) + PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>]) + AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) +], [ + AC_MSG_RESULT([no]) +]) + CFLAGS="$iconv_cflags_save" LDFLAGS="$iconv_ldflags_save" -PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>]) -AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) - -PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) +PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-I\"$PHP_ICONV_PREFIX/include\"]) PHP_SUBST(ICONV_SHARED_LIBADD) else AC_MSG_ERROR(Please reinstall the iconv library.) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main php.h snprintf.h spprintf.h
sas Thu Aug 28 01:25:27 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/main php.h snprintf.h spprintf.h Log: MFH automatic format checks Index: php-src/main/php.h diff -u php-src/main/php.h:1.178.2.4 php-src/main/php.h:1.178.2.5 --- php-src/main/php.h:1.178.2.4Fri Jun 27 03:43:05 2003 +++ php-src/main/php.h Thu Aug 28 01:25:26 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.178.2.4 2003/06/27 07:43:05 sas Exp $ */ +/* $Id: php.h,v 1.178.2.5 2003/08/28 05:25:26 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -218,6 +218,12 @@ #ifndef LONG_MIN #define LONG_MIN (- LONG_MAX - 1) +#endif + +#ifdef __GNUC__ +# define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) +#else +# define PHP_ATTRIBUTE_FORMAT(type, idx, first) #endif #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF Index: php-src/main/snprintf.h diff -u php-src/main/snprintf.h:1.18.4.2 php-src/main/snprintf.h:1.18.4.3 --- php-src/main/snprintf.h:1.18.4.2Tue Feb 25 04:45:47 2003 +++ php-src/main/snprintf.h Thu Aug 28 01:25:26 2003 @@ -63,17 +63,17 @@ #define SNPRINTF_H #if !defined(HAVE_SNPRINTF) || PHP_BROKEN_SNPRINTF -extern int ap_php_snprintf(char *, size_t, const char *, ...); +int ap_php_snprintf(char *, size_t, const char *, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); #define snprintf ap_php_snprintf #endif #if !defined(HAVE_VSNPRINTF) || PHP_BROKEN_VSNPRINTF -extern int ap_php_vsnprintf(char *, size_t, const char *, va_list ap); +int ap_php_vsnprintf(char *, size_t, const char *, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0); #define vsnprintf ap_php_vsnprintf #endif #if PHP_BROKEN_SPRINTF -int php_sprintf (char* s, const char* format, ...); +int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3); #define sprintf php_sprintf #endif Index: php-src/main/spprintf.h diff -u php-src/main/spprintf.h:1.5.4.1 php-src/main/spprintf.h:1.5.4.2 --- php-src/main/spprintf.h:1.5.4.1 Tue Dec 31 11:26:27 2002 +++ php-src/main/spprintf.h Thu Aug 28 01:25:26 2003 @@ -35,9 +35,9 @@ #include "snprintf.h" BEGIN_EXTERN_C() -PHPAPI extern int spprintf( char **pbuf, size_t max_len, const char *format, ...); +PHPAPI int spprintf( char **pbuf, size_t max_len, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); -PHPAPI extern int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap); +PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0); END_EXTERN_C() #endif /* SNPRINTF_H */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php.h snprintf.h spprintf.h
sas Thu Aug 28 01:23:08 2003 EDT Modified files: /php-src/main php.h snprintf.h spprintf.h Log: Let GCC check format arguments Index: php-src/main/php.h diff -u php-src/main/php.h:1.193 php-src/main/php.h:1.194 --- php-src/main/php.h:1.193Fri Aug 22 12:43:29 2003 +++ php-src/main/php.h Thu Aug 28 01:23:08 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.193 2003/08/22 16:43:29 bfrance Exp $ */ +/* $Id: php.h,v 1.194 2003/08/28 05:23:08 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -224,6 +224,12 @@ #ifndef LONG_MIN #define LONG_MIN (- LONG_MAX - 1) +#endif + +#ifdef __GNUC__ +# define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) +#else +# define PHP_ATTRIBUTE_FORMAT(type, idx, first) #endif #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF Index: php-src/main/snprintf.h diff -u php-src/main/snprintf.h:1.23 php-src/main/snprintf.h:1.24 --- php-src/main/snprintf.h:1.23Tue Jun 10 16:03:42 2003 +++ php-src/main/snprintf.h Thu Aug 28 01:23:08 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: snprintf.h,v 1.23 2003/06/10 20:03:42 imajes Exp $ */ +/* $Id: snprintf.h,v 1.24 2003/08/28 05:23:08 sas Exp $ */ /* @@ -65,17 +65,17 @@ #define SNPRINTF_H #if !defined(HAVE_SNPRINTF) || PHP_BROKEN_SNPRINTF -extern int ap_php_snprintf(char *, size_t, const char *, ...); +int ap_php_snprintf(char *, size_t, const char *, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); #define snprintf ap_php_snprintf #endif #if !defined(HAVE_VSNPRINTF) || PHP_BROKEN_VSNPRINTF -extern int ap_php_vsnprintf(char *, size_t, const char *, va_list ap); +int ap_php_vsnprintf(char *, size_t, const char *, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0); #define vsnprintf ap_php_vsnprintf #endif #if PHP_BROKEN_SPRINTF -int php_sprintf (char* s, const char* format, ...); +int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3); #define sprintf php_sprintf #endif Index: php-src/main/spprintf.h diff -u php-src/main/spprintf.h:1.8 php-src/main/spprintf.h:1.9 --- php-src/main/spprintf.h:1.8 Tue Jun 10 16:03:42 2003 +++ php-src/main/spprintf.h Thu Aug 28 01:23:08 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spprintf.h,v 1.8 2003/06/10 20:03:42 imajes Exp $ */ +/* $Id: spprintf.h,v 1.9 2003/08/28 05:23:08 sas Exp $ */ /* @@ -37,9 +37,9 @@ #include "snprintf.h" BEGIN_EXTERN_C() -PHPAPI extern int spprintf( char **pbuf, size_t max_len, const char *format, ...); +PHPAPI int spprintf( char **pbuf, size_t max_len, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); -PHPAPI extern int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap); +PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0); END_EXTERN_C() #endif /* SNPRINTF_H */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/pgsql pgsql.c
iliaa Wed Aug 27 20:33:48 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/pgsql pgsql.c Log: MFH: Fixed bug #25109 (Possible crash when fetching field names in pgsql) Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.360 php-src/NEWS:1.1247.2.361 --- php-src/NEWS:1.1247.2.360 Mon Aug 25 22:52:39 2003 +++ php-src/NEWSWed Aug 27 20:33:47 2003 @@ -3,8 +3,9 @@ ?? ??? 2003, Version 4.3.4 - Fixed disk_total_space() and disk_free_space() under FreeBSD. (Jon Parise) - Fixed crash bug when non-existing save/serializer handler was used. (Jani) -- Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) - Fixed bug #25239 (ftp_fopen_wrapper not RFC compliant). (Sara) +- Fixed bug #25166 (WDDX serializer handler missing in win32). (Jani) +- Fixed bug #25109 (Possible crash when fetching field names in pgsql). (Ilia) 25 Aug 2003, Version 4.3.3 - Upgraded the bundled Expat library to version 1.95.6. (Jani) Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.244.2.22 php-src/ext/pgsql/pgsql.c:1.244.2.23 --- php-src/ext/pgsql/pgsql.c:1.244.2.22Thu Aug 14 13:49:48 2003 +++ php-src/ext/pgsql/pgsql.c Wed Aug 27 20:33:48 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.244.2.22 2003/08/14 17:49:48 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.244.2.23 2003/08/28 00:33:48 iliaa Exp $ */ #include @@ -1093,7 +1093,10 @@ char *tmp_oid, *end_ptr, *tmp_name; list_entry new_oid_entry; - if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL) { + if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL || PQresultStatus(result) != PGRES_TUPLES_OK) { + if (result) { + PQclear(result); + } smart_str_free(&str); return empty_string; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c
iliaa Wed Aug 27 20:31:38 2003 EDT Modified files: /php-src/ext/pgsql pgsql.c Log: Fixed bug #25109 (Possible crash when fetching field name) Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.290 php-src/ext/pgsql/pgsql.c:1.291 --- php-src/ext/pgsql/pgsql.c:1.290 Tue Aug 26 20:04:19 2003 +++ php-src/ext/pgsql/pgsql.c Wed Aug 27 20:31:36 2003 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.290 2003/08/27 00:04:19 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.291 2003/08/28 00:31:36 iliaa Exp $ */ #include @@ -1203,7 +1203,10 @@ char *tmp_oid, *end_ptr, *tmp_name; list_entry new_oid_entry; - if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL) { + if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL || PQresultStatus(result) != PGRES_TUPLES_OK) { + if (result) { + PQclear(result); + } smart_str_free(&str); return empty_string; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pgsql/tests 05large_object.phpt 08escape.phpt 11pg_meta_data.phpt 18pg_escape_bytea.phpt
iliaa Wed Aug 27 20:29:45 2003 EDT Modified files: /php-src/ext/pgsql/tests05large_object.phpt 08escape.phpt 11pg_meta_data.phpt 18pg_escape_bytea.phpt Log: Fixed tests that failed in ZTS due to incorrect file paths. Fixed test that failed due to new array dimension property being fetched. Index: php-src/ext/pgsql/tests/05large_object.phpt diff -u php-src/ext/pgsql/tests/05large_object.phpt:1.3 php-src/ext/pgsql/tests/05large_object.phpt:1.4 --- php-src/ext/pgsql/tests/05large_object.phpt:1.3 Fri May 30 12:51:00 2003 +++ php-src/ext/pgsql/tests/05large_object.phpt Wed Aug 27 20:29:44 2003 @@ -55,16 +55,17 @@ pg_exec ($db, "commit"); echo "import/export LO\n"; +$path = dirname(__FILE__) . '/'; pg_query($db, 'begin'); -$oid = pg_lo_import($db, 'php.gif'); +$oid = pg_lo_import($db, $path . 'php.gif'); pg_query($db, 'commit'); pg_query($db, 'begin'); [EMAIL PROTECTED]('php.gif.exported'); -pg_lo_export($oid, 'php.gif.exported', $db); -if (!file_exists('php.gif.exported')) { [EMAIL PROTECTED]($path . 'php.gif.exported'); +pg_lo_export($oid, $path . 'php.gif.exported', $db); +if (!file_exists($path . 'php.gif.exported')) { echo "Export failed\n"; } [EMAIL PROTECTED]('php.gif.exported'); [EMAIL PROTECTED]($path . 'php.gif.exported'); pg_query($db, 'commit'); echo "OK"; Index: php-src/ext/pgsql/tests/08escape.phpt diff -u php-src/ext/pgsql/tests/08escape.phpt:1.5 php-src/ext/pgsql/tests/08escape.phpt:1.6 --- php-src/ext/pgsql/tests/08escape.phpt:1.5 Mon May 19 20:14:46 2003 +++ php-src/ext/pgsql/tests/08escape.phpt Wed Aug 27 20:29:44 2003 @@ -6,7 +6,7 @@ - array(5) { + array(6) { ["num"]=> int(1) ["type"]=> @@ -28,9 +28,11 @@ bool(false) ["has default"]=> bool(false) +["array dims"]=> +int(0) } ["str"]=> - array(5) { + array(6) { ["num"]=> int(2) ["type"]=> @@ -41,9 +43,11 @@ bool(false) ["has default"]=> bool(false) +["array dims"]=> +int(0) } ["bin"]=> - array(5) { + array(6) { ["num"]=> int(3) ["type"]=> @@ -54,5 +58,7 @@ bool(false) ["has default"]=> bool(false) +["array dims"]=> +int(0) } } Index: php-src/ext/pgsql/tests/18pg_escape_bytea.phpt diff -u php-src/ext/pgsql/tests/18pg_escape_bytea.phpt:1.2 php-src/ext/pgsql/tests/18pg_escape_bytea.phpt:1.3 --- php-src/ext/pgsql/tests/18pg_escape_bytea.phpt:1.2 Mon May 19 20:14:46 2003 +++ php-src/ext/pgsql/tests/18pg_escape_bytea.phpt Wed Aug 27 20:29:44 2003 @@ -8,8 +8,7 @@ include('config.inc'); -$fp = fopen('php.gif', 'r'); -$image = fread($fp, filesize('php.gif')); +$image = file_get_contents(dirname(__FILE__) . '/php.gif'); $esc_image = pg_escape_bytea($image); $db = pg_connect($conn_str); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase/tests 006.phpt
abies Wed Aug 27 20:18:27 2003 EDT Modified files: /php-src/ext/interbase/tests006.phpt Log: Test multiple execution of a prepared EXEC PROCEDURE statement Index: php-src/ext/interbase/tests/006.phpt diff -u php-src/ext/interbase/tests/006.phpt:1.3 php-src/ext/interbase/tests/006.phpt:1.4 --- php-src/ext/interbase/tests/006.phpt:1.3Fri Apr 25 11:43:28 2003 +++ php-src/ext/interbase/tests/006.phptWed Aug 27 20:18:27 2003 @@ -24,6 +24,13 @@ v_smallint smallint, v_varchar varchar(1) )"); +ibase_query( + "create procedure add1 (arg integer) + returns (result integer) + as + begin + result = arg +1; + end"); ibase_commit(); /* if timefmt not supported, hide error */ @@ -181,6 +188,19 @@ ibase_free_result($res); ibase_free_query($query); + +/* test execute procedure */ +$query = ibase_prepare("execute procedure add1(?)"); +$res = array(); +for ($i = 0; $i < 10; $i++) { + $res[] = ibase_execute($query,$i); +} +ibase_free_query($query); + foreach ($res as $r) { + out_result($r, "proc add1"); + ibase_free_result($r); +} + ibase_close(); echo "end of test\n"; ?> @@ -219,6 +239,36 @@ 5 6 7 +--- +--- proc add1 --- +1 +--- +--- proc add1 --- +2 +--- +--- proc add1 --- +3 +--- +--- proc add1 --- +4 +--- +--- proc add1 --- +5 +--- +--- proc add1 --- +6 +--- +--- proc add1 --- +7 +--- +--- proc add1 --- +8 +--- +--- proc add1 --- +9 +--- +--- proc add1 --- +10 --- end of test -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase/tests 004.phpt
abies Wed Aug 27 20:17:25 2003 EDT Modified files: /php-src/ext/interbase/tests004.phpt Log: Test for BLOB ID survival of close()/connect() Index: php-src/ext/interbase/tests/004.phpt diff -u php-src/ext/interbase/tests/004.phpt:1.8 php-src/ext/interbase/tests/004.phpt:1.9 --- php-src/ext/interbase/tests/004.phpt:1.8Sun Aug 17 12:14:29 2003 +++ php-src/ext/interbase/tests/004.phptWed Aug 27 20:17:25 2003 @@ -98,14 +98,18 @@ ibase_blob_add($bl_h, "+--+\n"); $bl_s = ibase_blob_close($bl_h); ibase_query("insert into test4 (v_integer, v_blob) values (3, ?)", $bl_s); - + ibase_commit(); echo "echo blob 3\n"; $q = ibase_query("select v_blob from test4 where v_integer = 3"); $row = ibase_fetch_object($q); + ibase_commit(); + ibase_close(); + +ibase_connect($test_base); ibase_blob_echo($row->V_BLOB); ibase_free_result($q); - + echo "fetch blob 3\n"; $q = ibase_query("select v_blob from test4 where v_integer = 3"); $row = ibase_fetch_object($q,IBASE_TEXT); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c
abies Wed Aug 27 20:11:17 2003 EDT Modified files: /php-src/ext/interbase interbase.c Log: Removed TSRMLS_FETCH from _php_ibase_module_error() Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.161 php-src/ext/interbase/interbase.c:1.162 --- php-src/ext/interbase/interbase.c:1.161 Wed Aug 27 18:55:05 2003 +++ php-src/ext/interbase/interbase.c Wed Aug 27 20:11:16 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.161 2003/08/27 22:55:05 abies Exp $ */ +/* $Id: interbase.c,v 1.162 2003/08/28 00:11:16 abies Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -220,12 +220,16 @@ /* {{{ _php_ibase_module_error() print php interbase module error and save it for ibase_errmsg() */ -static void _php_ibase_module_error(char *msg, ...) +static void _php_ibase_module_error(char *msg TSRMLS_DC, ...) { va_list ap; - TSRMLS_FETCH(); +#ifdef ZTS + va_start(ap, TSRMLS_C); +#else va_start(ap, msg); +#endif + /* vsnprintf NUL terminates the buf and writes at most n-1 chars+NUL */ vsnprintf(IBG(errmsg), MAX_ERRMSG, msg, ap); va_end(ap); @@ -263,7 +267,7 @@ IBDEBUG("Type is le_trans"); ZEND_FETCH_RESOURCE(*trans, ibase_trans *, link_id, -1, "InterBase transaction", le_trans); if ((*trans)->link_cnt > 1) { - _php_ibase_module_error("Link id is ambiguous: transaction spans multiple connections."); + _php_ibase_module_error("Link id is ambiguous: transaction spans multiple connections." TSRMLS_CC); return; } *ib_link = (*trans)->db_link[0]; @@ -520,7 +524,7 @@ if (ib_blob->bl_handle != NULL) { /* blob open*/ if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) { _php_ibase_module_error("You can lose data. Close any blob after " - "reading from or writing to it. Use ibase_blob_close() before calling ibase_close()"); + "reading from or writing to it. Use ibase_blob_close() before calling ibase_close()" TSRMLS_CC); } } efree(ib_blob); @@ -700,7 +704,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "Interbase Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.161 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.162 $"); #ifdef COMPILE_DL_INTERBASE php_info_print_table_row(2, "Dynamic Module", "Yes"); #endif @@ -864,7 +868,7 @@ list_entry *le; int open_new_connection = 1; - if ( (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void *) &le)) ) { + if ( (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void *) &le) != FAILURE) ) { static char info[] = {isc_info_base_level, isc_info_end}; char result[8]; /* Enough? Hope so... */ @@ -883,12 +887,12 @@ list_entry new_le; if ((IBG(max_links) != -1) && (IBG(num_links) >= IBG(max_links))) { - _php_ibase_module_error("Too many open links (%d)", IBG(num_links)); + _php_ibase_module_error("Too many open links (%d)" TSRMLS_CC, IBG(num_links)); efree(hashed_details); RETURN_FALSE; } if ((IBG(max_persistent) != -1) && (IBG(num_persistent) >= IBG(max_persistent))) { - _php_ibase_module_error("Too many open persistent links (%d)", IBG(num_persistent)); + _php_ibase_module_error("Too many open persistent links (%d)" TSRMLS_CC, IBG(num_persistent)); efree(hashed_details); RETURN_FALSE; } @@ -929,7 +933,7 @@ * if it doesn't, open a new ib_link, add it to the resource list, * and add a pointer to it with hashed_details as the key. */ - if ( (zend_hash_find(&EG(regular_list), hashed_details, hashed_details_length + 1, (void *) &index_ptr)) ) { + if ( (zend_hash_find(&EG(regular_list), hashed_details, hashed_details_length + 1, (void *) &index_ptr) == SUCCESS) ) { int type, xlink; void *ptr; if (Z_TYPE_P(index_ptr) != le_index_ptr) { @@ -949,7 +953,7 @@
[PHP-CVS] cvs: php-src /ext/standard mail.c
iliaa Wed Aug 27 19:53:16 2003 EDT Modified files: /php-src/ext/standard mail.c Log: Prevent abrupt script execution when sendmail_path contains invalid executable. Add more detail to the warnings regarding execution of sendmail binary. Index: php-src/ext/standard/mail.c diff -u php-src/ext/standard/mail.c:1.73 php-src/ext/standard/mail.c:1.74 --- php-src/ext/standard/mail.c:1.73Tue Jun 10 16:03:38 2003 +++ php-src/ext/standard/mail.c Wed Aug 27 19:53:15 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mail.c,v 1.73 2003/06/10 20:03:38 imajes Exp $ */ +/* $Id: mail.c,v 1.74 2003/08/27 23:53:15 iliaa Exp $ */ #include #include @@ -198,6 +198,13 @@ #ifdef PHP_WIN32 sendmail = popen(sendmail_cmd, "wb"); #else + /* make sure that sendmail_path contains a valid executable, failure to do +* would make PHP abruptly exit without a useful error message. */ + if (access(sendmail_path, X_OK)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary '%s'", sendmail_path); + return 0; + } + /* Since popen() doesn't indicate if the internal fork() doesn't work * (e.g. the shell can't be executed) we explicitely set it to 0 to be * sure we don't catch any older errno value. */ @@ -210,7 +217,7 @@ if (sendmail) { #ifndef PHP_WIN32 if (EACCES == errno) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary '%s'", sendmail_path); pclose(sendmail); return 0; } @@ -239,7 +246,7 @@ return 1; } } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not execute mail delivery program"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not execute mail delivery program '%s'", sendmail_path); return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard mail.c
iliaa Wed Aug 27 19:53:31 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard mail.c Log: MFH: mail.c r1.74 Index: php-src/ext/standard/mail.c diff -u php-src/ext/standard/mail.c:1.66.2.5 php-src/ext/standard/mail.c:1.66.2.6 --- php-src/ext/standard/mail.c:1.66.2.5Wed May 7 16:32:28 2003 +++ php-src/ext/standard/mail.c Wed Aug 27 19:53:31 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mail.c,v 1.66.2.5 2003/05/07 20:32:28 pollita Exp $ */ +/* $Id: mail.c,v 1.66.2.6 2003/08/27 23:53:31 iliaa Exp $ */ #include #include @@ -195,6 +195,13 @@ #ifdef PHP_WIN32 sendmail = popen(sendmail_cmd, "wb"); #else + /* make sure that sendmail_path contains a valid executable, failure to do +* would make PHP abruptly exit without a useful error message. */ + if (access(sendmail_path, X_OK)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary '%s'", sendmail_path); + return 0; + } + /* Since popen() doesn't indicate if the internal fork() doesn't work * (e.g. the shell can't be executed) we explicitely set it to 0 to be * sure we don't catch any older errno value. */ @@ -207,7 +214,7 @@ if (sendmail) { #ifndef PHP_WIN32 if (EACCES == errno) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary '%s'", sendmail_path); pclose(sendmail); return 0; } @@ -236,7 +243,7 @@ return 1; } } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not execute mail delivery program"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not execute mail delivery program '%s'", sendmail_path); return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h
abies Wed Aug 27 18:55:06 2003 EDT Modified files: /php-src/ext/interbase interbase.c php_interbase.h Log: Do not reuse data structure for ibase_execute() results. Invalidate the results whose statement handle has been invalidated. # EXEC PROCEDURE results don't need a statement handle, so # the result doesn't have to be invalidated. Fixed some add_{index|assoc}_*() bogosity Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.160 php-src/ext/interbase/interbase.c:1.161 --- php-src/ext/interbase/interbase.c:1.160 Wed Aug 20 18:59:33 2003 +++ php-src/ext/interbase/interbase.c Wed Aug 27 18:55:05 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: interbase.c,v 1.160 2003/08/20 22:59:33 abies Exp $ */ +/* $Id: interbase.c,v 1.161 2003/08/27 22:55:05 abies Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -42,10 +42,11 @@ #define SQL_DIALECT_CURRENT SQL_DIALECT_V5 #endif -#ifdef ZEND_DEBUG -/* #define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__); */ -#define IBDEBUG(a) -#else +#ifdef ZEND_DEBUG_ +#define IBDEBUG(a) php_printf("::: %s (%d)\n", a, __LINE__); +#endif + +#ifndef IBDEBUG #define IBDEBUG(a) #endif @@ -57,11 +58,24 @@ #define LL_MASK "ll" #endif -#define BLOB_ID_LEN 18 -#define BLOB_ID_MASK "0x%" LL_MASK "x" +#define QUERY_RESULT 1 +#define EXECUTE_RESULT 2 + +#define ROLLBACK 0 +#define COMMIT 1 +#define RETAIN 2 -#define BLOB_INPUT 1 -#define BLOB_OUTPUT 2 +#define FETCH_ROW 1 +#define FETCH_ARRAY2 + +#define BLOB_ID_LEN18 +#define BLOB_ID_MASK "0x%" LL_MASK "x" + +#define BLOB_INPUT 1 +#define BLOB_OUTPUT2 + +#define BLOB_CLOSE 1 +#define BLOB_CANCEL2 /* {{{ extension definition structures */ function_entry ibase_functions[] = { @@ -230,6 +244,11 @@ char *tpb_ptr; } ISC_TEB; +typedef struct { + ISC_USHORT vary_length; + char vary_string[1]; +} IBVARY; + /* Fill ib_link and trans with the correct database link and transaction. */ static void _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAMETERS, zval **link_id, ibase_db_link **ib_link, ibase_trans **trans) @@ -298,7 +317,7 @@ /* shortcut for most common case */ if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) { - sprintf(result, BLOB_ID_MASK, *(ISC_UINT64*) &qd); + sprintf(result, BLOB_ID_MASK, *(ISC_UINT64*)(void *) &qd); } else { ISC_UINT64 res = ((ISC_UINT64) qd.gds_quad_high << 0x20) | qd.gds_quad_low; sprintf(result, BLOB_ID_MASK, res); @@ -346,7 +365,7 @@ */ static void _php_ibase_commit_link(ibase_db_link *link TSRMLS_DC) { - int i = 0, j; + unsigned short i = 0, j; ibase_tr_list *l; IBDEBUG("Checking transactions to close..."); @@ -433,9 +452,9 @@ ibase_result *ib_result = (ibase_result *) rsrc->ptr; IBDEBUG("Freeing result by dtor..."); - if (ib_result && ib_result->query == NULL) { /* doesn't belong to a query */ + if (ib_result) { _php_ibase_free_xsqlda(ib_result->out_sqlda); - if (ib_result->stmt) { + if (ib_result->stmt && ib_result->type != EXECUTE_RESULT) { IBDEBUG("Dropping statement handle (free_result dtor)..."); isc_dsql_free_statement(IB_STATUS, &ib_result->stmt, DSQL_drop); } @@ -460,14 +479,6 @@ } if (ib_query->stmt) { IBDEBUG("Dropping statement handle (free_query)..."); - if (ib_query->result) { - _php_ibase_free_xsqlda(ib_query->result->out_sqlda); - - if (ib_query->result->out_array) { - efree(ib_query->result->out_array); - } - efree(ib_query->result); - } if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)) { _php_ibase_error(TSRMLS_C); } @@ -487,10 +498,16 @@ /* {{{ php_ibase_free_query_rsrc() */ static void php_ibase_free_query_rsrc(zend_rsrc_list_entry *rsrc TSRMLS_DC) { - if (rsrc->ptr != NULL) { + ibase_query *ib_query = (ibase_query *)rsrc->ptr; + + if (ib_query != NULL) { IBDEBUG("Preparing to free query by dtor..."); - _php_ibase_free_query((ibase_query *)rsrc->ptr TSRMLS_CC); - efree(rsrc->ptr); + + _php_ibase_free_query(ib_query TSRMLS_CC); + if (ib_query->statement_type != isc_info_sql_stmt_exec_procedure) { + zend_list_delete(ib_query->result_res_id); + } + efree(ib_query); } } /* }}} */ @@ -514,7 +531,7 @@ static v