Re: [PATCH] Fix for 32 bits limit on file size (see bug 48886)

From: Date: Tue, 22 Dec 2009 20:38:02 +0000
Subject: Re: [PATCH] Fix for 32 bits limit on file size (see bug 48886)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-46496@lists.php.net to get a copy of this message
Thx, yep a long convertion, not a big deal, we don't work with 4.3GB files :-D, well minded people try to avoid that On Tue, Dec 22, 2009 at 7:10 AM, X Ryl <boite.pour.spam@gmail.com> wrote: > Hi, > >  I'm not a C developer, so I can't really help with the attached patch. > However, I've tried it with PHP 5.3.0 version I have and it does what it > claims, that is, it gives correct behaviour for the following functions: > filesize, fstat, stat when used on file > 4GB on a 32 bits machine. > Currently, php 5.x doesn't give the correct output for this code (on my > 32bits server): > echo filesize("path/to/4.3GBfile");  // expecting 4617089843, got 322122547 > > With the patch applied, the good result is returned. > From the patch author, it improves the tests results. > From what I've understood, the patch switch to php's double type when the > size overflow the 32bits limit of int. > It doesn't seem to break any existing behaviour (I'm using this on my > multiple project since july, and no bad experience so far). > > The explaination by the patch author: > http://bugs.php.net/bug.php?id=48886 > > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.internals (#46496) next »