]> granicus.if.org Git - graphviz/commit
sfio: use a more portable way of determining page size
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Oct 2022 21:48:06 +0000 (14:48 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Nov 2022 02:59:49 +0000 (18:59 -0800)
commitfc890507da4c25ceb0493c5cccbd1648fe0338c8
tree46d7b404cf9ae3c3878401ccb3b2584abe97f608
parent3c879bec17988fe7ed21a2e22550164becde6295
sfio: use a more portable way of determining page size

This code was using a legacy API, `getpagesize`, to opportunistically find the
system virtual memory page size. This change updates to the newer POSIX
`sysconf` API that is available almost everywhere, and adds a workaround for
Windows. This code now has an accurate understanding of the page size on
platforms that did not have `getpagesize` (of which, Windows was one), rather
than falling back on 8192.
cmake/config_checks.cmake
config-cmake.h.in
configure.ac
lib/sfio/sfhdr.h
lib/sfio/sfsetbuf.c