php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51133 Allow float as parameter for ftruncate
Submitted: 2010-02-24 12:36 UTC Modified: 2010-02-24 15:12 UTC
From: sylvain at abstraction dot fr Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.12 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sylvain at abstraction dot fr
New email:
PHP Version: OS:

 

 [2010-02-24 12:36 UTC] sylvain at abstraction dot fr
Description:
------------
ftruncate function takes an int as size parameter which is problematic when the wanted size is up to 2GB.

Could it be made float instead ?

Regards.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-24 14:56 UTC] sylvain at abstraction dot fr
It's the same thing for the fseek function for the offset argument.
 [2010-02-24 15:12 UTC] aharvey@php.net
This is effectively a bug requesting large file support on 32-bit platforms, which makes it a duplicate of the previously closed bug #38758, bug #40726, bug #43865, and probably others besides. The open bug that deals with this is bug #27792, which includes a patch to implement LFS.

Simply changing the function to take a float wouldn't solve the problem, since the underlying file I/O APIs all use 32-bit integers as well. This requires work both at the ext/standard and stream level.

It's also worth noting that this already works just fine on 64-bit platforms.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 08:03:34 2022 UTC