Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68725 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37326 invoked from network); 30 Aug 2013 14:52:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Aug 2013 14:52:43 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:40048] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/E0-32511-9B1B0225 for ; Fri, 30 Aug 2013 10:52:42 -0400 Received: from [192.168.2.20] (ppp-88-217-68-18.dynamic.mnet-online.de [88.217.68.18]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id DF8235BCBE; Fri, 30 Aug 2013 16:52:40 +0200 (CEST) To: X Ryl Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 30 Aug 2013 16:52:35 +0200 Message-ID: <1377874355.2929.148.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] LFS support for PHP 5.5.1 From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Fri, 2013-08-30 at 16:43 +0200, X Ryl wrote: > Hi, > > > Please find attached a patch for adding large file size support to > PHP 5.5.1. The patch didn't make it. Please send as text/plain (i.e. using .txt extension) > It does so by, from the PHP's side, getting double instead of int for > the file size/ offset functions, when the size is larger than 2^31. This has some problems - for further handling onemight need the exact file size (i.e. content length headers, checking structures, reading specific positions) > This means that files with size: > - up to 2^32 bytes works as previously (integer returned / used) > - up to 2^52 bytes can be handled correctly (double's mantissa is 52 > bits, no loss in precision here) This might work for the initial operation, but as soon as the user does a calculation ("give me the last ten bytes") this will cause issues. > - from 2^52 up to 2^64 will have their size rounded, yet, reading and > writing will work as expected since it's done in the PHP's binary. > > > The changes are: > - Some size_t are changed to off_t wherever required. This disqualifies from 5.5 and allows use in 5.6 only. johannes