abies Mon Mar 8 18:11:46 2004 EDT Modified files: /php-src/ext/standard var.c datetime.c /php-src/main spprintf.c /php-src/main/streams userspace.c xp_socket.c /php-src/ext/sqlite/libsqlite/src main.c table.c vdbeaux.c Log: More wordsize fixes
http://cvs.php.net/diff.php/php-src/ext/standard/var.c?r1=1.185&r2=1.186&ty=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.185 php-src/ext/standard/var.c:1.186 --- php-src/ext/standard/var.c:1.185 Sun Mar 7 22:06:56 2004 +++ php-src/ext/standard/var.c Mon Mar 8 18:11:43 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.185 2004/03/08 03:06:56 iliaa Exp $ */ +/* $Id: var.c,v 1.186 2004/03/08 23:11:43 abies Exp $ */ /* {{{ includes @@ -740,7 +740,7 @@ if (!php_var_unserialize(&return_value, &p, p + Z_STRLEN_PP(buf), &var_hash TSRMLS_CC)) { PHP_VAR_UNSERIALIZE_DESTROY(var_hash); zval_dtor(return_value); - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %d of %d bytes", p - Z_STRVAL_PP(buf), Z_STRLEN_PP(buf)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %ld of %d bytes", (long)(p - Z_STRVAL_PP(buf)), Z_STRLEN_PP(buf)); RETURN_FALSE; } PHP_VAR_UNSERIALIZE_DESTROY(var_hash); http://cvs.php.net/diff.php/php-src/ext/standard/datetime.c?r1=1.115&r2=1.116&ty=u Index: php-src/ext/standard/datetime.c diff -u php-src/ext/standard/datetime.c:1.115 php-src/ext/standard/datetime.c:1.116 --- php-src/ext/standard/datetime.c:1.115 Wed Feb 11 20:31:57 2004 +++ php-src/ext/standard/datetime.c Mon Mar 8 18:11:43 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: datetime.c,v 1.115 2004/02/12 01:31:57 sniper Exp $ */ +/* $Id: datetime.c,v 1.116 2004/03/08 23:11:43 abies Exp $ */ #include "php.h" #include "zend_operators.h" @@ -83,7 +83,8 @@ struct tm *ta, tmbuf; time_t t, seconds; int i, gmadjust, arg_count = ZEND_NUM_ARGS(); - int is_dst = -1, val, chgsecs = 0; + int is_dst = -1, chgsecs = 0; + long val; if (arg_count > 7 || zend_get_parameters_array_ex(arg_count, arguments) == FAILURE) { WRONG_PARAM_COUNT; http://cvs.php.net/diff.php/php-src/main/spprintf.c?r1=1.22&r2=1.23&ty=u Index: php-src/main/spprintf.c diff -u php-src/main/spprintf.c:1.22 php-src/main/spprintf.c:1.23 --- php-src/main/spprintf.c:1.22 Thu Jan 8 03:17:54 2004 +++ php-src/main/spprintf.c Mon Mar 8 18:11:44 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spprintf.c,v 1.22 2004/01/08 08:17:54 andi Exp $ */ +/* $Id: spprintf.c,v 1.23 2004/03/08 23:11:44 abies Exp $ */ /* This is the spprintf implementation. * It has emerged from apache snprintf. See original header: @@ -149,7 +149,7 @@ while (isdigit((int)*str)) { \ num *= 10; \ num += NUM(*str++); \ - if (num >= LONG_MAX / 10) { \ + if (num >= INT_MAX / 10) { \ while (isdigit((int)*str++)); \ break; \ } \ http://cvs.php.net/diff.php/php-src/main/streams/userspace.c?r1=1.21&r2=1.22&ty=u Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.21 php-src/main/streams/userspace.c:1.22 --- php-src/main/streams/userspace.c:1.21 Sun Mar 7 17:05:21 2004 +++ php-src/main/streams/userspace.c Mon Mar 8 18:11:45 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: userspace.c,v 1.21 2004/03/07 22:05:21 wez Exp $ */ +/* $Id: userspace.c,v 1.22 2004/03/08 23:11:45 abies Exp $ */ #include "php.h" #include "php_globals.h" @@ -469,9 +469,9 @@ /* don't allow strange buffer overruns due to bogus return */ if (didwrite > count) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " wrote %zd bytes more data than requested (%zd written, %zd max)", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " wrote %ld bytes more data than requested (%ld written, %ld max)", us->wrapper->classname, - didwrite - count, didwrite, count); + (long)(didwrite - count), (long)didwrite, (long)count); didwrite = count; } @@ -510,8 +510,8 @@ convert_to_string(retval); didread = Z_STRLEN_P(retval); if (didread > count) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " - read %zd bytes more data than requested (%zd read, %zd max) - excess data will be lost", - us->wrapper->classname, didread - count, didread, count); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " - read %ld bytes more data than requested (%ld read, %ld max) - excess data will be lost", + us->wrapper->classname, (long)(didread - count), (long)didread, (long)count); didread = count; } if (didread > 0) http://cvs.php.net/diff.php/php-src/main/streams/xp_socket.c?r1=1.22&r2=1.23&ty=u Index: php-src/main/streams/xp_socket.c diff -u php-src/main/streams/xp_socket.c:1.22 php-src/main/streams/xp_socket.c:1.23 --- php-src/main/streams/xp_socket.c:1.22 Wed Feb 4 17:46:44 2004 +++ php-src/main/streams/xp_socket.c Mon Mar 8 18:11:45 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_socket.c,v 1.22 2004/02/04 22:46:44 wez Exp $ */ +/* $Id: xp_socket.c,v 1.23 2004/03/08 23:11:45 abies Exp $ */ #include "php.h" #include "ext/standard/file.h" @@ -57,8 +57,8 @@ if (didwrite <= 0) { char *estr = php_socket_strerror(php_socket_errno(), NULL, 0); - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "send of %d bytes failed with errno=%d %s", - count, php_socket_errno(), estr); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "send of %ld bytes failed with errno=%d %s", + (long)count, php_socket_errno(), estr); efree(estr); } http://cvs.php.net/diff.php/php-src/ext/sqlite/libsqlite/src/main.c?r1=1.5&r2=1.6&ty=u Index: php-src/ext/sqlite/libsqlite/src/main.c diff -u php-src/ext/sqlite/libsqlite/src/main.c:1.5 php-src/ext/sqlite/libsqlite/src/main.c:1.6 --- php-src/ext/sqlite/libsqlite/src/main.c:1.5 Thu Jan 8 09:25:01 2004 +++ php-src/ext/sqlite/libsqlite/src/main.c Mon Mar 8 18:11:45 2004 @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.5 2004/01/08 14:25:01 iliaa Exp $ +** $Id: main.c,v 1.6 2004/03/08 23:11:45 abies Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -856,7 +856,7 @@ ** This routine installs a default busy handler that waits for the ** specified number of milliseconds before returning 0. */ -void sqlite_busy_timeout(sqlite *db, int ms){ +void sqlite_busy_timeout(sqlite *db, long ms){ if( ms>0 ){ sqlite_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms); }else{ http://cvs.php.net/diff.php/php-src/ext/sqlite/libsqlite/src/table.c?r1=1.4&r2=1.5&ty=u Index: php-src/ext/sqlite/libsqlite/src/table.c diff -u php-src/ext/sqlite/libsqlite/src/table.c:1.4 php-src/ext/sqlite/libsqlite/src/table.c:1.5 --- php-src/ext/sqlite/libsqlite/src/table.c:1.4 Thu Jan 8 09:25:01 2004 +++ php-src/ext/sqlite/libsqlite/src/table.c Mon Mar 8 18:11:45 2004 @@ -31,7 +31,7 @@ int nAlloc; int nRow; int nColumn; - int nData; + long nData; int rc; } TabResult; http://cvs.php.net/diff.php/php-src/ext/sqlite/libsqlite/src/vdbeaux.c?r1=1.2&r2=1.3&ty=u Index: php-src/ext/sqlite/libsqlite/src/vdbeaux.c diff -u php-src/ext/sqlite/libsqlite/src/vdbeaux.c:1.2 php-src/ext/sqlite/libsqlite/src/vdbeaux.c:1.3 --- php-src/ext/sqlite/libsqlite/src/vdbeaux.c:1.2 Wed Jan 14 12:08:27 2004 +++ php-src/ext/sqlite/libsqlite/src/vdbeaux.c Mon Mar 8 18:11:45 2004 @@ -471,7 +471,7 @@ char *zP3; char zPtr[40]; if( pOp->p3type==P3_POINTER ){ - sprintf(zPtr, "ptr(%#x)", (int)pOp->p3); + sprintf(zPtr, "ptr(%#lx)", (long)pOp->p3); zP3 = zPtr; }else{ zP3 = pOp->p3; @@ -522,7 +522,7 @@ sprintf(p->zStack[2],"%d", p->aOp[i].p1); sprintf(p->zStack[3],"%d", p->aOp[i].p2); if( p->aOp[i].p3type==P3_POINTER ){ - sprintf(p->aStack[4].z, "ptr(%#x)", (int)p->aOp[i].p3); + sprintf(p->aStack[4].z, "ptr(%#lx)", (long)p->aOp[i].p3); p->zStack[4] = p->aStack[4].z; }else{ p->zStack[4] = p->aOp[i].p3;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php