[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Thu Jan 30 20:33:19 2003 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.158 ZendEngine2/ChangeLog:1.159 --- ZendEngine2/ChangeLog:1.158 Wed Jan 29 20:32:27 2003 +++ ZendEngine2/ChangeLog Thu Jan 30 20:33:19 2003 @@ -1,3 +1,19 @@ +2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* zend_operators.c: + Fixed compiler warning regarding signed/unsigned int comparisons. + +2003-01-30 Harald Radi [EMAIL PROTECTED] + +* zend_ts_hash.c + zend_ts_hash.h: + fix non-zts build for wez + +2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* zend_execute_API.c: + Fix ZTS build. + 2003-01-29 Stanislav Malyshev [EMAIL PROTECTED] * zend_compile.h
[PHP-CVS] cvs: embed /php-irssi genobjdefs.php
wez Thu Jan 30 04:45:04 2003 EDT Modified files: /embed/php-irssigenobjdefs.php Log: Generate for the NICK record too. Index: embed/php-irssi/genobjdefs.php diff -u embed/php-irssi/genobjdefs.php:1.1 embed/php-irssi/genobjdefs.php:1.2 --- embed/php-irssi/genobjdefs.php:1.1 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/genobjdefs.php Thu Jan 30 04:45:04 2003 @@ -15,7 +15,7 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: genobjdefs.php,v 1.1 2003/01/30 09:04:35 wez Exp $ + $Id: genobjdefs.php,v 1.2 2003/01/30 09:45:04 wez Exp $ */ /* We build three sets of tables: @@ -30,6 +30,7 @@ $objects_to_scan = array( src/core/server-rec.h = array(SERVER_REC, server), src/core/channel-rec.h= array(CHANNEL_REC, channel), + src/core/nick-rec.h= array(NICK_REC, nick), ); $obj_bind = array(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi nick.c
wez Thu Jan 30 04:57:22 2003 EDT Modified files: /embed/php-irssinick.c Log: More NICK stuff Index: embed/php-irssi/nick.c diff -u embed/php-irssi/nick.c:1.1 embed/php-irssi/nick.c:1.2 --- embed/php-irssi/nick.c:1.1 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/nick.c Thu Jan 30 04:57:18 2003 @@ -14,10 +14,27 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: nick.c,v 1.1 2003/01/30 09:04:35 wez Exp $ + $Id: nick.c,v 1.2 2003/01/30 09:57:18 wez Exp $ */ #include php-irssi.h /* -- Nick functions */ + +void *php_irssi_resolve_to_NICK_REC(struct php_irssi_obj_ref *ref) +{ + SERVER_REC *server = NULL; + CHANNEL_REC *channel = NULL; + + server = server_find_tag(ref-idents[IDX_SERVER]); + channel = channel_find(server, ref-idents[IDX_CHANNEL]); + + if (channel == NULL) { + return NULL; + } + + return nicklist_find(channel, ref-idents[IDX_NICK]); + +} + NICK_REC *map_nick(zval *object, CHANNEL_REC **channel TSRMLS_DC) { struct php_irssi_obj_ref *ref; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi genobjdefs.php gensignals.php php-irssi-obj.c php-irssi.h typemap.php
wez Thu Jan 30 07:12:21 2003 EDT Modified files: /embed/php-irssigenobjdefs.php gensignals.php php-irssi-obj.c php-irssi.h typemap.php Log: Return a vestigal class entry for non-ZE2 aware code. Expose the php module signals to php scripts. Some refinements to the code generator scripts. Index: embed/php-irssi/genobjdefs.php diff -u embed/php-irssi/genobjdefs.php:1.2 embed/php-irssi/genobjdefs.php:1.3 --- embed/php-irssi/genobjdefs.php:1.2 Thu Jan 30 04:45:04 2003 +++ embed/php-irssi/genobjdefs.php Thu Jan 30 07:12:20 2003 @@ -15,7 +15,7 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: genobjdefs.php,v 1.2 2003/01/30 09:45:04 wez Exp $ + $Id: genobjdefs.php,v 1.3 2003/01/30 12:12:20 wez Exp $ */ /* We build three sets of tables: @@ -27,12 +27,6 @@ */ $top_srcdir = realpath($argv[1]); -$objects_to_scan = array( - src/core/server-rec.h = array(SERVER_REC, server), - src/core/channel-rec.h= array(CHANNEL_REC, channel), - src/core/nick-rec.h= array(NICK_REC, nick), - ); - $obj_bind = array(); include typemap.php; Index: embed/php-irssi/gensignals.php diff -u embed/php-irssi/gensignals.php:1.2 embed/php-irssi/gensignals.php:1.3 --- embed/php-irssi/gensignals.php:1.2 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/gensignals.php Thu Jan 30 07:12:20 2003 @@ -15,7 +15,7 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: gensignals.php,v 1.2 2003/01/30 09:04:35 wez Exp $ + $Id: gensignals.php,v 1.3 2003/01/30 12:12:20 wez Exp $ */ /* Generate signal information from the signals.txt file in the docs @@ -25,23 +25,20 @@ echo static struct php_irssi_signal_args php_irssi_sig_args_table[] = {\n; -while (!feof(STDIN)) { - $line = fgets(STDIN); - if ($line === false) - break; - +function read_signal($line) +{ if (!preg_match('/^ ([^]+)(.*)?,\s*(.*)/', $line, $matches)) - continue; + return; if (strpos($line, '...') || strpos($line, '(')) - continue; + return; $signal = $matches[1]; $thing = $matches[2]; if ($thing) - continue; - + return; + $args = explode(, , $matches[3]); $ok = true; @@ -53,13 +50,39 @@ if ($ok) $record[] = $handler; else - break; + return; } if ($ok) { echo { \$signal\, 0, . count($record) . , { . implode(,, $record) . } },\n; } } + +while (!feof(STDIN)) { + $line = fgets(STDIN); + if ($line === false) + break; + + read_signal($line); +} + +/* signals provided by the php module itself. + * the php error signal is dangerous to bind to php code as there + * is a high potential of infinite loops. + * We don't list php unloaded as there is no PHP around to + * handle that event at that time... + */ + +$php_signals = EOD + php output, char *data + php error, char *data + php unloading +EOD; + +foreach (explode(\n, $php_signals) as $line) { + read_signal($line); +} + echo { NULL, 0, 0 }\n};\n; Index: embed/php-irssi/php-irssi-obj.c diff -u embed/php-irssi/php-irssi-obj.c:1.1 embed/php-irssi/php-irssi-obj.c:1.2 --- embed/php-irssi/php-irssi-obj.c:1.1 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/php-irssi-obj.c Thu Jan 30 07:12:20 2003 @@ -14,11 +14,13 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: php-irssi-obj.c,v 1.1 2003/01/30 09:04:35 wez Exp $ + $Id: php-irssi-obj.c,v 1.2 2003/01/30 12:12:20 wez Exp $ */ #include php-irssi.h #include php-irssi-obj-defs.h +static zend_class_entry php_irssi_ce; + void *php_irssi_resolve_to_SERVER_REC(struct php_irssi_obj_ref *ref) { return server_find_tag(ref-idents[IDX_SERVER]); @@ -63,7 +65,7 @@ ZVAL_NULL(val); } *rval = val; - ZVAL_DELREF(val); + /* ZVAL_DELREF(val); */ } @@ -148,6 +150,11 @@ return NULL; } +static zend_class_entry *pih_get_class(zval *object TSRMLS_DC) +{ + return php_irssi_ce; +} + static int pih_get_class_name(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) { struct php_irssi_obj_ref *ref = zend_object_store_get_object(object TSRMLS_CC); @@ -182,7
[PHP-CVS] cvs: embed /php-irssi README
wez Thu Jan 30 07:25:08 2003 EDT Modified files: /embed/php-irssiREADME Log: Slight clarification. # I'm not too bothered with this at this stage! Index: embed/php-irssi/README diff -u embed/php-irssi/README:1.3 embed/php-irssi/README:1.4 --- embed/php-irssi/README:1.3 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/README Thu Jan 30 07:25:08 2003 @@ -1,5 +1,6 @@ README --- +$Id: README,v 1.4 2003/01/30 12:25:08 wez Exp $ You need: @@ -19,7 +20,9 @@ patch path/to/irssi.diff -Now mv this dir into irssi/src/, +Now mv *this* dir into irssi/src/, + +mv embed/php-irssi irssi/src/php-irssi and from the top irssi dir; @@ -27,7 +30,7 @@ To use: -cd irssi/src/php make install +cd irssi/src/php-irssi make install irssi At the irssi prompt: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi php-core.c
wez Thu Jan 30 07:25:39 2003 EDT Modified files: /embed/php-irssiphp-core.c Log: Remove my name from a callback function... Index: embed/php-irssi/php-core.c diff -u embed/php-irssi/php-core.c:1.2 embed/php-irssi/php-core.c:1.3 --- embed/php-irssi/php-core.c:1.2 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/php-core.c Thu Jan 30 07:25:39 2003 @@ -14,7 +14,7 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: php-core.c,v 1.2 2003/01/30 09:04:35 wez Exp $ + $Id: php-core.c,v 1.3 2003/01/30 12:25:39 wez Exp $ */ #define MODULE_NAME php/core #include common.h @@ -47,7 +47,7 @@ /* output to irssi crap output. * TODO: this should line-buffer the output */ -static int wez_ub_write(const char *str, unsigned int str_length TSRMLS_DC) +static int ub_write(const char *str, unsigned int str_length TSRMLS_DC) { signal_emit_id(signal_php_output, 2, str, str_length); return SUCCESS; @@ -104,7 +104,7 @@ static char *argv[2] = {irssi, NULL}; /* override PHP/ZE output */ - php_embed_module.ub_write = wez_ub_write; + php_embed_module.ub_write = ub_write; php_embed_module.log_message = log_message; php_embed_module.sapi_error = sapi_error; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi README
wez Thu Jan 30 07:31:45 2003 EDT Modified files: /embed/php-irssiREADME Log: Try and keep edin happy Index: embed/php-irssi/README diff -u embed/php-irssi/README:1.4 embed/php-irssi/README:1.5 --- embed/php-irssi/README:1.4 Thu Jan 30 07:25:08 2003 +++ embed/php-irssi/README Thu Jan 30 07:31:45 2003 @@ -1,6 +1,6 @@ README --- -$Id: README,v 1.4 2003/01/30 12:25:08 wez Exp $ +$Id: README,v 1.5 2003/01/30 12:31:45 wez Exp $ You need: @@ -28,9 +28,10 @@ ./autogen.sh --without-perl --with-php +make install + To use: -cd irssi/src/php-irssi make install irssi At the irssi prompt: @@ -46,5 +47,14 @@ /php include /path/to/script; + +To Hack: + +cd irssi/src/php-irssi +vi ... +make install + +(you only need to make install the module from this point onwards, unless +you change part of irssi itself). vim:tw=78:et -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi/examples users.php
tal Thu Jan 30 08:58:22 2003 EDT Added files: /embed/php-irssi/examples users.php Log: First example of php-irssi Index: embed/php-irssi/examples/users.php +++ embed/php-irssi/examples/users.php ?php //This script outputs a list of servers, channels and users in each channel //usage: /php include('/path/to/users.php'); $servers = irssi_server_list(); foreach ($servers as $server) { echo $server-tag.':'; $channels = $server-get_channels(); foreach ($channels as $channel) { echo ' '.$channel-name.':'; $nicks = $channel-get_nicks(); foreach ($nicks as $nick) { echo ''.$nick-nick; } } } ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi channel.c ext-irssi.c genobjdefs.php nick.c php-irssi-obj.c php-irssi.h server.c typemap.php /php-irssi/examples users.php
wez Thu Jan 30 10:42:49 2003 EDT Modified files: /embed/php-irssichannel.c ext-irssi.c genobjdefs.php nick.c php-irssi-obj.c php-irssi.h server.c typemap.php /embed/php-irssi/examples users.php Log: Generate more properties. Remove hand-coded property accessors. Update examples. Index: embed/php-irssi/channel.c diff -u embed/php-irssi/channel.c:1.1 embed/php-irssi/channel.c:1.2 --- embed/php-irssi/channel.c:1.1 Thu Jan 30 04:04:35 2003 +++ embed/php-irssi/channel.c Thu Jan 30 10:42:47 2003 @@ -14,9 +14,12 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: channel.c,v 1.1 2003/01/30 09:04:35 wez Exp $ + $Id: channel.c,v 1.2 2003/01/30 15:42:47 wez Exp $ */ #include php-irssi.h +#define PHP_IRSSI_PROTOS_ONLY +#include php-irssi-obj-defs.h + /* -- Channel functions */ /* Given a channel record, create a channel object */ @@ -50,28 +53,35 @@ return channel_find(server, ref-idents[IDX_CHANNEL]); } +/* Handle property reads */ -/* Returns an array of nick objects corresponding to each person on this channel */ -PHP_FUNCTION(channel_get_nicks) +int php_irssi_CHANNEL_REC_prop_reader(char *member, int type, zval **retval, void +*obj TSRMLS_DC) { - GSList *list, *tmp; - zval *obj; - CH_FETCH(); - - list = nicklist_getnicks(channel); - array_init(return_value); + PHP_IRSSI_CHANNEL_REC_PROP_READER_HEAD(); - if (list) { - for (tmp = list; tmp != NULL; tmp = tmp-next) { - MAKE_STD_ZVAL(obj); - php_irssi_export_NICK(obj, channel, (NICK_REC*)tmp-data); - add_next_index_zval(return_value, obj); + if (strcmp(member, nicks) == 0) { + GSList *list, *tmp; + zval *zobj; + + list = nicklist_getnicks(channel); + array_init(*retval); + + if (list) { + for (tmp = list; tmp != NULL; tmp = tmp-next) { + MAKE_STD_ZVAL(zobj); + php_irssi_export_NICK(zobj, channel, +(NICK_REC*)tmp-data); + add_next_index_zval(*retval, zobj); + } + g_slist_free(list); } - g_slist_free(list); + return SUCCESS; + } - + + PHP_IRSSI_CHANNEL_REC_PROP_READER_FOOT(); } + PHP_FUNCTION(channel_nick_find) { char *nick; @@ -111,79 +121,6 @@ } else { RETURN_NULL(); } - -} - -PHP_FUNCTION(channel_get_name) -{ - CH_FETCH(); - - RETURN_STRING(channel-name, 1); -} - -PHP_FUNCTION(channel_get_topic) -{ - CH_FETCH(); - - RETURN_STRING(channel-topic, 1); -} - -PHP_FUNCTION(channel_get_topic_by) -{ - CH_FETCH(); - - RETURN_STRING(channel-topic_by, 1); -} - -PHP_FUNCTION(channel_get_modes) -{ - CH_FETCH(); - - array_init(return_value); - - add_assoc_bool(return_value, no_modes, channel-no_modes); - add_assoc_long(return_value, limit, channel-limit); - if (channel-mode) - add_assoc_string(return_value, mode, channel-mode, 1); - else - add_assoc_null(return_value, mode); - - if (channel-key) - add_assoc_string(return_value, key, channel-key, 1); - else - add_assoc_null(return_value, key); - -} - -PHP_FUNCTION(channel_get_status) -{ - CH_FETCH(); - - array_init(return_value); - - add_assoc_bool(return_value, chanop, channel-chanop); - add_assoc_bool(return_value, names_got, channel-names_got); - add_assoc_bool(return_value, wholist, channel-wholist); - add_assoc_bool(return_value, synced, channel-synced); - add_assoc_bool(return_value, joined, channel-joined); - add_assoc_bool(return_value, left, channel-left); - add_assoc_bool(return_value, kicked, channel-kicked); - add_assoc_bool(return_value, session_rejoin, channel-session_rejoin); - add_assoc_bool(return_value, destroying, channel-destroying); -} - -PHP_FUNCTION(channel_get_own_nick) -{ - CH_FETCH(); - - php_irssi_export_NICK(return_value, channel, channel-ownnick); -} - -PHP_FUNCTION(channel_get_server) -{ - CH_FETCH(); - - php_irssi_export_SERVER(return_value, channel-server TSRMLS_CC); } PHP_FUNCTION(channel_send) @@ -201,16 +138,8 @@ } function_entry php_irssi_CHANNEL_funcs[] = { - PHP_NAMED_FE(get_nicks, PHP_FN(channel_get_nicks), NULL) PHP_NAMED_FE(nick_find, PHP_FN(channel_nick_find), NULL) PHP_NAMED_FE(nick_find_mask, PHP_FN(channel_nick_find_mask), NULL) -
[PHP-CVS] cvs: php4 /ext/dba config.m4
helly Thu Jan 30 13:28:42 2003 EDT Modified files: /php4/ext/dba config.m4 Log: Allow to link against chosen modules correctly Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.38 php4/ext/dba/config.m4:1.39 --- php4/ext/dba/config.m4:1.38 Tue Jan 28 05:55:36 2003 +++ php4/ext/dba/config.m4 Thu Jan 30 13:28:42 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.38 2003/01/28 10:55:36 sniper Exp $ +dnl $Id: config.m4,v 1.39 2003/01/30 18:28:42 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -10,7 +10,8 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS - LDFLAGS=$1 $LDFLAGS +dnl LDFLAGS=$1 $LDFLAGS + LDFLAGS=$1 $2 LDFLAGS=$old_LDFLAGS ]) @@ -139,18 +140,20 @@ dnl parameters(version, library list, function) AC_DEFUN(PHP_DBA_DB_CHECK,[ for LIB in $2; do -PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ - AC_CHECK_LIB($LIB, $3, [ -AC_EGREP_CPP(yes,[ +if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f +$THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then + PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ +AC_CHECK_LIB($LIB, $3, [ + AC_EGREP_CPP(yes,[ #include $THIS_INCLUDE yes #endif -],[ - THIS_LIBS=$LIB - break + ],[ +THIS_LIBS=$LIB +break + ]) ]) ]) -]) +fi done if test $1 = 4; then AC_MSG_CHECKING(for db4 minor version and patch level) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/dba config.m4
helly Thu Jan 30 13:31:36 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/dba config.m4 Log: MFH: Allow to link against chosen modules correctly Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.29.2.7 php4/ext/dba/config.m4:1.29.2.8 --- php4/ext/dba/config.m4:1.29.2.7 Tue Jan 28 10:00:15 2003 +++ php4/ext/dba/config.m4 Thu Jan 30 13:31:36 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29.2.7 2003/01/28 15:00:15 sniper Exp $ +dnl $Id: config.m4,v 1.29.2.8 2003/01/30 18:31:36 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -10,7 +10,8 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS - LDFLAGS=$1 $LDFLAGS +dnl LDFLAGS=$1 $LDFLAGS + LDFLAGS=$1 $2 LDFLAGS=$old_LDFLAGS ]) @@ -139,18 +140,20 @@ dnl parameters(version, library list, function) AC_DEFUN(PHP_DBA_DB_CHECK,[ for LIB in $2; do -PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ - AC_CHECK_LIB($LIB, $3, [ -AC_EGREP_CPP(yes,[ +if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f +$THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then + PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ +AC_CHECK_LIB($LIB, $3, [ + AC_EGREP_CPP(yes,[ #include $THIS_INCLUDE yes #endif -],[ - THIS_LIBS=$LIB - break + ],[ +THIS_LIBS=$LIB +break + ]) ]) ]) -]) +fi done if test $1 = 4; then AC_MSG_CHECKING(for db4 minor version and patch level) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: embed /php-irssi README
Please make these commit emails go someplace else.. --Jani On Wed, 29 Jan 2003, Sterling Hughes wrote: sterling Wed Jan 29 13:49:13 2003 EDT Modified files: /embed/php-irssi README Log: testing Index: embed/php-irssi/README diff -u embed/php-irssi/README:1.1.1.1 embed/php-irssi/README:1.2 --- embed/php-irssi/README:1.1.1.1 Wed Jan 29 13:42:35 2003 +++ embed/php-irssi/README Wed Jan 29 13:49:13 2003 @@ -1,3 +1,6 @@ +README +--- + You need: o PHP 4.3.1-dev or higher, with sapi/embed and an installed php cli binary -- - For Sale! - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
configure: error: cannot find necessary library You need to reset the LIBS too.. --Jani On Thu, 30 Jan 2003, Marcus Börger wrote: At 00:04 30.01.2003, Marcus Börger wrote: At 11:55 28.01.2003, Jani Taskinen wrote: sniper Tue Jan 28 05:55:36 2003 EDT Modified files: /php4/ext/dba config.m4 Log: Fix configure. (typo?) It didn't notice that...it's from my test version where i could need some help but currently i am not at all knowing the problem really... marcus Ok, one part of my problem is linking against a special version while having multiple versions of say db3. The following works for. Does it work for you, too? (Now it is *no* type) cvs -z3 -q diff config.m4 (in directory S:\php4-HEAD\ext\dba) Index: config.m4 === RCS file: /repository/php4/ext/dba/config.m4,v retrieving revision 1.38 diff -u -r1.38 config.m4 --- config.m4 28 Jan 2003 10:55:36 - 1.38 +++ config.m4 30 Jan 2003 00:47:29 - @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.38 2003/01/28 10:55:36 sniper Exp $ +dnl $Id: config.m4,v 1.29.2.6 2003/01/28 06:27:19 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -10,7 +10,8 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS - LDFLAGS=$1 $LDFLAGS +dnl LDFLAGS=$1 $LDFLAGS + LDFLAGS=$1 $2 LDFLAGS=$old_LDFLAGS ]) @@ -139,18 +140,20 @@ dnl parameters(version, library list, function) AC_DEFUN(PHP_DBA_DB_CHECK,[ for LIB in $2; do -PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ - AC_CHECK_LIB($LIB, $3, [ -AC_EGREP_CPP(yes,[ +if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then + PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ +AC_CHECK_LIB($LIB, $3, [ + AC_EGREP_CPP(yes,[ #include $THIS_INCLUDE yes #endif -],[ - THIS_LIBS=$LIB - break + ],[ +THIS_LIBS=$LIB +break + ]) ]) ]) -]) +fi done if test $1 = 4; then AC_MSG_CHECKING(for db4 minor version and patch level) -- - For Sale! - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
Why? I thought when trying to link with only the new libraries i could test them alone. On which library did it fail for you? And if i reset LIBS what is the complete difference? marcus At 19:37 30.01.2003, Jani Taskinen wrote: configure: error: cannot find necessary library You need to reset the LIBS too.. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: embed /php-irssi php-core.c
tal Thu Jan 30 13:52:30 2003 EDT Modified files: /embed/php-irssiphp-core.c Log: Set the include path to irssi's scripts dirs on startup Index: embed/php-irssi/php-core.c diff -u embed/php-irssi/php-core.c:1.4 embed/php-irssi/php-core.c:1.5 --- embed/php-irssi/php-core.c:1.4 Thu Jan 30 07:51:30 2003 +++ embed/php-irssi/php-core.c Thu Jan 30 13:52:29 2003 @@ -14,7 +14,7 @@ +--+ | Author: Wez Furlong [EMAIL PROTECTED]| +--+ - $Id: php-core.c,v 1.4 2003/01/30 12:51:30 wez Exp $ + $Id: php-core.c,v 1.5 2003/01/30 18:52:29 tal Exp $ */ #define MODULE_NAME php/core #include common.h @@ -121,8 +121,6 @@ /* register the irssi extension */ zend_startup_module(php_irssi_module_entry); - - } static void fini_php(void) @@ -204,7 +202,9 @@ signal_add(php error, (SIGNAL_FUNC)error_handler); command_bind(php, NULL, (SIGNAL_FUNC)cmd_php); - + + php_eval_string(php/irssi:init, set_include_path('%s/scripts:%s');, +get_irssi_dir(), SCRIPTDIR); + if (irssi_init_finished) { /* if the module is being loaded manually execute autorun directly */ do_autorun(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/dba config.m4
On Thu, 30 Jan 2003, Marcus Börger wrote: Why? I thought when trying to link with only the new libraries i could test them alone. On which library did it fail for you? And if i reset LIBS what is the complete difference? Now you reset LDFLAGS, which contains all the -L/path/to/lib definitions. But you leave LIBS alone, which is still used in the test - test fails because libssl is not found.. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec
sniper Thu Jan 30 14:30:36 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/informix ifx.ec Log: MFH: fix bug: #21945 (zts build failed) Index: php4/ext/informix/ifx.ec diff -u php4/ext/informix/ifx.ec:1.69.2.4 php4/ext/informix/ifx.ec:1.69.2.5 --- php4/ext/informix/ifx.ec:1.69.2.4 Wed Jan 29 14:33:55 2003 +++ php4/ext/informix/ifx.ecThu Jan 30 14:30:33 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: ifx.ec,v 1.69.2.4 2003/01/29 19:33:55 iliaa Exp $ */ +/* $Id: ifx.ec,v 1.69.2.5 2003/01/30 19:30:33 sniper Exp $ */ /* --- * if you want a function reference : grep '^\*\*' ifx.ec will give @@ -80,11 +80,11 @@ static long php_intifx_update_char(long bid, char* param, long len, HashTable *list TSRMLS_DC); static long php_intifx_get_char(long bid, HashTable *list, char** content TSRMLS_DC); #if HAVE_IFX_IUS -static long php_intifxus_create_slob(long create_mode, HashTable *list); +static long php_intifxus_create_slob(long create_mode, HashTable *list TSRMLS_DC); static long php_intifxus_free_slob(long bid, HashTable *list TSRMLS_DC); static long php_intifxus_close_slob(long bid, HashTable *list TSRMLS_DC); static long php_intifxus_open_slob(long bid, long create_mode, HashTable *list TSRMLS_DC); -static long php_intifxus_new_slob(HashTable *list); +static long php_intifxus_new_slob(HashTable *list TSRMLS_DC); static ifx_lo_t *php_intifxus_get_slobloc(long bid, HashTable *list TSRMLS_DC); #endif @@ -1020,7 +1020,7 @@ } $ifdef HAVE_IFX_IUS; if(fieldtype==SQLUDTFIXED) { - bid=php_intifxus_new_slob(EG(regular_list)); + bid = php_intifxus_new_slob(EG(regular_list) +TSRMLS_CC); slocator=php_intifxus_get_slobloc(bid,EG(regular_list) TSRMLS_CC); EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*slocator; } @@ -1432,7 +1432,7 @@ } $ifdef HAVE_IFX_IUS; if(fieldtype==SQLUDTFIXED) { - bid=php_intifxus_new_slob(EG(regular_list)); + bid=php_intifxus_new_slob(EG(regular_list) +TSRMLS_CC); slocator=php_intifxus_get_slobloc(bid,EG(regular_list) TSRMLS_CC); EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*slocator; } @@ -1857,7 +1857,7 @@ case SQLUDTFIXED : bid_b=Ifx_Result-res_id[locind]; add_assoc_long(return_value,fieldname,bid_b); - bid=php_intifxus_new_slob(EG(regular_list)); + bid=php_intifxus_new_slob(EG(regular_list) TSRMLS_CC); slocator=php_intifxus_get_slobloc(bid,EG(regular_list) TSRMLS_CC); EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*slocator; Ifx_Result-res_id[locind]=bid; @@ -3739,7 +3739,7 @@ if((mode32) !=0) create_mode|=LO_NOBUFFER; - id=php_intifxus_create_slob(create_mode,EG(regular_list)); + id = php_intifxus_create_slob(create_mode, EG(regular_list) TSRMLS_CC); if(id 0) { RETURN_FALSE; @@ -3987,14 +3987,14 @@ /* -- * internal function - * long php_intifxus_new_slob(HashTable *list) + * long php_intifxus_new_slob(HashTable *list TSRMLS_DC) * * creates an slob-object but don't open it * list: internal hashlist of php * return -1 on error otherwise the new slob-Object-id * -- */ -static long php_intifxus_new_slob(HashTable *list) +static long php_intifxus_new_slob(HashTable *list TSRMLS_DC) { IFX_IDRES *Ifx_slob; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard string.c
pollita Thu Jan 30 15:09:20 2003 EDT Modified files: /php4/ext/standard string.c Log: Unify str_replace and str_ireplace using INTERNAL_FUNCTION_PARAM_PASSTHRU -- reduce codebase/maintenance complexity Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.352 php4/ext/standard/string.c:1.353 --- php4/ext/standard/string.c:1.352Thu Jan 30 00:00:41 2003 +++ php4/ext/standard/string.c Thu Jan 30 15:09:19 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.352 2003/01/30 05:00:41 pollita Exp $ */ +/* $Id: string.c,v 1.353 2003/01/30 20:09:19 pollita Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2887,9 +2887,9 @@ } /* }}} */ -/* {{{ proto mixed str_replace(mixed search, mixed replace, mixed subject) - Replaces all occurrences of search in haystack with replace */ -PHP_FUNCTION(str_replace) +/* {{{ php_str_replace_common + */ +static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensitivity) { zval **subject, **search, **replace, **subject_entry; zval *result; @@ -2923,7 +2923,7 @@ and add the result to the return_value array. */ while (zend_hash_get_current_data(Z_ARRVAL_PP(subject), (void **)subject_entry) == SUCCESS) { MAKE_STD_ZVAL(result); - php_str_replace_in_subject(*search, *replace, subject_entry, result, 1); + php_str_replace_in_subject(*search, *replace, subject_entry, +result, case_sensitivity); /* Add to return array */ switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(subject), string_key, string_key_len, num_key, 0, NULL)) { @@ -2939,65 +2939,24 @@ zend_hash_move_forward(Z_ARRVAL_PP(subject)); } } else {/* if subject is not an array */ - php_str_replace_in_subject(*search, *replace, subject, return_value, 1); + php_str_replace_in_subject(*search, *replace, subject, return_value, +case_sensitivity); } } /* }}} */ +/* {{{ proto mixed str_replace(mixed search, mixed replace, mixed subject) + Replaces all occurrences of search in haystack with replace */ +PHP_FUNCTION(str_replace) +{ + php_str_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + /* {{{ proto mixed str_ireplace(mixed search, mixed replace, mixed subject) Replaces all occurrences of search in haystack with replace / case-insensitive */ PHP_FUNCTION(str_ireplace) { - zval **subject, **search, **replace, **subject_entry; - zval *result; - char *string_key; - uint string_key_len; - ulong num_key; - - if (ZEND_NUM_ARGS() != 3 || - zend_get_parameters_ex(3, search, replace, subject) == FAILURE) { - WRONG_PARAM_COUNT; - } - - SEPARATE_ZVAL(search); - SEPARATE_ZVAL(replace); - SEPARATE_ZVAL(subject); - - /* Make sure we're dealing with strings and do the replacement. */ - if (Z_TYPE_PP(search) != IS_ARRAY) { - convert_to_string_ex(search); - convert_to_string_ex(replace); - } else if (Z_TYPE_PP(replace) != IS_ARRAY) { - convert_to_string_ex(replace); - } - - /* if subject is an array */ - if (Z_TYPE_PP(subject) == IS_ARRAY) { - array_init(return_value); - zend_hash_internal_pointer_reset(Z_ARRVAL_PP(subject)); - - /* For each subject entry, convert it to string, then perform replacement - and add the result to the return_value array. */ - while (zend_hash_get_current_data(Z_ARRVAL_PP(subject), (void **)subject_entry) == SUCCESS) { - MAKE_STD_ZVAL(result); - php_str_replace_in_subject(*search, *replace, subject_entry, result, 0); - /* Add to return array */ - switch (zend_hash_get_current_key_ex(Z_ARRVAL_PP(subject), string_key, - string_key_len, num_key, 0, NULL)) { - case HASH_KEY_IS_STRING: - add_assoc_zval_ex(return_value, string_key, string_key_len, result); - break; - - case HASH_KEY_IS_LONG: - add_index_zval(return_value, num_key, result); - break; - } - - zend_hash_move_forward(Z_ARRVAL_PP(subject)); - } - } else {/* if subject is not an
[PHP-CVS] cvs: php4 /main streams.c
sas Thu Jan 30 16:06:35 2003 EDT Modified files: /php4/main streams.c Log: Fix sticky EOF problem Sometimes streams signal a temporary EOF, because all current data has been consumed. But that does not preclude the possibility that more data will become available later. Thus we must not treat eof in the read path as final. Now, tail -f like scripts work again. Index: php4/main/streams.c diff -u php4/main/streams.c:1.142 php4/main/streams.c:1.143 --- php4/main/streams.c:1.142 Mon Jan 6 18:27:03 2003 +++ php4/main/streams.c Thu Jan 30 16:06:34 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.142 2003/01/06 23:27:03 wez Exp $ */ +/* $Id: streams.c,v 1.143 2003/01/30 21:06:34 sas Exp $ */ #define _GNU_SOURCE #include php.h @@ -521,8 +521,7 @@ if (stream-writepos - stream-readpos (off_t)size) { size_t justread = 0; - if (stream-eof) - return; + /* ignore eof here; the underlying state might have changed */ /* no; so lets fetch more data */ @@ -581,7 +580,8 @@ didread += toread; } - if (size == 0 || stream-eof) { + /* ignore eof here; the underlying state might have changed */ + if (size == 0) { break; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4) /main streams.c
sas Thu Jan 30 16:10:44 2003 EDT Modified files: (Branch: PHP_4) /php4/main streams.c Log: Partial MFH: Fix sticky eof issue, and avoid calling system stat macro Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.25 php4/main/streams.c:1.125.2.25.2.1 --- php4/main/streams.c:1.125.2.25 Wed Jan 1 04:55:38 2003 +++ php4/main/streams.c Thu Jan 30 16:10:43 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.125.2.25 2003/01/01 09:55:38 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.25.2.1 2003/01/30 21:10:43 sas Exp $ */ #define _GNU_SOURCE #include php.h @@ -516,8 +516,7 @@ if (stream-writepos - stream-readpos (off_t)size) { size_t justread = 0; - if (stream-eof) - return; + /* ignore eof here; the underlying state might have changed */ /* no; so lets fetch more data */ @@ -576,7 +575,8 @@ didread += toread; } - if (size == 0 || stream-eof) { + /* ignore eof here; the underlying state might have changed */ + if (size == 0) { break; } @@ -674,7 +674,7 @@ return -1; } - return stream-ops-stat(stream, ssb TSRMLS_CC); + return (stream-ops-stat)(stream, ssb TSRMLS_CC); } PHPAPI char *php_stream_locate_eol(php_stream *stream, char *buf, size_t buf_len TSRMLS_DC) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /main streams.c
sas Thu Jan 30 16:11:29 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main streams.c Log: Partial MFH: Fix sticky eof issue, and avoid calling system stat macro Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.25 php4/main/streams.c:1.125.2.26 --- php4/main/streams.c:1.125.2.25 Wed Jan 1 04:55:38 2003 +++ php4/main/streams.c Thu Jan 30 16:11:29 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.125.2.25 2003/01/01 09:55:38 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.26 2003/01/30 21:11:29 sas Exp $ */ #define _GNU_SOURCE #include php.h @@ -516,8 +516,7 @@ if (stream-writepos - stream-readpos (off_t)size) { size_t justread = 0; - if (stream-eof) - return; + /* ignore eof here; the underlying state might have changed */ /* no; so lets fetch more data */ @@ -576,7 +575,8 @@ didread += toread; } - if (size == 0 || stream-eof) { + /* ignore eof here; the underlying state might have changed */ + if (size == 0) { break; } @@ -674,7 +674,7 @@ return -1; } - return stream-ops-stat(stream, ssb TSRMLS_CC); + return (stream-ops-stat)(stream, ssb TSRMLS_CC); } PHPAPI char *php_stream_locate_eol(php_stream *stream, char *buf, size_t buf_len TSRMLS_DC) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dba config.m4
helly Thu Jan 30 16:36:05 2003 EDT Modified files: /php4/ext/dba config.m4 Log: Revert this part, the new one adds more problems than it solves. Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.39 php4/ext/dba/config.m4:1.40 --- php4/ext/dba/config.m4:1.39 Thu Jan 30 13:28:42 2003 +++ php4/ext/dba/config.m4 Thu Jan 30 16:36:05 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.39 2003/01/30 18:28:42 helly Exp $ +dnl $Id: config.m4,v 1.40 2003/01/30 21:36:05 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -10,8 +10,7 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS -dnl LDFLAGS=$1 $LDFLAGS - LDFLAGS=$1 + LDFLAGS=$1 $LDFLAGS $2 LDFLAGS=$old_LDFLAGS ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/dba config.m4
helly Thu Jan 30 16:38:16 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/dba config.m4 Log: MFH: revert partly Index: php4/ext/dba/config.m4 diff -u php4/ext/dba/config.m4:1.29.2.8 php4/ext/dba/config.m4:1.29.2.9 --- php4/ext/dba/config.m4:1.29.2.8 Thu Jan 30 13:31:36 2003 +++ php4/ext/dba/config.m4 Thu Jan 30 16:38:15 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.29.2.8 2003/01/30 18:31:36 helly Exp $ +dnl $Id: config.m4,v 1.29.2.9 2003/01/30 21:38:15 helly Exp $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -10,8 +10,7 @@ AC_DEFUN(PHP_TEMP_LDFLAGS,[ old_LDFLAGS=$LDFLAGS -dnl LDFLAGS=$1 $LDFLAGS - LDFLAGS=$1 + LDFLAGS=$1 $LDFLAGS $2 LDFLAGS=$old_LDFLAGS ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/session session.c
iliaa Thu Jan 30 17:37:51 2003 EDT Modified files: /php4/ext/session session.c Log: Fix compiler warning. Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.349 php4/ext/session/session.c:1.350 --- php4/ext/session/session.c:1.349Fri Jan 24 18:57:32 2003 +++ php4/ext/session/session.c Thu Jan 30 17:37:50 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.349 2003/01/24 23:57:32 sas Exp $ */ +/* $Id: session.c,v 1.350 2003/01/30 22:37:50 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -678,7 +678,7 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, The ini setting hash_bits_per_character is out of range (should be 4, 5, or 6) - using 4 for now); } - j = bin_to_readable(digest, digest_len, buf, PS(hash_bits_per_character)) - buf; + j = (int) (bin_to_readable(digest, digest_len, buf, +PS(hash_bits_per_character)) - buf); if (newlen) *newlen = j; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/skeleton skeleton.dsp
fmk Thu Jan 30 20:00:44 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/skeleton skeleton.dsp Log: Adding Win32 project file Index: php4/ext/skeleton/skeleton.dsp +++ php4/ext/skeleton/skeleton.dsp -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/skeleton skeleton.php
fmk Thu Jan 30 20:01:08 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/skeleton skeleton.php Log: Allow extensions to be loaded on win32 Index: php4/ext/skeleton/skeleton.php diff -u php4/ext/skeleton/skeleton.php:1.4 php4/ext/skeleton/skeleton.php:1.4.8.1 --- php4/ext/skeleton/skeleton.php:1.4 Wed Aug 15 20:16:00 2001 +++ php4/ext/skeleton/skeleton.php Thu Jan 30 20:01:06 2003 @@ -1,6 +1,6 @@ ? if(!extension_loaded('extname')) { - dl('extname.so'); + dl('extname.' . PHP_SHLIB_SUFFIX); } $module = 'extname'; $functions = get_extension_funcs($module); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext ext_skel.php
fmk Thu Jan 30 20:01:53 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext ext_skel.php Log: Wrapper script to execute ext_skel on WIn32 Index: php4/ext/ext_skel.php +++ php4/ext/ext_skel.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext ext_skel.php
fmk Thu Jan 30 22:44:20 2003 EDT Modified files: /php4/ext ext_skel.php Log: Wrapper script to use ext_skel on Win32 Index: php4/ext/ext_skel.php diff -u /dev/null php4/ext/ext_skel.php:1.2 --- /dev/null Thu Jan 30 22:44:20 2003 +++ php4/ext/ext_skel.php Thu Jan 30 22:44:20 2003 @@ -0,0 +1,44 @@ +?php +/* $Id: ext_skel.php,v 1.2 2003/01/31 03:44:20 fmk Exp $ */ + +/* + This script can be used on Win32 systems + + 1) Make sure you have CygWin installed + 2) Adjust the $cygwin_path to match your installation + 3) Change the environment cariable PATHEXT to include .PHP + 4) run ext_skel --ext_name=... + the first time you run this script you will be asked to + associate it with a program. chooses the CLI version of php. +*/ + +$cygwin_path = 'c:\cygwin\bin'; + +$path = getenv(PATH); +putenv(PATH=$cygwin_path;$path); + +array_shift($argv); +system(sh ext_skel . implode( , $argv)); + +$extname = ; +foreach($argv as $arg) { + if (strtolower(substr($arg, 0, 9)) == --extname) { + $extname = substr($arg, 10); + } +} + +$fp = fopen(skeleton/skeleton.dsp, rb); +if ($fp) { + $dsp_file = fread($fp, filesize(skeleton/skeleton.dsp)); + fclose($fp); + + $dsp_file = str_replace(extname, $extname, $dsp_file); + $dsp_file = str_replace(EXTNAME, strtoupper($extname), $dsp_file); + $fp = fopen($extname/$extname.dsp, wb); + if ($fp) { + fwrite($fp, $dsp_file); + fclose($fp); + } +} + +? \ No newline at end of file -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/skeleton skeleton.dsp
fmk Thu Jan 30 22:44:55 2003 EDT Modified files: /php4/ext/skeleton skeleton.dsp Log: Dtandard visual studio project for ext_skel Index: php4/ext/skeleton/skeleton.dsp diff -u /dev/null php4/ext/skeleton/skeleton.dsp:1.2 --- /dev/null Thu Jan 30 22:44:55 2003 +++ php4/ext/skeleton/skeleton.dsp Thu Jan 30 22:44:55 2003 @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name=extname - Package Owner=4 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE Win32 (x86) Dynamic-Link Library 0x0102 + +CFG=extname - Win32 Release_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 extname.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 extname.mak CFG=extname - Win32 Release_TS +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE extname - Win32 Release_TS (based on Win32 (x86) Dynamic-Link Library) +!MESSAGE extname - 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) == extname - 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 Ignore_Export_Lib 0 +# 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 /MT /W3 /GX /O2 /I ..\.. /I ..\..\..\Zend /I +..\..\..\bindlib_w32 /I ..\..\..\TSRM /D WIN32 /D NDEBUG /D _WINDOWS /D +_MBCS /D _USRDLL /D COMPILE_DL_EXTNAME /D ZTS=1 /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I +..\..\..\bindlib_w32 /I ..\..\TSRM /D ZEND_DEBUG=0 /D WIN32 /D NDEBUG /D +_WINDOWS /D _MBCS /D _USRDLL /D EXTNAME_EXPORTS /D COMPILE_DL_EXTNAME /D +ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_EXTNAME=1 /D LIBZEND_EXPORTS /FR /YX +/FD /c +# ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32 +# ADD MTL /nologo /D NDEBUG /mktyplib203 /win32 +# ADD BASE RSC /l 0x406 /d NDEBUG +# ADD RSC /l 0x406 /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 +php4ts.lib /nologo /dll /machine:I386 +# ADD 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 php4ts.lib +/nologo /dll /machine:I386 /out:..\..\Release_TS/extname.dll +/libpath:..\..\Release_TS /libpath:..\..\Release_TS_Inline + +!ELSEIF $(CFG) == extname - Win32 Debug_TS + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir Debug_TS +# PROP BASE Intermediate_Dir Debug_TS +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir Debug_TS +# PROP Intermediate_Dir Debug_TS +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\Zend /I +..\..\..\bindlib_w32 /I ..\..\TSRM /D WIN32 /D NDEBUG /D _WINDOWS /D +_MBCS /D _USRDLL /D COMPILE_DL_EXTNAME /D ZTS=1 /YX /FD /c +# ADD CPP /nologo /MDd /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I +..\..\..\bindlib_w32 /I ..\..\TSRM /D ZEND_DEBUG=1 /D WIN32 /D NDEBUG /D +_WINDOWS /D _MBCS /D _USRDLL /D EXTNAME_EXPORTS /D COMPILE_DL_EXTNAME /D +ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_EXTNAME=1 /D LIBZEND_EXPORTS /YX /FD /c +# ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32 +# ADD MTL /nologo /D NDEBUG /mktyplib203 /win32 +# ADD BASE RSC /l 0x406 /d NDEBUG +# ADD RSC /l 0x406 /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 +php4ts.lib /nologo /dll /machine:I386 +# ADD 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 php4ts_debug.lib +/nologo /dll /machine:I386 /out:..\..\Debug_TS/extname.dll /libpath:..\..\Debug_TS + +!ENDIF + +# Begin Target + +# Name extname - Win32 Release_TS +# Name extname - Win32 Debug_TS +# Begin Group Source Files + +# PROP Default_Filter cpp;c;cxx;rc;def;r;odl;idl;hpj;bat +# Begin Source File + +SOURCE=.\extname.c +# End Source File +# End Group +# Begin Group Header Files + +# PROP
[PHP-CVS] cvs: php4 /ext/skeleton skeleton.php
fmk Thu Jan 30 22:45:14 2003 EDT Modified files: /php4/ext/skeleton skeleton.php Log: Use platform specific extension. Index: php4/ext/skeleton/skeleton.php diff -u php4/ext/skeleton/skeleton.php:1.4 php4/ext/skeleton/skeleton.php:1.5 --- php4/ext/skeleton/skeleton.php:1.4 Wed Aug 15 20:16:00 2001 +++ php4/ext/skeleton/skeleton.php Thu Jan 30 22:45:13 2003 @@ -1,6 +1,6 @@ ? if(!extension_loaded('extname')) { - dl('extname.so'); + dl('extname.' . PHP_SHLIB_SUFFIX); } $module = 'extname'; $functions = get_extension_funcs($module); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/ftp ftp.c ftp.h php_ftp.c php_ftp.h
pollita Thu Jan 30 23:54:58 2003 EDT Modified files: /php4/ext/ftp ftp.c ftp.h php_ftp.c php_ftp.h Log: Add ftp_raw() to send raw command strings to an FTP server. Index: php4/ext/ftp/ftp.c diff -u php4/ext/ftp/ftp.c:1.75 php4/ext/ftp/ftp.c:1.76 --- php4/ext/ftp/ftp.c:1.75 Mon Jan 27 14:51:50 2003 +++ php4/ext/ftp/ftp.c Thu Jan 30 23:54:57 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: ftp.c,v 1.75 2003/01/27 19:51:50 pollita Exp $ */ +/* $Id: ftp.c,v 1.76 2003/01/31 04:54:57 pollita Exp $ */ #include php.h @@ -440,6 +440,27 @@ } return 1; +} +/* }}} */ + +/* {{{ ftp_raw + */ +void +ftp_raw(ftpbuf_t *ftp, const char *cmd, zval *return_value) +{ + if (ftp == NULL || cmd == NULL) { + RETURN_NULL(); + } + if (!ftp_putcmd(ftp, cmd, NULL)) { + RETURN_NULL(); + } + array_init(return_value); + while (ftp_readline(ftp)) { + add_next_index_string(return_value, ftp-inbuf, 1); + if (isdigit(ftp-inbuf[0]) isdigit(ftp-inbuf[1]) +isdigit(ftp-inbuf[2]) ftp-inbuf[3] == ' ') { + return; + } + } } /* }}} */ Index: php4/ext/ftp/ftp.h diff -u php4/ext/ftp/ftp.h:1.35 php4/ext/ftp/ftp.h:1.36 --- php4/ext/ftp/ftp.h:1.35 Mon Jan 27 14:51:50 2003 +++ php4/ext/ftp/ftp.h Thu Jan 30 23:54:57 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: ftp.h,v 1.35 2003/01/27 19:51:50 pollita Exp $ */ +/* $Id: ftp.h,v 1.36 2003/01/31 04:54:57 pollita Exp $ */ #ifndefFTP_H #defineFTP_H @@ -120,6 +120,9 @@ /* exec a command [special features], return true on success, false on error */ intftp_exec(ftpbuf_t *ftp, const char *cmd); + +/* send a raw ftp command, return response as a hashtable, NULL on error */ +void ftp_raw(ftpbuf_t *ftp, const char *cmd, zval *return_value); /* changes directories, return true on success, false on error */ intftp_chdir(ftpbuf_t *ftp, const char *dir); Index: php4/ext/ftp/php_ftp.c diff -u php4/ext/ftp/php_ftp.c:1.81 php4/ext/ftp/php_ftp.c:1.82 --- php4/ext/ftp/php_ftp.c:1.81 Mon Jan 27 14:51:50 2003 +++ php4/ext/ftp/php_ftp.c Thu Jan 30 23:54:57 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_ftp.c,v 1.81 2003/01/27 19:51:50 pollita Exp $ */ +/* $Id: php_ftp.c,v 1.82 2003/01/31 04:54:57 pollita Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -56,6 +56,7 @@ PHP_FE(ftp_cdup,NULL) PHP_FE(ftp_chdir, NULL) PHP_FE(ftp_exec,NULL) + PHP_FE(ftp_raw, NULL) PHP_FE(ftp_mkdir, NULL) PHP_FE(ftp_rmdir, NULL) PHP_FE(ftp_chmod, NULL) @@ -328,6 +329,26 @@ } RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto array ftp_raw(resource stream, string command) + Sends a literal command to the FTP server */ +PHP_FUNCTION(ftp_raw) +{ + zval*z_ftp; + ftpbuf_t*ftp; + char*cmd; + int cmd_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, z_ftp, cmd, +cmd_len) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(ftp, ftpbuf_t*, z_ftp, -1, le_ftpbuf_name, le_ftpbuf); + + /* execute arbitrary ftp command */ + ftp_raw(ftp, cmd, return_value); } /* }}} */ Index: php4/ext/ftp/php_ftp.h diff -u php4/ext/ftp/php_ftp.h:1.23 php4/ext/ftp/php_ftp.h:1.24 --- php4/ext/ftp/php_ftp.h:1.23 Sun Jan 26 21:54:12 2003 +++ php4/ext/ftp/php_ftp.h Thu Jan 30 23:54:57 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_ftp.h,v 1.23 2003/01/27 02:54:12 pollita Exp $ */ +/* $Id: php_ftp.h,v 1.24 2003/01/31 04:54:57 pollita Exp $ */ #ifndef_INCLUDED_FTP_H #define_INCLUDED_FTP_H @@ -43,6 +43,7 @@ PHP_FUNCTION(ftp_cdup); PHP_FUNCTION(ftp_chdir); PHP_FUNCTION(ftp_exec); +PHP_FUNCTION(ftp_raw); PHP_FUNCTION(ftp_mkdir); PHP_FUNCTION(ftp_rmdir); PHP_FUNCTION(ftp_chmod); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / php.ini-dist
sas Fri Jan 31 02:44:17 2003 EDT Modified files: /php4 php.ini-dist Log: Remove obsolete warning Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.178 php4/php.ini-dist:1.179 --- php4/php.ini-dist:1.178 Thu Jan 16 02:21:49 2003 +++ php4/php.ini-dist Fri Jan 31 02:44:17 2003 @@ -841,9 +841,6 @@ ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. -; WARNING: Your filesystem must store access times. Windows FAT does -; not. So, see session_set_save_handler() and write your own -; session handler with a different mechanism for cleaning up sessions. session.gc_maxlifetime = 1440 ; NOTE: If you are using the subdirectory option for storing session files -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4) / php.ini-dist
sas Fri Jan 31 02:46:45 2003 EDT Modified files: (Branch: PHP_4) /php4 php.ini-dist Log: MFH obsolete warning Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.171.2.4 php4/php.ini-dist:1.171.2.4.2.1 --- php4/php.ini-dist:1.171.2.4 Thu Dec 26 08:27:08 2002 +++ php4/php.ini-dist Fri Jan 31 02:46:44 2003 @@ -841,9 +841,6 @@ ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. -; WARNING: Your filesystem must store access times. Windows FAT does -; not. So, see session_set_save_handler() and write your own -; session handler with a different mechanism for cleaning up sessions. session.gc_maxlifetime = 1440 ; NOTE: If you are using the subdirectory option for storing session files -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / php.ini-dist
sas Fri Jan 31 02:47:10 2003 EDT Modified files: (Branch: PHP_4_3) /php4 php.ini-dist Log: MFH obsolete warning Index: php4/php.ini-dist diff -u php4/php.ini-dist:1.171.2.4 php4/php.ini-dist:1.171.2.5 --- php4/php.ini-dist:1.171.2.4 Thu Dec 26 08:27:08 2002 +++ php4/php.ini-dist Fri Jan 31 02:47:10 2003 @@ -841,9 +841,6 @@ ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. -; WARNING: Your filesystem must store access times. Windows FAT does -; not. So, see session_set_save_handler() and write your own -; session handler with a different mechanism for cleaning up sessions. session.gc_maxlifetime = 1440 ; NOTE: If you are using the subdirectory option for storing session files -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php