Review Request 129267: [OS X] emulate posix_fallocate()

René J.V. Bertin rjvbertin at gmail.com
Wed Oct 26 18:23:13 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129267/
-----------------------------------------------------------

Review request for KDE Software on Mac OS X and KDE Frameworks.


Repository: kcoreaddons


Description
-------

Mac OS X doesn't have `posix_fallocate()` but as written in the comments, this function can be emulated (at least for simple use with `offset=0`).

This patch introduces such an emulation, based on `mozilla::fallocation()`. There's so little of that function left that it may be overkill to maintain its original copyright statement but I'll leave that to the legalese experts.


Diffs
-----

  src/lib/caching/kshareddatacache_p.h 9fd0bb1 
  src/lib/caching/posix_fallocate_mac.h PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/129267/diff/


Testing
-------

Works as intended on OS X 10.9.5 as far as I can tell; original file contents were not overwritten in my testing.


File Attachments
----------------

a simple commandline test app
  https://git.reviewboard.kde.org/media/uploaded/files/2016/10/26/e0af195f-b484-4647-b211-cc78b5b0584b__posix_fallocate.c


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20161026/b80dd61c/attachment.html>


More information about the kde-mac mailing list