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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 23:01:30 2024 UTC