Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45563 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11682 invoked from network); 11 Sep 2009 15:38:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2009 15:38:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=boite.pour.spam@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=boite.pour.spam@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: boite.pour.spam@gmail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:39697] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/2C-52829-FFE6AAA4 for ; Fri, 11 Sep 2009 11:38:40 -0400 Received: by fg-out-1718.google.com with SMTP id e12so1881115fga.11 for ; Fri, 11 Sep 2009 08:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=E8lSqjhjPvRu9fhFXlXVO/vWn0RWWy0Q8eI5dX9gZwI=; b=J6c3kEV5rYL8no6jO3ruQZkkrvJL8OkTegt2TNSe/ixltai+0/OMxcw4Cor+mKrX80 TkC4yZ62VTzhJREK9q/sc3X35bHLRuoWSXIU9RlYJ+2rhsneDGSbsl93daR/vwK451G7 Myh4TUfDO213s8wgZ9YwU2K5pcIs/5zL5OJW8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=H10VM0fcV7AnCnWTjopri8BjyNDP0S+B7Noitevg66gWr4WGAWJL0wyDSjh5j4w8YS gL38ZUuIErDpF9kwNQz8KnxDhFNes6EYSNG+zzHpx4lxlY6xNGwY118gxO8/FyAIN/xU 3PWRrXRBt8DvPxz/jbBvKr00J0K65T1s+Gxps= MIME-Version: 1.0 Received: by 10.86.158.29 with SMTP id g29mr2428354fge.4.1252683515809; Fri, 11 Sep 2009 08:38:35 -0700 (PDT) Date: Fri, 11 Sep 2009 17:38:35 +0200 Message-ID: <5e33430b0909110838l743d68b8n2b6a9a0b3ed30c30@mail.gmail.com> To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001636025af4f9d0f904734f1bd9 Subject: A fix for limited 32 bits supports From: boite.pour.spam@gmail.com (X Ryl) --001636025af4f9d0f904734f1bd9 Content-Type: text/plain; charset=ISO-8859-1 Hi, I was a bit disappointed to see that filesize, stat et al don't work on 32bits systems, because they are using 32 bits integer. I've found a patch written by Wes, but unfortunately it didn't worked. Well, now, I've found this: http://bugs.php.net/bug.php?id=48886 This is done right, it works for all streams, not just file. I think it just the best solution now without breaking the ABI with modules. With this patch you get 52 bits filesize (which is more than enough with a 32 bits system), 52 bits offset, and so on. With unmodified PHP code, it's working because the type is used as a double when it overcome the 32 bit limit. So instead of this ugly fix : "sprintf("%u", $value)" for 2GB up to 4GB, you have this one "sprintf("%.0f", $value)", which works with file size < 4503TB on 32 bits machines. Please advise. --001636025af4f9d0f904734f1bd9--