2024-06-14 Paul Eggert <eggert@cs.ucla.edu>
+ memchr,strncat: prefer sysconf (_SC_PAGESIZE)
+ * m4/memchr.m4 (gl_FUNC_MEMCHR):
+ * m4/strncat.m4 (gl_FUNC_STRNCAT):
+ Use sysconf (_SC_PAGESIZE) instead of getpagesize, as it’s
+ in POSIX and there’s no point to worrying about getpagesize
+ performance advantages here.
+
getcwd: simplify abort bug checking
* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don’t invoke
gl_CHECK_FUNC_GETPAGESIZE or #define or use HAVE_GETPAGESIZE.
# memchr.m4
-# serial 19
+# serial 20
dnl Copyright (C) 2002-2004, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
if (fd >= 0)
# endif
{
- int pagesize = getpagesize ();
+ long int pagesize = sysconf (_SC_PAGESIZE);
char *two_pages =
(char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
flags, fd, 0);
# strncat.m4
-# serial 8
+# serial 9
dnl Copyright (C) 2002-2004, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
if (fd >= 0)
# endif
{
- int pagesize = getpagesize ();
+ long int pagesize = sysconf (_SC_PAGESIZE);
char *two_pages =
(char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
flags, fd, 0);