* lib/unistd.in.h (_GL_GETPAGESIZE_INLINE): New macro.
(getpagesize): Use it.
* lib/getpagesize.c (_GL_GETPAGESIZE_INLINE): Define.
* modules/getpagesize (configure.ac): Compile getpagesize.c also when
getpagesize is missing.
+2024-11-11 Bruno Haible <bruno@clisp.org>
+
+ getpagesize: Fix use of 'extern inline' (regression 2012-11-20).
+ * lib/unistd.in.h (_GL_GETPAGESIZE_INLINE): New macro.
+ (getpagesize): Use it.
+ * lib/getpagesize.c (_GL_GETPAGESIZE_INLINE): Define.
+ * modules/getpagesize (configure.ac): Compile getpagesize.c also when
+ getpagesize is missing.
+
2024-11-10 Bruno Haible <bruno@clisp.org>
relocatable-prog-wrapper: Fix compilation error on NetBSD 7.
#include <config.h>
/* Specification. */
+#define _GL_GETPAGESIZE_INLINE _GL_EXTERN_INLINE
#include <unistd.h>
/* This implementation is only for native Windows systems. */
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
#endif
+#ifndef _GL_GETPAGESIZE_INLINE
+# define _GL_GETPAGESIZE_INLINE _GL_INLINE
+#endif
/* Hide some function declarations from <winsock2.h>. */
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-_GL_UNISTD_INLINE int
+_GL_GETPAGESIZE_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
configure.ac:
gl_FUNC_GETPAGESIZE
-gl_CONDITIONAL([GL_COND_OBJ_GETPAGESIZE], [test $REPLACE_GETPAGESIZE = 1])
+gl_CONDITIONAL([GL_COND_OBJ_GETPAGESIZE],
+ [test $HAVE_GETPAGESIZE = 0 || test $REPLACE_GETPAGESIZE = 1])
gl_UNISTD_MODULE_INDICATOR([getpagesize])
Makefile.am: