* tests/test-free.c (main): Use sysconf (_SC_PAGESIZE) instead of
getpagesize, as this code is compiled only on platforms that have
_SC_PAGESIZE and POSIX prefers the latter.
2024-06-14 Paul Eggert <eggert@cs.ucla.edu>
+ free-posix-tests: port to plain POSIX
+ * tests/test-free.c (main): Use sysconf (_SC_PAGESIZE) instead of
+ getpagesize, as this code is compiled only on platforms that have
+ _SC_PAGESIZE and POSIX prefers the latter.
+
maint: avoid some test getpagesize dependencies
* modules/memcasecmp-tests, modules/memchr-tests:
* modules/memchr2-tests, modules/memcmp-tests:
if (open ("/proc/sys/vm/max_map_count", O_RDONLY) >= 0)
{
/* Preparations. */
- size_t pagesize = getpagesize ();
+ size_t pagesize = sysconf (_SC_PAGESIZE);
void *firstpage_backup = malloc (pagesize);
void *lastpage_backup = malloc (pagesize);
/* Allocate a large memory area, as a bumper, so that the MAP_FIXED