Re: [Fwd: [PHP-CVS] cvs: php-src /ext/standard formatted_print.c]
| From: | Ilia Alshanetsky | Date: | Fri, 17 Aug 2007 12:20:24 +0000 |
| Subject: | Re: [Fwd: [PHP-CVS] cvs: php-src /ext/standard formatted_print.c] | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31674@lists.php.net to get a copy of this message | ||
I think the C behaviour is correct and we need to make a (hopefully) slight adjustment to the pear installer code.
On 17-Aug-07, at 8:14 AM, Antony Dovgal wrote:
Ilia? Greg? Any comments? On 14.08.2007 15:42, Antony Dovgal wrote:Ilia AlshanetskyThis patch breaks PEAR phar install on 64bit.--Wbr, Antony DovgalFrom what I can see in the source code, it compares data in the phar withthe result of sprintf("%u"..), which is different on 32bit and 64bit because of this patch. Either phar should be changed to detect this situation or this patch should be reverted. -------- Original Message -------- Subject: [PHP-CVS] cvs: php-src /ext/standard formatted_print.c Date: Sun, 03 Jun 2007 09:11:52 -0000 From: Brian Shire <shire@php.net> To: php-cvs@lists.php.net shire Sun Jun 3 09:11:52 2007 UTCModified files: /php-src/ext/standard formatted_print.c Log: Change printf %u behavior so that it does not truncate numbers at 32-bits. (Reported by Aditya Agarwal.) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/formatted_print.c?r1=1.100&r2=1.101&diff_format=uIndex: php-src/ext/standard/formatted_print.c diff -u php-src/ext/standard/formatted_print.c:1.100 php-src/ext/standard/formatted_print.c:1.101 --- php-src/ext/standard/formatted_print.c:1.100 Thu May 17 17:29:09 2007 +++ php-src/ext/standard/formatted_print.c Sun Jun 3 09:11:52 2007 @@ -16,7 +16,7 @@+----------------------------------------------------------------------+*/ -/* $Id: formatted_print.c,v 1.100 2007/05/17 17:29:09 tony2001 Exp $ */ +/* $Id: formatted_print.c,v 1.101 2007/06/03 09:11:52 shire Exp $ */ #include <math.h> /* modf() */ #include "php.h" @@ -278,7 +278,7 @@ PRINTF_DEBUG(("sprintf: appenduint(%x, %x, %x, %d, %d, '%c', %d)\n", *buffer, pos, size, number, width, padding, alignment)); - magn = (unsigned int) number; + magn = (unsigned long) number; /* Can't right-pad 0's on integers */ if (alignment == 0 && padding == '0') padding = ' ';