[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c
derick Tue Nov 12 03:11:23 2002 EDT Modified files: /php4/ext/mysql php_mysql.c Log: - Fix warning Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.172 php4/ext/mysql/php_mysql.c:1.173 --- php4/ext/mysql/php_mysql.c:1.172Mon Nov 11 20:41:16 2002 +++ php4/ext/mysql/php_mysql.c Tue Nov 12 03:11:23 2002 -18,7 +18,7 +--+ */ -/* $Id: php_mysql.c,v 1.172 2002/11/12 01:41:16 zak Exp $ */ +/* $Id: php_mysql.c,v 1.173 2002/11/12 08:11:23 derick Exp $ */ /* TODO: * -506,7 +506,9 int hashed_details_length, port = MYSQL_PORT; int client_flags = 0; php_mysql_conn *mysql=NULL; +#if MYSQL_VERSION_ID = 32230 void (*handler) (int); +#endif zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL, **z_client_flags=NULL; zend_bool free_host=0, new_link=0; long connect_timeout; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/pgsql pgsql.c
yohgaki Tue Nov 12 04:07:36 2002 EDT Modified files: /php4/ext/pgsql pgsql.c Log: Speed up pg_escape_bytea, from O(n^2) = O(n). My test script speed up from 50 sec to 5 sec. (sscanf is too slow at least under my linux, I might write better function that unescape values later) Use emalloc/erealloc for bundled PQescapeBytea(php_pgsql_escape_bytea) Index: php4/ext/pgsql/pgsql.c diff -u php4/ext/pgsql/pgsql.c:1.243 php4/ext/pgsql/pgsql.c:1.244 --- php4/ext/pgsql/pgsql.c:1.243Tue Nov 5 09:28:32 2002 +++ php4/ext/pgsql/pgsql.c Tue Nov 12 04:07:36 2002 -19,7 +19,7 +--+ */ -/* $Id: pgsql.c,v 1.243 2002/11/05 14:28:32 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.244 2002/11/12 09:07:36 yohgaki Exp $ */ #include stdlib.h -2664,7 +2664,7 return NULL; buflen = strlen(strtext); /* will shrink, also we discover if * strtext */ - buffer = (unsigned char *) malloc(buflen); /* isn't NULL terminated */ + buffer = (unsigned char *) emalloc(buflen); /* isn't NULL terminated */ if (buffer == NULL) return NULL; for (bp = buffer, sp = strtext; *sp != '\0'; bp++, sp++) -2710,10 +2710,14 case 3: if (isdigit(*sp)) /* state=4 */ { - int v; + unsigned int v,i; + unsigned char buf[4]; /* 000 + '\0' */ bp -= 3; - sscanf(sp - 2, %03o, v); + for (i = 0; i 3; i++) + buf[i] = *((sp-2)+i); + buf[i] = '\0'; + sscanf(buf, %03o, v); *bp = v; buflen -= 3; state = 0; -2726,7 +2730,7 break; } } - buffer = realloc(buffer, buflen); + buffer = erealloc(buffer, buflen); if (buffer == NULL) return NULL; -2749,8 +2753,7 if (!to) { RETURN_FALSE; } - RETVAL_STRINGL(to, to_len, 1); - free(to); + RETVAL_STRINGL(to, to_len, 0); } /* }}} */ #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard flock_compat.c
helly Tue Nov 12 04:09:55 2002 EDT Modified files: /php4/ext/standard flock_compat.c Log: correct the last patch: make flock() a function again when it is missing #function name should be flock and not php_flock of cause Index: php4/ext/standard/flock_compat.c diff -u php4/ext/standard/flock_compat.c:1.20 php4/ext/standard/flock_compat.c:1.21 --- php4/ext/standard/flock_compat.c:1.20 Mon Nov 11 18:40:33 2002 +++ php4/ext/standard/flock_compat.cTue Nov 12 04:09:55 2002 -16,7 +16,7 +--+ */ -/* $Id: flock_compat.c,v 1.20 2002/11/11 23:40:33 helly Exp $ */ +/* $Id: flock_compat.c,v 1.21 2002/11/12 09:09:55 helly Exp $ */ #include php.h #include errno.h -41,7 +41,7 #endif #ifndef HAVE_FLOCK -PHPAPI int php_flock(int fd, int operation) +PHPAPI int flock(int fd, int operation) { return php_flock(fd, operation); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c
helly Tue Nov 12 06:45:11 2002 EDT Modified files: /php4/ext/mbstring mbstring.c Log: fix warnings Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.135 php4/ext/mbstring/mbstring.c:1.136 --- php4/ext/mbstring/mbstring.c:1.135 Sun Nov 10 16:32:54 2002 +++ php4/ext/mbstring/mbstring.cTue Nov 12 06:45:10 2002 -17,7 +17,7 +--+ */ -/* $Id: mbstring.c,v 1.135 2002/11/10 21:32:54 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.136 2002/11/12 11:45:10 helly Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) -3535,7 +3535,7 if (nbytes == (size_t)-1) { while (*p != '\0') { - if (*p == c) { + if ((unsigned int)*p == c) { last = (char *)p; } p += php_mb_mbchar_bytes_ex(p, enc); -3544,7 +3544,7 register size_t bcnt = nbytes; register size_t nbytes_char; while (bcnt 0) { - if (*p == c) { + if ((unsigned int)*p == c) { last = (char *)p; } nbytes_char = php_mb_mbchar_bytes_ex(p, enc); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard math.c
helly Tue Nov 12 06:46:22 2002 EDT Modified files: /php4/ext/standard math.c Log: fix warnings #highest bit cannot be set so this must work Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.96 php4/ext/standard/math.c:1.97 --- php4/ext/standard/math.c:1.96 Mon Nov 11 11:34:39 2002 +++ php4/ext/standard/math.cTue Nov 12 06:46:21 2002 -19,7 +19,7 +--+ */ -/* $Id: math.c,v 1.96 2002/11/11 16:34:39 jason Exp $ */ +/* $Id: math.c,v 1.97 2002/11/12 11:46:21 helly Exp $ */ #include php.h #include php_math.h -697,7 +697,7 int i; int mode = 0; char c, *s; - unsigned long cutoff; + long cutoff; int cutlim; if (Z_TYPE_P(arg) != IS_STRING || base 2 || base 36) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd gd.c php_gd.h
helly Tue Nov 12 06:49:12 2002 EDT Modified files: /php4/ext/gdgd.c php_gd.h Log: new function gd_info() returns an associative array of gd support options. # The index names are those from the minfo function. Therefore it is # easy to look into phpinfo() to see which index names are possible. Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.220 php4/ext/gd/gd.c:1.221 --- php4/ext/gd/gd.c:1.220 Wed Oct 30 12:54:36 2002 +++ php4/ext/gd/gd.cTue Nov 12 06:49:11 2002 -18,7 +18,7 +--+ */ -/* $Id: gd.c,v 1.220 2002/10/30 17:54:36 helly Exp $ */ +/* $Id: gd.c,v 1.221 2002/11/12 11:49:11 helly Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ -117,6 +117,7 /* {{{ gd_functions[] */ function_entry gd_functions[] = { + PHP_FE(gd_info, NULL) PHP_FE(imagearc, NULL) PHP_FE(imageellipse,NULL) PHP_FE(imagechar, NULL) -415,6 +416,82 php_info_print_table_row(2, XBM Support, enabled); #endif php_info_print_table_end(); +} +/* }}} */ + +/* {{{ proto array gd_info() + */ +PHP_FUNCTION(gd_info) +{ + if (ZEND_NUM_ARGS()!=0) { + ZEND_WRONG_PARAM_COUNT(); + RETURN_FALSE; + } + + if (array_init(return_value) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_ERROR, Unable to initialize +array); + RETURN_FALSE; + } +#if HAVE_GD_BUNDLED + add_assoc_string(return_value, GD Version, bundled (2.0 compatible), 1); +#elif HAVE_LIBGD20 + add_assoc_string(return_value, GD Version, 2.0 or higher, 1); +#elif HAVE_GDIMAGECOLORRESOLVE + add_assoc_string(return_value, GD Version, 1.6.2 or higher, 1); +#elif HAVE_LIBGD13 + add_assoc_string(return_value, GD Version, between 1.3 and 1.6.1, 1); +#else + add_assoc_string(return_value, GD Version, 1.2, 1); +#endif + +#ifdef ENABLE_GD_TTF + add_assoc_bool(return_value, FreeType Support, 1); +#if HAVE_LIBFREETYPE + add_assoc_string(return_value, FreeType Linkage, with freetype, 1); +#elif HAVE_LIBTTF + add_assoc_string(return_value, FreeType Linkage, with TTF library, 1); +#else + add_assoc_string(return_value, FreeType Linkage, with unknown library, 1); +#endif +#else + add_assoc_bool(return_value, FreeType Support, 0); +#endif + +#ifdef HAVE_LIBT1 + add_assoc_bool(return_value, T1Lib Support, 1); +#else + add_assoc_bool(return_value, T1Lib Support, 0); +#endif +#ifdef HAVE_GD_GIF_READ + add_assoc_bool(return_value, GIF Read Support, 1); +#else + add_assoc_bool(return_value, GIF Read Support, 0); +#endif +#ifdef HAVE_GD_GIF_CREATE + add_assoc_bool(return_value, GIF Create Support, 1); +#else + add_assoc_bool(return_value, GIF Create Support, 0); +#endif +#ifdef HAVE_GD_JPG + add_assoc_bool(return_value, JPG Support, 1); +#else + add_assoc_bool(return_value, JPG Support, 0); +#endif +#ifdef HAVE_GD_PNG + add_assoc_bool(return_value, PNG Support, 1); +#else + add_assoc_bool(return_value, PNG Support, 0); +#endif +#ifdef HAVE_GD_WBMP + add_assoc_bool(return_value, WBMP Support, 1); +#else + add_assoc_bool(return_value, WBMP Support, 0); +#endif +#ifdef HAVE_GD_XBM + add_assoc_bool(return_value, XBM Support, 1); +#else + add_assoc_bool(return_value, XBM Support, 0); +#endif } /* }}} */ Index: php4/ext/gd/php_gd.h diff -u php4/ext/gd/php_gd.h:1.43 php4/ext/gd/php_gd.h:1.44 --- php4/ext/gd/php_gd.h:1.43 Mon Oct 28 20:15:43 2002 +++ php4/ext/gd/php_gd.hTue Nov 12 06:49:11 2002 -17,7 +17,7 +--+ */ -/* $Id: php_gd.h,v 1.43 2002/10/29 01:15:43 iliaa Exp $ */ +/* $Id: php_gd.h,v 1.44 2002/11/12 11:49:11 helly Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H -59,6 +59,7 PHP_MINIT_FUNCTION(gd); PHP_MSHUTDOWN_FUNCTION(gd); +PHP_FUNCTION(gd_info); PHP_FUNCTION(imagearc); PHP_FUNCTION(imagechar); PHP_FUNCTION(imagecharup); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/db db.c
helly Tue Nov 12 07:01:59 2002 EDT Modified files: /php4/ext/dbdb.c Log: -fix includes -fix one missing efree -replace efree/emalloc with erealloc Index: php4/ext/db/db.c diff -u php4/ext/db/db.c:1.79 php4/ext/db/db.c:1.80 --- php4/ext/db/db.c:1.79 Tue Oct 22 14:47:41 2002 +++ php4/ext/db/db.cTue Nov 12 07:01:57 2002 -17,7 +17,7 +--+ */ -/* $Id: db.c,v 1.79 2002/10/22 18:47:41 helly Exp $ */ +/* $Id: db.c,v 1.80 2002/11/12 12:01:57 helly Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H -38,15 +38,9 #include unistd.h #endif -#ifdef PHP_31 -#include os/nt/flock.h -#else -#ifdef PHP_WIN32 -#include win32/flock.h -#else +#ifdef HAVE_SYS_FILE_H #include sys/file.h #endif -#endif #if HAVE_FCNTL_H #include fcntl.h -954,7 +948,7 num = atoi(buf); if (num buf_size) { buf_size+=num; - buf = emalloc((buf_size+1)*sizeof(char)); + buf = erealloc(buf, (buf_size+1)*sizeof(char)); } read(fileno(dbf), buf, num); value_datum.dptr = buf; -985,8 +979,7 num = atoi(buf); if (num buf_size) { buf_size += num; - if (buf) efree(buf); - buf = emalloc((buf_size+1)*sizeof(char)); + buf = erealloc(buf, (buf_size+1)*sizeof(char)); } pos = ftell(dbf); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dbase dbf_rec.c
helly Tue Nov 12 08:11:37 2002 EDT Modified files: /php4/ext/dbase dbf_rec.c Log: fix windows warning: not needed here Index: php4/ext/dbase/dbf_rec.c diff -u php4/ext/dbase/dbf_rec.c:1.5 php4/ext/dbase/dbf_rec.c:1.6 --- php4/ext/dbase/dbf_rec.c:1.5Mon Mar 4 19:28:07 2002 +++ php4/ext/dbase/dbf_rec.cTue Nov 12 08:11:37 2002 -4,10 +4,6 * All Rights Reserved */ -#ifdef PHP_WIN32 -#include ext/standard/flock_compat.h -#endif - #include stdio.h #include fcntl.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/ming ming.c
helly Tue Nov 12 08:16:14 2002 EDT Modified files: /php4/ext/ming ming.c Log: php_error() = php_error_docref() Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.38 php4/ext/ming/ming.c:1.39 --- php4/ext/ming/ming.c:1.38 Wed Sep 25 11:46:44 2002 +++ php4/ext/ming/ming.cTue Nov 12 08:16:12 2002 -136,7 +136,7 if (id) { if (zend_hash_find(Z_OBJPROP_P(id), name, namelen+1, (void **)tmp) == FAILURE) { - php_error(E_WARNING, unable to find property %s, name); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to find +property %s, name); return NULL; } id_to_find = Z_LVAL_PP(tmp); -147,7 +147,7 property = zend_list_find(id_to_find, type); if (!property || type != proptype) { - php_error(E_WARNING, unable to find identifier (%d), id_to_find); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to find identifier +(%d), id_to_find); return NULL; } -179,7 +179,7 else if (Z_OBJCE_P(id) == bitmap_class_entry) return (SWFCharacter)getBitmap(id TSRMLS_CC); else - php_error(E_ERROR, called object is not an SWFCharacter); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFCharacter); return NULL; } /* }}} */ -237,7 +237,7 action = compileSWFActionCode(Z_STRVAL_PP(script)); if (!action) { - php_error(E_ERROR, Couldn't compile actionscript.); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Couldn't compile +actionscript); } ret = zend_list_insert(action, le_swfactionp); -256,7 +256,7 void *action = SWFgetProperty(id, action, 6, le_swfactionp TSRMLS_CC); if (!action) { - php_error(E_ERROR, called object is not an SWFAction!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFAction); } return (SWFAction)action; } -333,7 +333,7 void *bitmap = SWFgetProperty(id, bitmap, 6, le_swfbitmapp TSRMLS_CC); if (!bitmap) { - php_error(E_ERROR, called object is not an SWFBitmap!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFBitmap); } return (SWFBitmap)bitmap; } -395,7 +395,7 void *button = SWFgetProperty(id, button, 6, le_swfbuttonp TSRMLS_CC); if(!button) { - php_error(E_ERROR, called object is not an SWFButton!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFButton); } return (SWFButton)button; } -543,7 +543,7 convert_to_string_ex(key); if (Z_STRLEN_PP(key) 1) { - php_error(E_ERROR, SWFBUTTON_KEYPRESS expects only one character!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Only one character +expected); } c = Z_STRVAL_PP(key)[0]; -582,7 +582,7 void *item = SWFgetProperty(id, displayitem, 11, le_swfdisplayitemp TSRMLS_CC); if (!item) { - php_error(E_ERROR, called object is not an SWFDisplayItem!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFDisplayItem); } return (SWFDisplayItem)item; -915,7 +915,7 Returns a new SWFFill object */ PHP_FUNCTION(swffill_init) { - php_error(E_ERROR, Instantiating SWFFill won't do any good- use SWFShape::addFill() instead!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Instantiating SWFFill won't do any good- +use SWFShape::addFill() instead); } static void destroy_SWFFill_resource(zend_rsrc_list_entry *resource TSRMLS_DC) -934,7 +934,7 void *fill = SWFgetProperty(id, fill, 4, le_swffillp TSRMLS_CC); if (!fill) { - php_error(E_ERROR, called object is not an SWFFill!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFFill); } return (SWFFill)fill; } -1042,7 +1042,7 void *font = SWFgetProperty(id, font, 4, le_swffontp TSRMLS_CC); if (!font) { - php_error(E_ERROR, called object is not an SWFFont!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFFont); } return (SWFFont)font; } -1170,7 +1170,7 void *gradient = SWFgetProperty(id, gradient, 8, le_swfgradientp TSRMLS_CC); if (!gradient) { - php_error(E_ERROR, called object is not an SWFGradient!); + php_error_docref(NULL TSRMLS_CC, E_ERROR, Called object is not an +SWFGradient); } return (SWFGradient)gradient; } -1245,7 +1245,7 void *morph = SWFgetProperty(id, morph, 5, le_swfmorphp TSRMLS_CC); if (!morph) { -
Re: [PHP-CVS] cvs: php4 /ext/gd/libgd gd.c gd_gd2.c gdft.c
Hello, On Tue, 12 Nov 2002 13:12:59 - Marcus Boerger [EMAIL PROTECTED] wrote: helly Tue Nov 12 08:12:59 2002 EDT Modified files: /php4/ext/gd/libgdgd.c gd_gd2.c gdft.c Log: fix warnings Thx to fix warnings :-) While you are on, here are some warns I got on gd_png.c (-W -g3): php4/ext/gd/libgd/gd_png.c: In function `gdImageCreateFromPngCtx': php4/ext/gd/libgd/gd_png.c:126: warning: variable `image_data' might be clobbered by `longjmp' or `vfork' php4/ext/gd/libgd/gd_png.c:127: warning: variable `row_pointers' might be clobbered by `longjmp' or `vfork' php4/ext/gd/libgd/gd_png.c:129: warning: variable `open' might be clobbered by `longjmp' or `vfork' php4/ext/gd/libgd/gd_png.c: In function `gdImagePngCtx': php4/ext/gd/libgd/gd_png.c:447: warning: variable `bit_depth' might be clobbered by `longjmp' or `vfork' php4/ext/gd/libgd/gd_png.c:450: warning: variable `colors' might be clobbered by `longjmp' or `vfork' hth pa -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/ming ming.c
iliaa Tue Nov 12 09:18:24 2002 EDT Modified files: /php4/ext/ming ming.c Log: Fixed compile error. Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.39 php4/ext/ming/ming.c:1.40 --- php4/ext/ming/ming.c:1.39 Tue Nov 12 08:16:12 2002 +++ php4/ext/ming/ming.cTue Nov 12 09:18:24 2002 -2707,13 +2707,14 /* {{{ todo PHP_MINIT_FUNCTION(ming) */ + /* custom error handler propagates ming errors up to php */ static void php_ming_error(char *msg, ...) { - TSRMLS_FETCH(); - va_list args; char *buffer; + + TSRMLS_FETCH(); va_start(args, msg); vspprintf(buffer, 0, msg, args); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/ming ming.c
Hm i have a tsrm build but it compiled - thanks anyway. marcus At 15:18 12.11.2002, Ilia Alshanetsky wrote: iliaa Tue Nov 12 09:18:24 2002 EDT Modified files: /php4/ext/ming ming.c Log: Fixed compile error. Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.39 php4/ext/ming/ming.c:1.40 --- php4/ext/ming/ming.c:1.39 Tue Nov 12 08:16:12 2002 +++ php4/ext/ming/ming.cTue Nov 12 09:18:24 2002 -2707,13 +2707,14 /* {{{ todo PHP_MINIT_FUNCTION(ming) */ + /* custom error handler propagates ming errors up to php */ static void php_ming_error(char *msg, ...) { - TSRMLS_FETCH(); - va_list args; char *buffer; + + TSRMLS_FETCH(); va_start(args, msg); vspprintf(buffer, 0, msg, args); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/w32api w32api_function_definition_parser.y w32api_function_definition_scanner.l w32api_type_definition_parser.y w32api_type_definition_scanner.l
jmoore Tue Nov 12 09:31:35 2002 EDT Added files: /php4/ext/w32apiw32api_function_definition_parser.y w32api_function_definition_scanner.l w32api_type_definition_parser.y w32api_type_definition_scanner.l Log: Forgot the parsers and scanners Index: php4/ext/w32api/w32api_function_definition_parser.y +++ php4/ext/w32api/w32api_function_definition_parser.y %{ /* +--+ | PHP version 4.0 | +--+ | Copyright (c) 1997-2001 The PHP Group| +--+ | This source file is subject to version 2.02 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. | | 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. | +--+ | Authors: James Moore [EMAIL PROTECTED]| +--+ */ /* $Id: w32api_function_definition_parser.y,v 1.1 2002/11/12 14:31:33 jmoore Exp $ */ #include stdio.h #include stdlib.h #define WIN32_LEAN_AND_MEAN #include windows.h #include string.h #include php.h #include php_ini.h #include ext/standard/info.h #include ext/standard/php_string.h #include php_w32api.h #define YYSTYPE w32api_parser_function_definition_union #define YYPARSE_PARAM fh int w32api_function_definition_lex(w32api_parser_function_definition_union *funcdef_lval); %} %pure_parser %token tFROM %token tBYREF %token tALIAS %token s tIDENTIFIER %token s tFILENAME %type arg argument argument_list %start funcdef %% funcdef:tIDENTIFIER tIDENTIFIER tALIAS tIDENTIFIER'(' argument_list ')' tFROM tFILENAME {((w32api_func_handle_ptr *)fh)-hnd = w32api_parser_load_alias_function($1, $2, $4, $6, $9);} | tIDENTIFIER tIDENTIFIER '(' argument_list ')' tFROM tFILENAME {((w32api_func_handle_ptr *)fh)-hnd = w32api_parser_load_function($1, $2, $4, $7);} ; argument_list: argument ',' argument_list { $$ = w32api_parser_join_arguments($1, $3);} | argument {$$ = $1;} | {$$ = NULL} ; argument: tIDENTIFIER tIDENTIFIER { $$ = w32api_parser_make_argument_byval($1, $2); } | tIDENTIFIER tBYREF tIDENTIFIER { $$ = w32api_parser_make_argument_byref($1, $3); } ; Index: php4/ext/w32api/w32api_function_definition_scanner.l +++ php4/ext/w32api/w32api_function_definition_scanner.l %{ /* +--+ | PHP version 4.0 | +--+ | Copyright (c) 1997-2001 The PHP Group| +--+ | This source file is subject to version 2.02 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. | | 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. | +--+ | Authors: James Moore [EMAIL PROTECTED]| +--+ */ /* $Id: w32api_function_definition_scanner.l,v 1.1 2002/11/12 14:31:34 jmoore Exp $ */ #include stdio.h #include stdlib.h #define WIN32_LEAN_AND_MEAN #include windows.h #include string.h #include php.h #include php_ini.h #include ext/standard/info.h #include ext/standard/php_string.h #include php_w32api.h #include w32api_function_definition_parser.h #ifdef YYSTYPE #undef YYSTYPE #endif #define YYSTYPE w32api_parser_function_definition_union #define YY_DECL int w32api_function_definition_lex(w32api_parser_function_definition_union *funcdef_lval) %} ID [A-Za-z][A-Za-z0-9_]*
[PHP-CVS] cvs: php4 /main main.c
iliaa Tue Nov 12 09:40:01 2002 EDT Modified files: /php4/main main.c Log: Changed max_input_time PHP_INI_SYSTEM|PHP_INI_PERDIR because ini_set() will already be too late, the POST/GET/COOKIE processing occures before the script gets parsed. Changed the default value to -1. If users have previously (older PHPs) adressed the problem by setting timeout to a large value, we can avoid breaking their script by detecting the -1 and using timeout_seconds instead of max_input_time when setting the 'input' timeout. Index: php4/main/main.c diff -u php4/main/main.c:1.511 php4/main/main.c:1.512 --- php4/main/main.c:1.511 Sun Nov 10 14:28:51 2002 +++ php4/main/main.cTue Nov 12 09:40:00 2002 -18,7 +18,7 +--+ */ -/* $Id: main.c,v 1.511 2002/11/10 19:28:51 iliaa Exp $ */ +/* $Id: main.c,v 1.512 2002/11/12 14:40:00 iliaa Exp $ */ /* {{{ includes */ -249,7 +249,7 STD_PHP_INI_BOOLEAN(html_errors, 1, PHP_INI_ALL,OnUpdateBool, html_errors, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN(xmlrpc_errors,0, PHP_INI_SYSTEM, OnUpdateBool, xmlrpc_errors, php_core_globals, core_globals) STD_PHP_INI_ENTRY(xmlrpc_error_number,0,PHP_INI_ALL, OnUpdateInt,xmlrpc_error_number,php_core_globals, core_globals) - STD_PHP_INI_ENTRY(max_input_time, 0, PHP_INI_ALL,OnUpdateInt,max_input_time, php_core_globals, core_globals) + STD_PHP_INI_ENTRY(max_input_time, -1, +PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateInt, +max_input_time, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN(ignore_user_abort,0,PHP_INI_ALL, OnUpdateBool, ignore_user_abort, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN(implicit_flush, 0,PHP_INI_ALL, OnUpdateBool, implicit_flush, php_core_globals, core_globals) STD_PHP_INI_BOOLEAN(log_errors, 0, PHP_INI_ALL,OnUpdateBool, log_errors, php_core_globals, core_globals) -846,7 +846,11 zend_activate(TSRMLS_C); sapi_activate(TSRMLS_C); - zend_set_timeout(PG(max_input_time)); + if (PG(max_input_time) == -1) { + zend_set_timeout(EG(timeout_seconds)); + } else { + zend_set_timeout(PG(max_input_time)); + } if (PG(expose_php)) { sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS
helly Tue Nov 12 09:52:42 2002 EDT Modified files: /php4 NEWS Log: -add gd_info() -keep important news at top -speling Index: php4/NEWS diff -u php4/NEWS:1.1244 php4/NEWS:1.1245 --- php4/NEWS:1.1244Mon Nov 11 20:32:09 2002 +++ php4/NEWS Tue Nov 12 09:52:42 2002 -1,20 +1,6 PHP 4 NEWS ||| ? ? ??? 2002, Version 4.3.0 -- Implemented features/changes requested in Bug #16960 (Timm): -- . Added a new function sybase_unbuffered_query() - . Added a new function sybase_fetch_assoc() - . Added sybase_set_message_handler() which enables users to handle - server messages in a callback function - . Added an ini entry for deadlock retries - retrying deadlocks - can cause transaction state to break (sybct.deadlock_retry_count, - defaults to -1 forever). - . Fixed sybase_fetch_object() not to return objects with numeric - members - . Fixed issues with identical fieldnames - . Made sybase_fetch_*() functions return correct datatypes - . Made phpinfo() section more verbose - . Made sybase_query() error messages more verbose - ATTENTION! make install will *by default* install the CLI SAPI binary in {PREFIX}/bin/php. If you don't disable the CGI binary, it will be installed as {PREFIX}/bin/php-cgi. -25,6 +11,20 . ext/icap . sapi/fhttpd - Moved ext/vpopmail to PECL. (James) +- Added gd_info() which returns an array of gd support information. (Marcus) +- Implemented features/changes requested in Bug #16960 (Timm): + . Added a new function sybase_unbuffered_query() + . Added a new function sybase_fetch_assoc() + . Added sybase_set_message_handler() which enables users to handle +server messages in a callback function + . Added an ini entry for deadlock retries - retrying deadlocks can cause +transaction state to break (sybct.deadlock_retry_count, +defaults to -1 forever). + . Fixed sybase_fetch_object() not to return objects with numeric members + . Fixed issues with identical fieldnames + . Made sybase_fetch_*() functions return correct datatypes + . Made phpinfo() section more verbose + . Made sybase_query() error messages more verbose - Fixed bug #19935 (made OpenSSL file system operations abide by safe_mode open_basedir restrictions). (Ilia) - Fixed bug #18868 (improved the check for availability of realpath()). (Ilia) -44,7 +44,7 path. The bundled version supports cdb_make that allows writing cdb files. . Added optional skip parameter to dba_fetch() to support multiple key-value pairs with the same key for cdb handler. - . Added locking for those handlers that does not have their own locking. + . Added locking for those handlers that do not have their own locking. . Added flatfile support what finally makes ext/db deprecated. - Added imagerotate() which is available only when bundled libgd is used. (Pierre-Alain Joye, Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/ming config.m4 ming.c
helly Tue Nov 12 10:09:43 2002 EDT Modified files: /php4/ext/ming config.m4 ming.c Log: fix warnings Index: php4/ext/ming/config.m4 diff -u php4/ext/ming/config.m4:1.18 php4/ext/ming/config.m4:1.19 --- php4/ext/ming/config.m4:1.18Mon Oct 7 20:16:52 2002 +++ php4/ext/ming/config.m4 Tue Nov 12 10:09:43 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.18 2002/10/08 00:16:52 rasmus Exp $ +dnl $Id: config.m4,v 1.19 2002/11/12 15:09:43 helly Exp $ dnl PHP_ARG_WITH(ming, for MING support, -35,9 +35,27 ],[ -L$MING_DIR/lib ]) - + PHP_ADD_INCLUDE($MING_INC_DIR) PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD) + + AC_MSG_CHECKING([for destroySWFBlock]) + AC_TRY_RUN([ +#include ming.h +int destroySWFBlock(int a, int b) { + return a+b; +} +int main() { + return destroySWFBlock(-1,1); /* returns 0 only if function is not yet defined +*/ +} + ],[ +AC_MSG_RESULT([missing]) + ],[ +AC_DEFINE(HAVE_DESTROY_SWF_BLOCK,1,[ ]) +AC_MSG_RESULT([ok]) + ],[ +AC_MSG_RESULT([unknown]) + ]) PHP_NEW_EXTENSION(ming, ming.c, $ext_shared) PHP_SUBST(MING_SHARED_LIBADD) Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.40 php4/ext/ming/ming.c:1.41 --- php4/ext/ming/ming.c:1.40 Tue Nov 12 09:18:24 2002 +++ php4/ext/ming/ming.cTue Nov 12 10:09:43 2002 -32,6 +32,13 #if HAVE_MING +#define FLOAT_Z_DVAL_PP(x) ((float)Z_DVAL_PP(x)) +#define BYTE_Z_LVAL_PP(x) ((byte)Z_LVAL_PP(x)) + +#ifndef HAVE_DESTROY_SWF_BLOCK +void destroySWFBlock(SWFBlock block); +#endif + static zend_function_entry ming_functions[] = { PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL) PHP_FALIAS(ming_setscale, ming_setScale, NULL) -78,7 +85,7 WRONG_PARAM_COUNT; } convert_to_double_ex(num); - Ming_setScale(Z_DVAL_PP(num)); + Ming_setScale(FLOAT_Z_DVAL_PP(num)); } /* }}} */ -488,7 +495,7 convert_to_object_ex(zchar); character = getCharacter(*zchar TSRMLS_CC); convert_to_long_ex(flags); - SWFButton_addShape(button, character, Z_LVAL_PP(flags)); + SWFButton_addShape(button, character, BYTE_Z_LVAL_PP(flags)); } /* }}} */ -601,7 +608,7 convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_moveTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_moveTo(getDisplayItem(getThis() TSRMLS_CC), FLOAT_Z_DVAL_PP(x), +FLOAT_Z_DVAL_PP(y)); } /* }}} */ -617,7 +624,7 convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_move(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_move(getDisplayItem(getThis() TSRMLS_CC), FLOAT_Z_DVAL_PP(x), +FLOAT_Z_DVAL_PP(y)); } /* }}} */ -632,14 +639,14 WRONG_PARAM_COUNT; } convert_to_double_ex(x); - SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(x)); + SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), +FLOAT_Z_DVAL_PP(x), FLOAT_Z_DVAL_PP(x)); } else if (ZEND_NUM_ARGS() == 2) { if (zend_get_parameters_ex(2, x, y) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_scaleTo(getDisplayItem(getThis() TSRMLS_CC), +FLOAT_Z_DVAL_PP(x), FLOAT_Z_DVAL_PP(y)); } else { WRONG_PARAM_COUNT; } -658,7 +665,7 convert_to_double_ex(x); convert_to_double_ex(y); - SWFDisplayItem_scale(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x), Z_DVAL_PP(y)); + SWFDisplayItem_scale(getDisplayItem(getThis() TSRMLS_CC), FLOAT_Z_DVAL_PP(x), +FLOAT_Z_DVAL_PP(y)); } /* }}} */ -673,7 +680,7 } convert_to_double_ex(degrees); - SWFDisplayItem_rotateTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); + SWFDisplayItem_rotateTo(getDisplayItem(getThis() TSRMLS_CC), +FLOAT_Z_DVAL_PP(degrees)); } /* }}} */ -688,7 +695,7 } convert_to_double_ex(degrees); - SWFDisplayItem_rotate(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(degrees)); + SWFDisplayItem_rotate(getDisplayItem(getThis() TSRMLS_CC), +FLOAT_Z_DVAL_PP(degrees)); } /* }}} */ -703,7 +710,7 } convert_to_double_ex(x); - SWFDisplayItem_skewXTo(getDisplayItem(getThis() TSRMLS_CC), Z_DVAL_PP(x)); + SWFDisplayItem_skewXTo(getDisplayItem(getThis() TSRMLS_CC), +FLOAT_Z_DVAL_PP(x)); } /* }}} */ -718,7 +725,7 } convert_to_double_ex(x); -
[PHP-CVS] cvs: php4 /sapi/cgi cgi_main.c
hholzgraTue Nov 12 11:37:47 2002 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.187 php4/sapi/cgi/cgi_main.c:1.188 --- php4/sapi/cgi/cgi_main.c:1.187 Tue Nov 5 17:04:10 2002 +++ php4/sapi/cgi/cgi_main.cTue Nov 12 11:37:47 2002 -522,7 +522,7 int main(int argc, char *argv[]) { int exit_status = SUCCESS; - int cgi = 0, c, i, len; + int cgi = 0, c, i, len, testmode = 0; zend_file_handle file_handle; int retval = FAILURE; char *s; -573,6 +573,10 #endif #endif +#ifndef PHP_FASTCGI + s = getenv(USER_AGENT); + if(s !strcmp(s, run-tests.php)) testmode = 1; +#endif #ifdef ZTS tsrm_startup(1, 1, 0, NULL); -875,11 +879,11 zend_llist_init(global_vars, sizeof(char *), NULL, 0); - if (!cgi + if ( testmode || (!cgi #ifdef PHP_FASTCGI !fastcgi #endif - ) { /* never execute the arguments if you are a CGI */ + )) { /* never execute the arguments if you are a CGI unless in +testmode*/ if (SG(request_info).argv0) { free(SG(request_info).argv0); SG(request_info).argv0 = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/cgi cgi_main.c
hholzgraTue Nov 12 11:41:15 2002 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: reverting accidential commit Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.188 php4/sapi/cgi/cgi_main.c:1.189 --- php4/sapi/cgi/cgi_main.c:1.188 Tue Nov 12 11:37:47 2002 +++ php4/sapi/cgi/cgi_main.cTue Nov 12 11:41:14 2002 -522,7 +522,7 int main(int argc, char *argv[]) { int exit_status = SUCCESS; - int cgi = 0, c, i, len, testmode = 0; + int cgi = 0, c, i, len; zend_file_handle file_handle; int retval = FAILURE; char *s; -573,10 +573,6 #endif #endif -#ifndef PHP_FASTCGI - s = getenv(USER_AGENT); - if(s !strcmp(s, run-tests.php)) testmode = 1; -#endif #ifdef ZTS tsrm_startup(1, 1, 0, NULL); -879,11 +875,11 zend_llist_init(global_vars, sizeof(char *), NULL, 0); - if ( testmode || (!cgi + if (!cgi #ifdef PHP_FASTCGI !fastcgi #endif - )) { /* never execute the arguments if you are a CGI unless in testmode*/ + ) { /* never execute the arguments if you are a CGI */ if (SG(request_info).argv0) { free(SG(request_info).argv0); SG(request_info).argv0 = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/odbc config.m4
sniper Tue Nov 12 12:31:39 2002 EDT Modified files: /php4/ext/odbc config.m4 Log: ws fixes Index: php4/ext/odbc/config.m4 diff -u php4/ext/odbc/config.m4:1.54 php4/ext/odbc/config.m4:1.55 --- php4/ext/odbc/config.m4:1.54Sun Oct 20 20:35:17 2002 +++ php4/ext/odbc/config.m4 Tue Nov 12 12:31:39 2002 -1,5 +1,5 dnl -dnl $Id: config.m4,v 1.54 2002/10/21 00:35:17 sniper Exp $ +dnl $Id: config.m4,v 1.55 2002/11/12 17:31:39 sniper Exp $ dnl dnl -12,22 +12,25 case $ac_solid_uname_s in AIX) ac_solid_os=a3x;; # a4x for AIX4/ Solid 2.3/3.0 only HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10 -IRIX) ac_solid_os=irx;; # Solid 2.3(?)/ 3.0 only -Linux) if ldd -v /bin/sh | grep GLIBC /dev/null; then - AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) - ac_solid_os=l2x - else - AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) - ac_solid_os=lux - fi;; -SunOS) ac_solid_os=ssx;; # should we deal with SunOS 4? -FreeBSD) if test `expr $ac_solid_uname_r : '\(.\)'` -gt 2; then - AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) - ac_solid_os=fex - else - AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) - ac_solid_os=fbx - fi +IRIX) ac_solid_os=irx;; # Solid 2.3(?)/ 3.0 only +Linux) + if ldd -v /bin/sh | grep GLIBC /dev/null; then +AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) +ac_solid_os=l2x + else +AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) +ac_solid_os=lux + fi;; +SunOS) + ac_solid_os=ssx;; # should we deal with SunOS 4? +FreeBSD) + if test `expr $ac_solid_uname_r : '\(.\)'` -gt 2; then +AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) +ac_solid_os=fex + else +AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) +ac_solid_os=fbx + fi;; esac if test -f $1/soc${ac_solid_os}35.a; then -46,28 +49,25 # if test ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so -a \ ! -f $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a; then - # - # we have an error and should bail out, as we can't find the libs! - # - echo - echo * - echo * Unable to locate $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a - echo * Please correct this by creating the following links and reconfiguring: - echo * $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a - $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a - echo * $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so - $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so - echo * + # + # we have an error and should bail out, as we can't find the libs! + # + echo + echo * + echo * Unable to locate +$1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so or +$1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a + echo * Please correct this by creating the following links and reconfiguring: + echo * $1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a - +$1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a + echo * $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so - +$1/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so + echo * else - ODBC_LFLAGS=-L$1 - ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} + ODBC_LFLAGS=-L$1 + ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} fi - AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`) ]) - - dnl dnl Figure out which library file to link with for the Empress support. dnl -107,8 +107,8 $srcdir/build/shtool mkdir -f -p ext/odbc rm -f $ODBC_LIB cp $ODBC_OBJS $ODBC_LIB - PHP_ADD_LIBRARY(sqlptc) - PHP_ADD_LIBRARY(sqlrte) +PHP_ADD_LIBRARY(sqlptc) +PHP_ADD_LIBRARY(sqlrte) PHP_ADD_LIBRARY_WITH_PATH(odbc_adabas, $abs_builddir/ext/odbc) ODBC_TYPE=adabas AC_DEFINE(HAVE_ADABAS,1,[ ]) -164,9 +164,9 ODBC_TYPE=solid if test -f $ODBC_LIBDIR/soc*35.a; then AC_DEFINE(HAVE_SOLID_35,1,[ ]) - elif test -f $ODBC_LIBDIR/scl*30.a; then - AC_DEFINE(HAVE_SOLID_30,1,[ ]) - elif test -f $ODBC_LIBDIR/scl*23.a; then +elif test -f $ODBC_LIBDIR/scl*30.a; then + AC_DEFINE(HAVE_SOLID_30,1,[ ]) +elif test -f $ODBC_LIBDIR/scl*23.a; then AC_DEFINE(HAVE_SOLID,1,[ ]) fi AC_MSG_RESULT(yes) -449,18 +449,18
[PHP-CVS] cvs: php4 / Makefile.global
sas Tue Nov 12 12:40:38 2002 EDT Modified files: /php4 Makefile.global Log: Add missing $(INSTALL_ROOT) Index: php4/Makefile.global diff -u php4/Makefile.global:1.39 php4/Makefile.global:1.40 --- php4/Makefile.global:1.39 Thu Oct 31 09:01:58 2002 +++ php4/Makefile.globalTue Nov 12 12:40:38 2002 -41,7 +41,7 install-tester: echo Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/ - $(mkinstalldirs) $(PEAR_INSTALLDIR) + $(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR) $(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR) install-su: install-pear install-tester -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbregex.c
iliaa Tue Nov 12 12:41:27 2002 EDT Modified files: /php4/ext/mbstring mbregex.c Log: Fixed a memory leak. Index: php4/ext/mbstring/mbregex.c diff -u php4/ext/mbstring/mbregex.c:1.15 php4/ext/mbstring/mbregex.c:1.16 --- php4/ext/mbstring/mbregex.c:1.15Sat Nov 2 08:38:32 2002 +++ php4/ext/mbstring/mbregex.c Tue Nov 12 12:41:26 2002 -1446,6 +1446,9 snprintf(error_msg, ERROR_MSG_MAX_SIZE, invalid regular expression; there's no previous pattern, to which '%c' would define cardinality at %d, c, p-pattern); + if (bufp-buffer) { + xfree(bufp-buffer); + } FREE_AND_RETURN(stackb, error_msg); } /* If there is a sequence of repetition chars, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/image getimagesize_swc.phpt
iliaa Tue Nov 12 12:47:20 2002 EDT Added files: /php4/ext/standard/tests/image getimagesize_swc.phpt Log: Added test for swc files (compressed swf files), this must be done in a separate test, since this test has a dependency on the zlib extension. Index: php4/ext/standard/tests/image/getimagesize_swc.phpt +++ php4/ext/standard/tests/image/getimagesize_swc.phpt --TEST-- GetImageSize() for compressed swf files --SKIPIF-- ?php if (!defined(IMAGETYPE_SWC) || !extension_loaded('zlib')) { die(skip zlib extension is not avaliable); } ? --FILE-- ?php var_dump(getimagesize(dirname(__FILE__) . /test13pix.swf)); ? --EXPECT-- array(5) { [0]= int(550) [1]= int(400) [2]= int(13) [3]= string(24) width=550 height=400 [mime]= string(29) application/x-shockwave-flash } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / Makefile.global
Sascha Schumann wrote: sas Tue Nov 12 12:40:38 2002 EDT Modified files: /php4 Makefile.global Log: Add missing $(INSTALL_ROOT) Does this fix #18568? Index: php4/Makefile.global diff -u php4/Makefile.global:1.39 php4/Makefile.global:1.40 --- php4/Makefile.global:1.39 Thu Oct 31 09:01:58 2002 +++ php4/Makefile.global Tue Nov 12 12:40:38 2002 @@ -41,7 +41,7 @@ install-tester: @echo Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/ - @$(mkinstalldirs) $(PEAR_INSTALLDIR) + @$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR) @$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR) install-su: install-pear install-tester -- Tal Peer [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbfilter.c mbfilter.h mbstring.c
moriyoshi Tue Nov 12 14:24:45 2002 EDT Modified files: /php4/ext/mbstring mbfilter.c mbfilter.h mbstring.c Log: Added neutral language spec for backwards compatibility Index: php4/ext/mbstring/mbfilter.c diff -u php4/ext/mbstring/mbfilter.c:1.49 php4/ext/mbstring/mbfilter.c:1.50 --- php4/ext/mbstring/mbfilter.c:1.49 Sun Nov 10 16:31:26 2002 +++ php4/ext/mbstring/mbfilter.cTue Nov 12 14:24:45 2002 -80,7 +80,7 * */ -/* $Id: mbfilter.c,v 1.49 2002/11/10 21:31:26 moriyoshi Exp $ */ +/* $Id: mbfilter.c,v 1.50 2002/11/12 19:24:45 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H -129,7 +129,17 #include unicode_table.h /* language structure */ -static const char *mbfl_language_uni_aliases[] = {universal, none, NULL}; +static const mbfl_language mbfl_language_neutral = { + mbfl_no_language_neutral, + neutral, + neutral, + NULL, + mbfl_no_encoding_utf8, + mbfl_no_encoding_base64, + mbfl_no_encoding_base64 +}; + +static const char *mbfl_language_uni_aliases[] = {universal, NULL}; static const mbfl_language mbfl_language_uni = { mbfl_no_language_uni, Index: php4/ext/mbstring/mbfilter.h diff -u php4/ext/mbstring/mbfilter.h:1.16 php4/ext/mbstring/mbfilter.h:1.17 --- php4/ext/mbstring/mbfilter.h:1.16 Sat Nov 9 12:05:47 2002 +++ php4/ext/mbstring/mbfilter.hTue Nov 12 14:24:45 2002 -86,7 +86,7 * */ -/* $Id: mbfilter.h,v 1.16 2002/11/09 17:05:47 moriyoshi Exp $ */ +/* $Id: mbfilter.h,v 1.17 2002/11/12 19:24:45 moriyoshi Exp $ */ #ifndef MBFL_MBFILTER_H -94,6 +94,7 enum mbfl_no_language { mbfl_no_language_invalid = -1, + mbfl_no_language_neutral, mbfl_no_language_uni, mbfl_no_language_min, mbfl_no_language_catalan, /* ca */ Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.136 php4/ext/mbstring/mbstring.c:1.137 --- php4/ext/mbstring/mbstring.c:1.136 Tue Nov 12 06:45:10 2002 +++ php4/ext/mbstring/mbstring.cTue Nov 12 14:24:45 2002 -17,7 +17,7 +--+ */ -/* $Id: mbstring.c,v 1.136 2002/11/12 11:45:10 helly Exp $ */ +/* $Id: mbstring.c,v 1.137 2002/11/12 19:24:45 moriyoshi Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) -721,7 +721,7 /* {{{ php.ini directive registration */ PHP_INI_BEGIN() -PHP_INI_ENTRY(mbstring.language, none, PHP_INI_SYSTEM | PHP_INI_PERDIR, OnUpdate_mbstring_language) +PHP_INI_ENTRY(mbstring.language, neutral, PHP_INI_SYSTEM | +PHP_INI_PERDIR, OnUpdate_mbstring_language) PHP_INI_ENTRY(mbstring.detect_order, NULL, PHP_INI_ALL, OnUpdate_mbstring_detect_order) PHP_INI_ENTRY(mbstring.http_input, pass, PHP_INI_ALL, OnUpdate_mbstring_http_input) PHP_INI_ENTRY(mbstring.http_output, pass, PHP_INI_ALL, OnUpdate_mbstring_http_output) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring/tests mb_send_mail01.phpt mb_send_mail02.phpt mb_send_mail03.phpt mb_send_mail04.phpt
moriyoshi Tue Nov 12 15:04:58 2002 EDT Added files: /php4/ext/mbstring/testsmb_send_mail01.phpt mb_send_mail02.phpt mb_send_mail03.phpt mb_send_mail04.phpt Log: Added test cases for mb_send_mail() Index: php4/ext/mbstring/tests/mb_send_mail01.phpt +++ php4/ext/mbstring/tests/mb_send_mail01.phpt --TEST-- mb_send_mail() test 1 (lang=neutral) --SKIPIF-- ?php if (@mb_send_mail() === false || !mb_language(neutral)) { die(skip mb_send_mail() not available); } ? --INI-- sendmail_path=cat --FILE-- ?php $to = '[EMAIL PROTECTED]'; /* default setting */ mb_send_mail($to, mb_language(), test); /* neutral (UTF-8) */ if (mb_language(neutral)) { mb_send_mail($to, test .mb_language(), test); } ? --EXPECTF-- To: [EMAIL PROTECTED] Subject: %s Mime-Version: 1.0 Content-Type: text/plain; charset=%s Content-Transfer-Encoding: %s test To: [EMAIL PROTECTED] Subject: test neutral Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: BASE64 test Index: php4/ext/mbstring/tests/mb_send_mail02.phpt +++ php4/ext/mbstring/tests/mb_send_mail02.phpt --TEST-- mb_send_mail() test 2 (lang=Japanese) --SKIPIF-- ?php if (@mb_send_mail() === false || !mb_language(japanese)) { die(skip mb_send_mail() not available); } ? --INI-- sendmail_path=cat --FILE-- ?php $to = '[EMAIL PROTECTED]'; /* default setting */ mb_send_mail($to, mb_language(), test); /* Japanese (EUC-JP) */ if (mb_language(japanese)) { mb_send_mail($to, ¥Æ¥¹¥È .mb_language(), ¥Æ¥¹¥È); } ? --EXPECTF-- To: [EMAIL PROTECTED] Subject: %s Mime-Version: 1.0 Content-Type: text/plain; charset=%s Content-Transfer-Encoding: %s test To: [EMAIL PROTECTED] Subject: =?ISO-2022-JP?B?GyRCJUYlOSVIGyhCIEphcGFuZXNl?= Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit $B%F%9%H(B Index: php4/ext/mbstring/tests/mb_send_mail03.phpt +++ php4/ext/mbstring/tests/mb_send_mail03.phpt --TEST-- mb_send_mail() test 3 (lang=English) --SKIPIF-- ?php if (@mb_send_mail() === false || !mb_language(german)) { die(skip mb_send_mail() not available); } ? --INI-- sendmail_path=cat --FILE-- ?php $to = '[EMAIL PROTECTED]'; /* default setting */ mb_send_mail($to, mb_language(), test); /* English (iso-8859-1) */ if (mb_language(english)) { mb_send_mail($to, test .mb_language(), test); } ? --EXPECTF-- To: [EMAIL PROTECTED] Subject: %s Mime-Version: 1.0 Content-Type: text/plain; charset=%s Content-Transfer-Encoding: %s test To: [EMAIL PROTECTED] Subject: test English Mime-Version: 1.0 Content-Type: text/plain; charset=%s-8859-1 Content-Transfer-Encoding: 8bit test Index: php4/ext/mbstring/tests/mb_send_mail04.phpt +++ php4/ext/mbstring/tests/mb_send_mail04.phpt --TEST-- mb_send_mail() test 4 (lang=German) --SKIPIF-- ?php if (@mb_send_mail() === false || !mb_language(german)) { die(skip mb_send_mail() not available); } ? --INI-- sendmail_path=cat --FILE-- ?php $to = '[EMAIL PROTECTED]'; /* default setting */ mb_send_mail($to, mb_language(), test); /* German (iso-8859-15) */ if (mb_language(german)) { mb_send_mail($to, Pr.\xfc.fung .mb_language(), Pr.\xfc.fung); } ? --EXPECTF-- To: [EMAIL PROTECTED] Subject: %s Mime-Version: 1.0 Content-Type: text/plain; charset=%s Content-Transfer-Encoding: %s test To: [EMAIL PROTECTED] Subject: =?ISO-8859-15?Q?Pr=FCfung=20German?= Mime-Version: 1.0 Content-Type: text/plain; charset=%s-8859-15 Content-Transfer-Encoding: 8bit Prüfung -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring/tests mb_send_mail03.phpt
moriyoshi Tue Nov 12 15:06:21 2002 EDT Modified files: /php4/ext/mbstring/testsmb_send_mail03.phpt Log: Fixed language name Index: php4/ext/mbstring/tests/mb_send_mail03.phpt diff -u php4/ext/mbstring/tests/mb_send_mail03.phpt:1.1 php4/ext/mbstring/tests/mb_send_mail03.phpt:1.2 --- php4/ext/mbstring/tests/mb_send_mail03.phpt:1.1 Tue Nov 12 15:04:58 2002 +++ php4/ext/mbstring/tests/mb_send_mail03.phpt Tue Nov 12 15:06:20 2002 -2,7 +2,7 mb_send_mail() test 3 (lang=English) --SKIPIF-- ?php -if (mb_send_mail() === false || !mb_language(german)) { +if (mb_send_mail() === false || !mb_language(english)) { die(skip mb_send_mail() not available); } ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main SAPI.h php_ini.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c
helly Tue Nov 12 15:56:47 2002 EDT Modified files: /php4/sapi/cgi cgi_main.c /php4/sapi/cli php_cli.c /php4/main php_ini.c SAPI.h Log: Implemented -n switch to skip parsing ini at startup as suggested by Wez. #The switch 'n' was planned to be used for beautifyingdelete n to make #clear these functions do not have a switch yet. Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.189 php4/sapi/cgi/cgi_main.c:1.190 --- php4/sapi/cgi/cgi_main.c:1.189 Tue Nov 12 11:41:14 2002 +++ php4/sapi/cgi/cgi_main.cTue Nov 12 15:56:46 2002 -406,6 +406,7 #endif -C Do not chdir to the script's directory\n -c path|file Look for php.ini file in this directory\n +-n No php.ini file will be used\n -d foo[=bar] Define INI entry foo with value 'bar'\n -e Generate extended information for debugger/profiler\n -f fileParse file. Implies `-q'\n -617,6 +618,9 case 'c': cgi_sapi_module.php_ini_path_override = strdup(ap_php_optarg); break; + case 'n': + cgi_sapi_module.php_ini_ignore = 1; + break; } } -884,6 +888,17 free(SG(request_info).argv0); SG(request_info).argv0 = NULL; } + + if (cgi_sapi_module.php_ini_path_override +cgi_sapi_module.php_ini_ignore) { + no_headers = 1; + php_output_startup(); + php_output_activate(TSRMLS_C); + SG(headers_sent) = 1; + php_printf(You cannot use both -n and -c switch. Use +-h for help.\n); + php_end_ob_buffers(1 TSRMLS_CC); + exit(1); + } + while ((c = ap_php_getopt(argc, argv, OPTSTRING)) != -1) { switch (c) { -960,7 +975,7 break; #if 0 /* not yet operational, see also below ... */ - case 'n': /* generate indented source mode*/ + case '': /* generate indented source mode*/ behavior=PHP_MODE_INDENT; break; #endif Index: php4/sapi/cli/php_cli.c diff -u php4/sapi/cli/php_cli.c:1.49 php4/sapi/cli/php_cli.c:1.50 --- php4/sapi/cli/php_cli.c:1.49Tue Nov 5 17:04:12 2002 +++ php4/sapi/cli/php_cli.c Tue Nov 12 15:56:46 2002 -264,6 +264,7 %s [options] [-- args...]\n -a Run interactively\n -c path|file Look for php.ini file in this directory\n + -n No php.ini file will be used\n -d foo[=bar] Define INI entry foo with value 'bar'\n -e Generate extended information for debugger/profiler\n -f fileParse file.\n -423,8 +424,10 case 'c': cli_sapi_module.php_ini_path_override = strdup(ap_php_optarg); break; + case 'n': + cli_sapi_module.php_ini_ignore = 1; + break; } - } ap_php_optind = orig_optind; ap_php_optarg = orig_optarg; -479,6 +482,13 zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */ + if (cli_sapi_module.php_ini_path_override +cli_sapi_module.php_ini_ignore) { + SG(headers_sent) = 1; + SG(request_info).no_headers = 1; + PUTS(You cannot use both -n and -c switch. Use -h for +help.\n); + exit(1); + } + while ((c = ap_php_getopt(argc, argv, OPTSTRING)) != -1) { switch (c) { -561,7 +571,7 break; #if 0 /* not yet operational, see also below ... */ - case 'n': /* generate indented source mode*/ + case '': /* generate indented source mode*/ if (behavior == PHP_MODE_CLI_DIRECT) {
[PHP-CVS] cvs: php4 /ext/dbase dbf_rec.c
helly Tue Nov 12 16:03:11 2002 EDT Modified files: /php4/ext/dbase dbf_rec.c Log: ftruncate is defined in flock_compat.h on windows Index: php4/ext/dbase/dbf_rec.c diff -u php4/ext/dbase/dbf_rec.c:1.6 php4/ext/dbase/dbf_rec.c:1.7 --- php4/ext/dbase/dbf_rec.c:1.6Tue Nov 12 08:11:37 2002 +++ php4/ext/dbase/dbf_rec.cTue Nov 12 16:03:10 2002 -4,11 +4,19 * All Rights Reserved */ +#ifdef HAVE_CONFIG_H +#include config.h +#endif + +#include php.h + +#include ext/standard/flock_compat.h + #include stdio.h #include fcntl.h #include dbf.h - + int get_piece(dbhead_t *dbh, long offset, char *cp, int len); int put_piece(dbhead_t *dbh, long offset, char *cp, int len); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/ming ming.c
helly Tue Nov 12 16:10:51 2002 EDT Modified files: /php4/ext/ming ming.c Log: fix warnings Index: php4/ext/ming/ming.c diff -u php4/ext/ming/ming.c:1.41 php4/ext/ming/ming.c:1.42 --- php4/ext/ming/ming.c:1.41 Tue Nov 12 10:09:43 2002 +++ php4/ext/ming/ming.cTue Nov 12 16:10:51 2002 -1201,7 +1201,7 WRONG_PARAM_COUNT; } convert_to_long_ex(za); - a = Z_LVAL_PP(za); + a = BYTE_Z_LVAL_PP(za); } else { WRONG_PARAM_COUNT; } -1212,7 +1212,7 convert_to_long_ex(b); SWFGradient_addEntry( getGradient(getThis() TSRMLS_CC), - FLOAT_Z_DVAL_PP(ratio), Z_LVAL_PP(r), Z_LVAL_PP(g), Z_LVAL_PP(b), a + FLOAT_Z_DVAL_PP(ratio), BYTE_Z_LVAL_PP(r), BYTE_Z_LVAL_PP(g), +BYTE_Z_LVAL_PP(b), a ); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/strings htmlentities02.phpt htmlentities03.phpt htmlentities04.phpt
moriyoshi Tue Nov 12 16:37:55 2002 EDT Modified files: /php4/ext/standard/tests/stringshtmlentities02.phpt htmlentities03.phpt htmlentities04.phpt Log: Fixed the tests so that they won't be affected by the ini setting of default_charset Index: php4/ext/standard/tests/strings/htmlentities02.phpt diff -u php4/ext/standard/tests/strings/htmlentities02.phpt:1.6 php4/ext/standard/tests/strings/htmlentities02.phpt:1.7 --- php4/ext/standard/tests/strings/htmlentities02.phpt:1.6 Wed Nov 6 10:14:58 2002 +++ php4/ext/standard/tests/strings/htmlentities02.phpt Tue Nov 12 16:37:54 2002 -9,7 +9,8 ? --INI-- output_handler= -mbstring.internal_encoding=pass +default_charset= +mbstring.internal_encoding=none --FILE-- ?php setlocale( LC_CTYPE, fr_FR.ISO-8859-15, fr_FR.ISO8859-15 ); Index: php4/ext/standard/tests/strings/htmlentities03.phpt diff -u php4/ext/standard/tests/strings/htmlentities03.phpt:1.6 php4/ext/standard/tests/strings/htmlentities03.phpt:1.7 --- php4/ext/standard/tests/strings/htmlentities03.phpt:1.6 Wed Nov 6 10:14:58 2002 +++ php4/ext/standard/tests/strings/htmlentities03.phpt Tue Nov 12 16:37:54 2002 -9,7 +9,8 ? --INI-- output_handler= -mbstring.internal_encoding=pass +default_charset= +mbstring.internal_encoding=none --FILE-- ?php setlocale( LC_CTYPE, de_DE.ISO-8859-1, de_DE.ISO8859-1); Index: php4/ext/standard/tests/strings/htmlentities04.phpt diff -u php4/ext/standard/tests/strings/htmlentities04.phpt:1.6 php4/ext/standard/tests/strings/htmlentities04.phpt:1.7 --- php4/ext/standard/tests/strings/htmlentities04.phpt:1.6 Wed Nov 6 10:14:58 2002 +++ php4/ext/standard/tests/strings/htmlentities04.phpt Tue Nov 12 16:37:54 2002 -9,7 +9,8 ? --INI-- output_handler= -mbstring.internal_encoding=pass +default_charset= +mbstring.internal_encoding=none --FILE-- ?php setlocale( LC_CTYPE, ja_JP.EUC-JP, ja_JP.eucJP ); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c
moriyoshi Tue Nov 12 16:58:54 2002 EDT Modified files: /php4/ext/mbstring mbstring.c Log: Fixed a function overloading related bug. # Yet I suspect the problem is in another place... Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.137 php4/ext/mbstring/mbstring.c:1.138 --- php4/ext/mbstring/mbstring.c:1.137 Tue Nov 12 14:24:45 2002 +++ php4/ext/mbstring/mbstring.cTue Nov 12 16:58:53 2002 -17,7 +17,7 +--+ */ -/* $Id: mbstring.c,v 1.137 2002/11/12 19:24:45 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.138 2002/11/12 21:58:53 moriyoshi Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) -916,11 +916,12 if (zend_hash_find(EG(function_table), p-orig_func, strlen(p-orig_func)+1, (void **)orig) != SUCCESS) { php_error_docref(ref.mbstring TSRMLS_CC, E_ERROR, mbstring couldn't find function %s., p-orig_func); - } - zend_hash_add(EG(function_table), p-save_func, strlen(p-save_func)+1, orig, sizeof(zend_function), NULL); - if (zend_hash_update(EG(function_table), p-orig_func, strlen(p-orig_func)+1, + } else { + zend_hash_add(EG(function_table), +p-save_func, strlen(p-save_func)+1, orig, sizeof(zend_function), NULL); + if (zend_hash_update(EG(function_table), +p-orig_func, strlen(p-orig_func)+1, func, sizeof(zend_function), NULL) == FAILURE){ - php_error_docref(ref.mbstring TSRMLS_CC, E_ERROR, mbstring couldn't replace function %s., p-orig_func); + php_error_docref(ref.mbstring +TSRMLS_CC, E_ERROR, mbstring couldn't replace function %s., p-orig_func); + } } } p++; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c
moriyoshi Tue Nov 12 17:05:19 2002 EDT Modified files: /php4/ext/mbstring mbstring.c Log: Cosmetics Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.138 php4/ext/mbstring/mbstring.c:1.139 --- php4/ext/mbstring/mbstring.c:1.138 Tue Nov 12 16:58:53 2002 +++ php4/ext/mbstring/mbstring.cTue Nov 12 17:05:18 2002 -17,7 +17,7 +--+ */ -/* $Id: mbstring.c,v 1.138 2002/11/12 21:58:53 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.139 2002/11/12 22:05:18 moriyoshi Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) -910,17 +910,29 while (p-type 0) { if ((MBSTRG(func_overload) p-type) == p-type - zend_hash_find(EG(function_table), p-save_func, strlen(p-save_func)+1 , (void **)orig) != SUCCESS) { + zend_hash_find(EG(function_table), p-save_func, + strlen(p-save_func)+1, (void **)orig) != +SUCCESS) { + zend_hash_find(EG(function_table), p-ovld_func, strlen(p-ovld_func)+1 , (void **)func); if (zend_hash_find(EG(function_table), p-orig_func, - strlen(p-orig_func)+1, (void **)orig) != SUCCESS) { - php_error_docref(ref.mbstring TSRMLS_CC, E_ERROR, mbstring couldn't find function %s., p-orig_func); + strlen(p-orig_func)+1, (void +**)orig) != SUCCESS) { + + php_error_docref(ref.mbstring TSRMLS_CC, +E_ERROR, + mbstring couldn't find function %s., +p-orig_func); + } else { - zend_hash_add(EG(function_table), p-save_func, strlen(p-save_func)+1, orig, sizeof(zend_function), NULL); - if (zend_hash_update(EG(function_table), p-orig_func, strlen(p-orig_func)+1, -func, sizeof(zend_function), NULL) == FAILURE){ - php_error_docref(ref.mbstring TSRMLS_CC, E_ERROR, mbstring couldn't replace function %s., p-orig_func); + + zend_hash_add(EG(function_table), p-save_func, + strlen(p-save_func)+1, orig, + sizeof(zend_function), NULL); + + if (zend_hash_update(EG(function_table), +p-orig_func, + strlen(p-orig_func)+1, func, +sizeof(zend_function), + NULL) == FAILURE) { + + php_error_docref(ref.mbstring +TSRMLS_CC, E_ERROR, + mbstring couldn't replace +function %s., p-orig_func); } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/db db.dsp
edink Tue Nov 12 17:44:11 2002 EDT Modified files: /php4/ext/dbdb.dsp Log: Fix build. flock_compat.c and flock_compat.h are now in the exported part of php4ts.dll. Index: php4/ext/db/db.dsp diff -u php4/ext/db/db.dsp:1.4 php4/ext/db/db.dsp:1.5 --- php4/ext/db/db.dsp:1.4 Wed Sep 19 13:48:28 2001 +++ php4/ext/db/db.dsp Tue Nov 12 17:44:11 2002 -97,18 +97,10 SOURCE=.\db.c # End Source File -# Begin Source File - -SOURCE=..\standard\flock_compat.c -# End Source File # End Group # Begin Group Header Files # PROP Default_Filter h;hpp;hxx;hm;inl -# Begin Source File - -SOURCE=..\standard\flock_compat.h -# End Source File # Begin Source File SOURCE=.\php_db.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/mysql php_mysql.c
On Tue, 2002-11-12 at 02:41, Zak Greant wrote: ... Simple tests of opening pconnects indicate that only about 10k of data per ping needs to be returned to the client per connection check, rather than about 110k per status check. Hrm. The hazards of working until late in the evening - this of course should read: 10 bytes and 110 bytes rather than kb :) --zak -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/sybase_ct php_sybase_ct.c
edink Tue Nov 12 17:59:14 2002 EDT Modified files: /php4/ext/sybase_ct php_sybase_ct.c Log: Fixed ZTS build and removed an unused variable. Index: php4/ext/sybase_ct/php_sybase_ct.c diff -u php4/ext/sybase_ct/php_sybase_ct.c:1.72 php4/ext/sybase_ct/php_sybase_ct.c:1.73 --- php4/ext/sybase_ct/php_sybase_ct.c:1.72 Tue Nov 12 08:13:12 2002 +++ php4/ext/sybase_ct/php_sybase_ct.c Tue Nov 12 17:59:11 2002 -18,7 +18,7 +--+ */ -/* $Id: php_sybase_ct.c,v 1.72 2002/11/12 13:13:12 thekid Exp $ */ +/* $Id: php_sybase_ct.c,v 1.73 2002/11/12 22:59:11 edink Exp $ */ #ifdef HAVE_CONFIG_H -307,6 +307,7 static void php_sybase_init_globals(zend_sybase_globals *sybase_globals) { long timeout; + TSRMLS_FETCH(); if (cs_ctx_alloc(CTLIB_VERSION, sybase_globals-context)!=CS_SUCCEED || ct_init(sybase_globals-context, CTLIB_VERSION)!=CS_SUCCEED) { return; -940,6 +941,7 int i; CS_RETCODE retcode; CS_INT restype; + TSRMLS_FETCH(); efree(result-datafmt); efree(result-lengths); -2025,7 +2027,6 PHP_FUNCTION(sybase_set_message_handler) { zval ***params; - zval *retval_ptr; char *name; int argc = ZEND_NUM_ARGS(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysql/libmysql libmysql.c my_getwd.c my_tempnam.c
sniper Tue Nov 12 18:34:07 2002 EDT Modified files: /php4/ext/mysql/libmysqllibmysql.c my_getwd.c my_tempnam.c Log: Using // is not very good idea.. Index: php4/ext/mysql/libmysql/libmysql.c diff -u php4/ext/mysql/libmysql/libmysql.c:1.10 php4/ext/mysql/libmysql/libmysql.c:1.11 --- php4/ext/mysql/libmysql/libmysql.c:1.10 Fri Jun 7 11:07:53 2002 +++ php4/ext/mysql/libmysql/libmysql.c Tue Nov 12 18:34:06 2002 -56,7 +56,7 #endif #if defined(MSDOS) || defined(__WIN__) -// socket_errno is defined in global.h for all platforms +/* socket_errno is defined in global.h for all platforms */ #define perror(A) #else #include errno.h Index: php4/ext/mysql/libmysql/my_getwd.c diff -u php4/ext/mysql/libmysql/my_getwd.c:1.6 php4/ext/mysql/libmysql/my_getwd.c:1.7 --- php4/ext/mysql/libmysql/my_getwd.c:1.6 Fri Jun 7 11:07:53 2002 +++ php4/ext/mysql/libmysql/my_getwd.c Tue Nov 12 18:34:06 2002 -19,7 +19,7 #endif #ifdef __EMX__ -// chdir2 support also drive change +/* chdir2 support also drive change */ #define chdir _chdir2 #endif Index: php4/ext/mysql/libmysql/my_tempnam.c diff -u php4/ext/mysql/libmysql/my_tempnam.c:1.6 php4/ext/mysql/libmysql/my_tempnam.c:1.7 --- php4/ext/mysql/libmysql/my_tempnam.c:1.6Fri Aug 23 11:56:34 2002 +++ php4/ext/mysql/libmysql/my_tempnam.cTue Nov 12 18:34:06 2002 -85,10 +85,10 dir=temp; } #ifdef OS2 - // changing environ variable doesn't work with VACPP + /* changing environ variable doesn't work with VACPP */ char buffer[256]; sprintf( buffer, TMP=%s, dir); - // remove ending backslash + /* remove ending backslash */ if (buffer[strlen(buffer)-1] == '\\') buffer[strlen(buffer)-1] = '\0'; putenv( buffer); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard string.c
I do not get those so i do not fix them. At 05:17 09.11.2002, Maxim Maletsky wrote: Actually, i was just about to mention one thing - in math.c on line 779 (I think) it warn of an unasigned comparison compilation. I was about to work out a patch and submit it as I got no karma for that part. Why don't you take over it once you're there :) -- Maxim Maletsky [EMAIL PROTECTED] On Thu, 24 Oct 2002 19:11:50 - Marcus Börger [EMAIL PROTECTED] wrote: helly Thu Oct 24 15:11:50 2002 EDT Modified files: /php4/ext/standardstring.c Log: fix compiler warning Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.327 php4/ext/standard/string.c:1.328 --- php4/ext/standard/string.c:1.327 Tue Oct 22 14:27:56 2002 +++ php4/ext/standard/string.cThu Oct 24 15:11:49 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.327 2002/10/22 18:27:56 helly Exp $ */ +/* $Id: string.c,v 1.328 2002/10/24 19:11:49 helly Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -915,6 +915,7 @@ case 1: tok = args[0]; break; + default: case 2: str = args[0]; tok = args[1]; @@ -1198,7 +1199,7 @@ PHP_FUNCTION(pathinfo) { zval *tmp; - char *path, *ret; + char *path, *ret = NULL; int path_len; int opt = PHP_PATHINFO_ALL; @@ -3182,6 +3183,7 @@ if (Z_TYPE_PP(args[1]) == IS_ARRAY) { zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1])); + i=0; /* not needed in this case: only kill a compiler warning */ } else { i=1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/standard string.c
I get it if compile with VC++. line 779 unsigned mismatch --- Maxim Maletsky [EMAIL PROTECTED] On Sat, 09 Nov 2002 11:05:15 +0100 [EMAIL PROTECTED] (Marcus Börger) wrote: I do not get those so i do not fix them. At 05:17 09.11.2002, Maxim Maletsky wrote: Actually, i was just about to mention one thing - in math.c on line 779 (I think) it warn of an unasigned comparison compilation. I was about to work out a patch and submit it as I got no karma for that part. Why don't you take over it once you're there :) -- Maxim Maletsky [EMAIL PROTECTED] On Thu, 24 Oct 2002 19:11:50 - Marcus Börger [EMAIL PROTECTED] wrote: helly Thu Oct 24 15:11:50 2002 EDT Modified files: /php4/ext/standardstring.c Log: fix compiler warning Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.327 php4/ext/standard/string.c:1.328 --- php4/ext/standard/string.c:1.327 Tue Oct 22 14:27:56 2002 +++ php4/ext/standard/string.cThu Oct 24 15:11:49 2002 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.327 2002/10/22 18:27:56 helly Exp $ */ +/* $Id: string.c,v 1.328 2002/10/24 19:11:49 helly Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -915,6 +915,7 @@ case 1: tok = args[0]; break; + default: case 2: str = args[0]; tok = args[1]; @@ -1198,7 +1199,7 @@ PHP_FUNCTION(pathinfo) { zval *tmp; - char *path, *ret; + char *path, *ret = NULL; int path_len; int opt = PHP_PATHINFO_ALL; @@ -3182,6 +3183,7 @@ if (Z_TYPE_PP(args[1]) == IS_ARRAY) { zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1])); + i=0; /* not needed in this case: only kill a compiler warning */ } else { i=1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring config.m4
andrei Tue Nov 12 23:36:04 2002 EDT Modified files: /php4/ext/mbstring config.m4 Log: Disable mbstring by default. Index: php4/ext/mbstring/config.m4 diff -u php4/ext/mbstring/config.m4:1.27 php4/ext/mbstring/config.m4:1.28 --- php4/ext/mbstring/config.m4:1.27Thu Oct 10 12:57:52 2002 +++ php4/ext/mbstring/config.m4 Tue Nov 12 23:36:04 2002 -1,9 +1,9 dnl -dnl $Id: config.m4,v 1.27 2002/10/10 16:57:52 moriyoshi Exp $ +dnl $Id: config.m4,v 1.28 2002/11/13 04:36:04 andrei Exp $ dnl PHP_ARG_ENABLE(mbstring, whether to enable multibyte string support, -[ --disable-mbstring Disable multibyte string support], yes) +[ --enable-mbstring Enable multibyte string support]) if test $PHP_MBSTRING != no; then AC_DEFINE(HAVE_MBSTRING,1,[whether to have multibyte string support]) -36,7 +36,7 PHP_ARG_ENABLE(mbregex, whether to enable multibyte regex support, -[ --disable-mbregex Disable multibyte regex support], yes, no) +[ --enable-mbregexEnable multibyte regex support], no, no) if test $PHP_MBREGEX != no ; then AC_DEFINE(HAVE_MBREGEX, 1, [whether to have multibyte regex support]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /main config.w32.h.in
sebastian Wed Nov 13 01:47:43 2002 EDT Modified files: /php4/main config.w32.h.in Log: Disable mbstring (and sync behaviour with *NIX per Andrei's commit). Index: php4/main/config.w32.h.in diff -u php4/main/config.w32.h.in:1.21 php4/main/config.w32.h.in:1.22 --- php4/main/config.w32.h.in:1.21 Thu Oct 31 22:25:21 2002 +++ php4/main/config.w32.h.in Wed Nov 13 01:47:43 2002 -2,7 +2,7 Build Configuration for Win32. This has only been tested with MS VisualC++ 6 (and later). - $Id: config.w32.h.in,v 1.21 2002/11/01 03:25:21 iliaa Exp $ + $Id: config.w32.h.in,v 1.22 2002/11/13 06:47:43 sebastian Exp $ */ /* Default PHP / PEAR directories */ -41,14 +41,14 /* Enable / Disable FTP extension (default: enabled) */ #define HAVE_FTP 1 -/* Enable / Disable MBSTRING extension (default: enabled) */ -#define HAVE_MBSTRING 1 -#define HAVE_MBREGEX 1 -#define HAVE_MBSTR_CN 1 -#define HAVE_MBSTR_JA 1 -#define HAVE_MBSTR_KR 1 -#define HAVE_MBSTR_RU 1 -#define HAVE_MBSTR_TW 1 +/* Enable / Disable MBSTRING extension (default: disabled) */ +#define HAVE_MBSTRING 0 +#define HAVE_MBREGEX 0 +#define HAVE_MBSTR_CN 0 +#define HAVE_MBSTR_JA 0 +#define HAVE_MBSTR_KR 0 +#define HAVE_MBSTR_RU 0 +#define HAVE_MBSTR_TW 0 /* Enable / Disable MySQL extension (default: enabled) */ #define HAVE_MYSQL 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c
moriyoshi Wed Nov 13 02:40:11 2002 EDT Modified files: /php4/ext/mbstring mbstring.c Log: Fixed a buffer over-run bug in case a function to be overloaded doesn't exist. # This patch was made by Ilia. Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.139 php4/ext/mbstring/mbstring.c:1.140 --- php4/ext/mbstring/mbstring.c:1.139 Tue Nov 12 17:05:18 2002 +++ php4/ext/mbstring/mbstring.cWed Nov 13 02:40:11 2002 -17,7 +17,7 +--+ */ -/* $Id: mbstring.c,v 1.139 2002/11/12 22:05:18 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.140 2002/11/13 07:40:11 moriyoshi Exp $ */ /* * PHP4 Multibyte String module mbstring (currently only for Japanese) -915,24 +915,16 zend_hash_find(EG(function_table), p-ovld_func, strlen(p-ovld_func)+1 , (void **)func); - if (zend_hash_find(EG(function_table), p-orig_func, - strlen(p-orig_func)+1, (void **)orig) != SUCCESS) { - - php_error_docref(ref.mbstring TSRMLS_CC, E_ERROR, - mbstring couldn't find function %s., p-orig_func); - + if (zend_hash_find(EG(function_table), p-orig_func, +strlen(p-orig_func)+1, (void **)orig) != SUCCESS) { + php_error_docref(ref.mbstring TSRMLS_CC, +E_WARNING, mbstring couldn't find function %s., p-orig_func); + return FAILURE; } else { + zend_hash_add(EG(function_table), +p-save_func, strlen(p-save_func)+1, orig, sizeof(zend_function), NULL); - zend_hash_add(EG(function_table), p-save_func, - strlen(p-save_func)+1, orig, - sizeof(zend_function), NULL); - - if (zend_hash_update(EG(function_table), p-orig_func, - strlen(p-orig_func)+1, func, sizeof(zend_function), + if (zend_hash_update(EG(function_table), +p-orig_func, strlen(p-orig_func)+1, func, sizeof(zend_function), NULL) == FAILURE) { - - php_error_docref(ref.mbstring TSRMLS_CC, E_ERROR, - mbstring couldn't replace function %s., p-orig_func); + php_error_docref(ref.mbstring +TSRMLS_CC, E_WARNING, mbstring couldn't replace function %s., p-orig_func); + return FAILURE; } } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php