Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hi all, 

I’ve moved past signal handling for now and have reached file mapping for my book on the guts of 
LibreOffice - https://www.gitbook.com/book/chrissherlock1/inside-libreoffice/details 
<https://www.gitbook.com/book/chrissherlock1/inside-libreoffice/details>

As I’ve been reading through how we handle file mapping, I’ve noticed we do something a bit unusual 
for finding the page size on BSD systems. From what I can see, OpenBSD, NetBSD, FreeBSD, OS X and 
DragonflyBSD all supports sysconf() now. However, we have some special cased code in 
sal/osl/unx/file.cxx that is used by the file mapping API when it gets the pagesize of the system. 
Currently it is special casing out the BSDs to use getpagesize(), and everything else that is POSIX 
compliant uses sysconf(_SC_PAGESIZE). 

However, I checked out the latest man pages for all the BSDs, and they all seem to support 
sysconf(_SC_PAGESIZE). Is there any reason we are checking the platform and using getpagesize() for 
the BSDs now?

I’ve submitted a gerrit change in case there is no good reason:

https://gerrit.libreoffice.org/#/c/39120/ <https://gerrit.libreoffice.org/#/c/39120/>

If anyone would like to review it, would be great. 

Chris

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.