cvs: php4 /ext/ftp ftp.c php_ftp.c /ext/standard array.c basic_functions.c parsedate.y string.c var.c /ext/wddx wddx.c

From: Date: Sat, 17 Jun 2000 16:49:03 +0000
Subject: cvs: php4 /ext/ftp ftp.c php_ftp.c /ext/standard array.c basic_functions.c parsedate.y string.c var.c /ext/wddx wddx.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-342@lists.php.net to get a copy of this message
zeev Sat Jun 17 09:49:03 2000 EDT Modified files: /php4/ext/ftp ftp.c php_ftp.c /php4/ext/standard array.c basic_functions.c parsedate.y string.c var.c /php4/ext/wddx wddx.c Log: - Fix a couple of wranings in the FTP code and in parsedate.y - Be safer with LC_MESSAGES - Align with the latest Zend change in call_user_function_ex() Index: php4/ext/ftp/ftp.c diff -u php4/ext/ftp/ftp.c:1.22 php4/ext/ftp/ftp.c:1.23 --- php4/ext/ftp/ftp.c:1.22 Tue May 23 06:56:04 2000 +++ php4/ext/ftp/ftp.c Sat Jun 17 09:49:03 2000 @@ -28,7 +28,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.22 2000/05/23 13:56:04 askalski Exp $ */ +/* $Id: ftp.c,v 1.23 2000/06/17 16:49:03 zeev Exp $ */ #include "php.h" @@ -464,7 +464,7 @@ return 0; for (n=0; n<6; n++) - ipbox.c[n] = b[n]; + ipbox.c[n] = (unsigned char) b[n]; memset(&ftp->pasvaddr, 0, sizeof(ftp->pasvaddr)); ftp->pasvaddr.sin_family = AF_INET; Index: php4/ext/ftp/php_ftp.c diff -u php4/ext/ftp/php_ftp.c:1.23 php4/ext/ftp/php_ftp.c:1.24 --- php4/ext/ftp/php_ftp.c:1.23 Mon Jun 5 12:47:41 2000 +++ php4/ext/ftp/php_ftp.c Sat Jun 17 09:49:03 2000 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftp.c,v 1.23 2000/06/05 19:47:41 andi Exp $ */ +/* $Id: php_ftp.c,v 1.24 2000/06/17 16:49:03 zeev Exp $ */ #include "php.h" @@ -151,7 +151,7 @@ WRONG_PARAM_COUNT; } convert_to_long(arg2); - port = arg2->value.lval; + port = (short) arg2->value.lval; break; default: WRONG_PARAM_COUNT; Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.54 php4/ext/standard/array.c:1.55 --- php4/ext/standard/array.c:1.54 Sun Jun 11 05:20:42 2000 +++ php4/ext/standard/array.c Sat Jun 17 09:49:03 2000 @@ -522,7 +522,7 @@ args[0] = (pval **) f->pData; args[1] = (pval **) s->pData; - if (call_user_function_ex(CG(function_table), NULL, *BG(user_compare_func_name), &retval_ptr, 2, args, 0)==SUCCESS + if (call_user_function_ex(CG(function_table), NULL, *BG(user_compare_func_name), &retval_ptr, 2, args, 0, NULL)==SUCCESS && retval_ptr) { long retval; @@ -976,7 +976,7 @@ /* Call the userland function */ if (call_user_function_ex(CG(function_table), NULL, *BG(array_walk_func_name), - &retval_ptr, userdata ? 3 : 2, args, 0) == SUCCESS) { + &retval_ptr, userdata ? 3 : 2, args, 0, NULL) == SUCCESS) { zval_ptr_dtor(&retval_ptr); } else Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.216 php4/ext/standard/basic_functions.c:1.217 --- php4/ext/standard/basic_functions.c:1.216 Thu Jun 15 12:02:02 2000 +++ php4/ext/standard/basic_functions.c Sat Jun 17 09:49:03 2000 @@ -1413,7 +1413,7 @@ RETURN_FALSE; } SEPARATE_ZVAL(params[0]); - if (call_user_function_ex(CG(function_table), NULL, *params[0], &retval_ptr, arg_count-1, params+1, 1)==SUCCESS + if (call_user_function_ex(CG(function_table), NULL, *params[0], &retval_ptr, arg_count-1, params+1, 1, NULL)==SUCCESS && retval_ptr) { COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); } else { @@ -1449,7 +1449,7 @@ SEPARATE_ZVAL(params[0]); SEPARATE_ZVAL(params[1]); convert_to_string(*params[0]); - if (call_user_function_ex(CG(function_table), *params[1], *params[0], &retval_ptr, arg_count-2, params+2, 1)==SUCCESS + if (call_user_function_ex(CG(function_table), *params[1], *params[0], &retval_ptr, arg_count-2, params+2, 1, NULL)==SUCCESS && retval_ptr) { COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); } else { Index: php4/ext/standard/parsedate.y diff -u php4/ext/standard/parsedate.y:1.19 php4/ext/standard/parsedate.y:1.20 --- php4/ext/standard/parsedate.y:1.19 Thu Jun 15 09:24:10 2000 +++ php4/ext/standard/parsedate.y Sat Jun 17 09:49:03 2000 @@ -452,9 +452,11 @@ time_t get_date (const char *p, const time_t *now); -extern struct tm *gmtime (); -extern struct tm *localtime (); -extern time_t mktime (); +#ifndef PHP_WIN32 +extern struct tm *gmtime(); +extern struct tm *localtime(); +extern time_t mktime(); +#endif /* Month and day table. */ static TABLE const MonthDayTable[] = { Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.130 php4/ext/standard/string.c:1.131 --- php4/ext/standard/string.c:1.130 Sat Jun 17 07:48:02 2000 +++ php4/ext/standard/string.c Sat Jun 17 09:49:03 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.130 2000/06/17 14:48:02 andi Exp $ */ +/* $Id: string.c,v 1.131 2000/06/17 16:49:03 zeev Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2126,7 +2126,7 @@ cat = LC_COLLATE; else if (!strcasecmp ("LC_CTYPE", category->value.str.val)) cat = LC_CTYPE; -#ifndef PHP_WIN32 +#ifdef LC_MESSAGES else if (!strcasecmp ("LC_MESSAGES", category->value.str.val)) cat = LC_MESSAGES; #endif Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.63 php4/ext/standard/var.c:1.64 --- php4/ext/standard/var.c:1.63 Sat Jun 17 08:53:32 2000 +++ php4/ext/standard/var.c Sat Jun 17 09:49:03 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.63 2000/06/17 15:53:32 andrei Exp $ */ +/* $Id: var.c,v 1.64 2000/06/17 16:49:03 zeev Exp $ */ /* {{{ includes @@ -207,7 +207,7 @@ MAKE_STD_ZVAL(fname); ZVAL_STRING(fname,"__sleep",1); - res = call_user_function_ex(CG(function_table), *struc, fname, &retval_ptr, 0, 0, 1); + res = call_user_function_ex(CG(function_table), *struc, fname, &retval_ptr, 0, 0, 1, NULL); if ((res == SUCCESS)) { if (retval_ptr && HASH_OF(retval_ptr)) { @@ -515,7 +515,7 @@ MAKE_STD_ZVAL(fname); ZVAL_STRING(fname,"__wakeup",1); - call_user_function_ex(CG(function_table), *rval, fname, &retval_ptr, 0, 0, 1); + call_user_function_ex(CG(function_table), *rval, fname, &retval_ptr, 0, 0, 1, NULL); zval_dtor(fname); FREE_ZVAL(fname); Index: php4/ext/wddx/wddx.c diff -u php4/ext/wddx/wddx.c:1.43 php4/ext/wddx/wddx.c:1.44 --- php4/ext/wddx/wddx.c:1.43 Sat Jun 17 08:53:33 2000 +++ php4/ext/wddx/wddx.c Sat Jun 17 09:49:03 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.43 2000/06/17 15:53:33 andrei Exp $ */ +/* $Id: wddx.c,v 1.44 2000/06/17 16:49:03 zeev Exp $ */ #include "php.h" #include "php_wddx.h" @@ -396,7 +396,7 @@ * We try to call __sleep() method on object. It's supposed to return an * array of property names to be serialized. */ - if (call_user_function_ex(CG(function_table), obj, fname, &retval, 0, 0, 1) == SUCCESS) { + if (call_user_function_ex(CG(function_table), obj, fname, &retval, 0, 0, 1, NULL) == SUCCESS) { if (retval && HASH_OF(retval)) { php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); sprintf(tmp_buf, WDDX_VAR_S, PHP_CLASS_NAME_VAR); @@ -750,7 +750,7 @@ MAKE_STD_ZVAL(fname); ZVAL_STRING(fname, "__wakeup", 1); - call_user_function_ex(NULL, obj, fname, &retval, 0, 0, 0); + call_user_function_ex(NULL, obj, fname, &retval, 0, 0, 0, NULL); zval_dtor(fname); FREE_ZVAL(fname);

« previous php.cvs (#342) next »