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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 + 36 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 04:01:38 2024 UTC