summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-06-23 02:42:32 +1000
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 11:41:31 +0200
commit718477e21f09d111161fd04083ac8fc909d2b9b8 (patch)
treeb61d70ba10396a46b7fad6f9a47418ca45d40d3e /sal
parentab27953d9ef2076e0acd43ed4ba6652732794777 (diff)
osl: getpagesize() uses sysconf(_SC_PAGESIZE) on all BSDs
OpenBSD, FreeBSD, OS X, NetBSD and DragonflyBSD all now use POSIX sysconf, so there isn't any need to use the BSD getpagesize() anymore. Looking at the FreeBSD source in their VCS, it appears it sysconf support for _SC_PAGESIZE was introduced in the following commit on March 4, 1998: https://svnweb.freebsd.org/base/head/lib/libc/gen/sysconf.c?r1=12674&r2=34030 The man page for sysconf(3) says it has been available since BSD4.4 And it looks like OSX has supported this at least as far back as 10.6.2. Change-Id: Id8c188c00a8d87dbd8056635b5bf7f5940508ab1 Reviewed-on: https://gerrit.libreoffice.org/39120 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx5
1 files changed, 0 insertions, 5 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index c8dcd3543e22..f631a424d353 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -278,12 +278,7 @@ void FileHandle_Impl::operator delete (void * p)
size_t FileHandle_Impl::getpagesize()
{
-#if defined(FREEBSD) || defined(NETBSD) || defined(MACOSX) || \
- defined(OPENBSD) || defined(DRAGONFLY)
- return sal::static_int_cast< size_t >(::getpagesize());
-#else /* POSIX */
return sal::static_int_cast< size_t >(::sysconf(_SC_PAGESIZE));
-#endif /* xBSD || POSIX */
}
sal_uInt64 FileHandle_Impl::getPos() const