derick Wed Mar 24 09:28:41 2004 EDT Modified files: /ZendEngine2 zend_operators.c /php-src/main rfc1867.c Log: - Revert bogus commit http://cvs.php.net/diff.php/ZendEngine2/zend_operators.c?r1=1.186&r2=1.187&ty=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.186 ZendEngine2/zend_operators.c:1.187 --- ZendEngine2/zend_operators.c:1.186 Wed Mar 24 08:31:19 2004 +++ ZendEngine2/zend_operators.c Wed Mar 24 09:28:40 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.186 2004/03/24 13:31:19 derick Exp $ */ +/* $Id: zend_operators.c,v 1.187 2004/03/24 14:28:40 derick Exp $ */ #include <ctype.h> @@ -34,6 +34,8 @@ #include "ext/bcmath/number.h" #endif +#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1)) + ZEND_API int zend_atoi(const char *str, int str_len) { int retval; @@ -725,8 +727,8 @@ long lval = op1->value.lval + op2->value.lval; /* check for overflow by comparing sign bits */ - if ( (op1->value.lval & LONG_MIN) == (op2->value.lval & LONG_MIN) - && (op1->value.lval & LONG_MIN) != (lval & LONG_MIN)) { + if ( (op1->value.lval & LONG_SIGN_MASK) == (op2->value.lval & LONG_SIGN_MASK) + && (op1->value.lval & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) { result->value.dval = (double) op1->value.lval + (double) op2->value.lval; result->type = IS_DOUBLE; @@ -765,8 +767,8 @@ long lval = op1->value.lval - op2->value.lval; /* check for overflow by comparing sign bits */ - if ( (op1->value.lval & LONG_MIN) != (op2->value.lval & LONG_MIN) - && (op1->value.lval & LONG_MIN) != (lval & LONG_MIN)) { + if ( (op1->value.lval & LONG_SIGN_MASK) != (op2->value.lval & LONG_SIGN_MASK) + && (op1->value.lval & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) { result->value.dval = (double) op1->value.lval - (double) op2->value.lval; result->type = IS_DOUBLE; http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.152&r2=1.153&ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.152 php-src/main/rfc1867.c:1.153 --- php-src/main/rfc1867.c:1.152 Wed Mar 24 08:31:20 2004 +++ php-src/main/rfc1867.c Wed Mar 24 09:28:41 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.152 2004/03/24 13:31:20 derick Exp $ */ +/* $Id: rfc1867.c,v 1.153 2004/03/24 14:28:41 derick Exp $ */ /* * This product includes software developed by the Apache Group @@ -957,22 +957,16 @@ while (!cancel_upload && (blen = multipart_buffer_read(mbuff, buff, sizeof(buff) TSRMLS_CC))) { if (PG(upload_max_filesize) > 0 && total_bytes > PG(upload_max_filesize)) { -#ifdef DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "upload_max_filesize of %ld bytes exceeded - file [%s=%s] not saved", PG(upload_max_filesize), param, filename); -#endif + sapi_module.sapi_error(E_WARNING, "upload_max_filesize of %ld bytes exceeded - file [%s=%s] not saved", PG(upload_max_filesize), param, filename); cancel_upload = UPLOAD_ERROR_A; } else if (max_file_size && (total_bytes > max_file_size)) { -#ifdef DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "MAX_FILE_SIZE of %ld bytes exceeded - file [%s=%s] not saved", max_file_size, param, filename); -#endif + sapi_module.sapi_error(E_WARNING, "MAX_FILE_SIZE of %ld bytes exceeded - file [%s=%s] not saved", max_file_size, param, filename); cancel_upload = UPLOAD_ERROR_B; } else if (blen > 0) { wlen = fwrite(buff, 1, blen, fp); if (wlen < blen) { -#ifdef DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %ld", wlen, blen); -#endif + sapi_module.sapi_error(E_WARNING, "Only %d bytes were written, expected to write %ld", wlen, blen); cancel_upload = UPLOAD_ERROR_C; } else { total_bytes += wlen;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php