bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* immutable, get-rusage-data: Fix autoconf warning
@ 2021-01-17  8:13 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-01-17  8:13 UTC (permalink / raw)
  To: bug-gnulib

While creating a testdir for the modules 'immutable', 'get-rusage-data', I get
this warning:

configure.ac:672: warning: AC_REQUIRE: `gl_FUNC_MMAP_ANON' was expanded before it was required
configure.ac:672: https://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required
glm4/mprotect.m4:14: gl_FUNC_MPROTECT_WORKS is expanded from...
glm4/immutable.m4:7: gl_IMMUTABLE is expanded from...
configure.ac:35: gl_INIT is expanded from...
configure.ac:672: the top level

The cause is that gl_FUNC_MMAP_ANON is invoked in some places and required in
other places. This patch fixes it.


2021-01-17  Bruno Haible  <bruno@clisp.org>

	immutable, get-rusage-data: Fix autoconf warning.
	* m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Define through AC_DEFUN_ONCE.

diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index 5a9f968..e47aa2d 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,4 +1,4 @@
-# mmap-anon.m4 serial 11
+# mmap-anon.m4 serial 12
 dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ dnl with or without modifications, as long as this notice is preserved.
 # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
 #   used.
 
-AC_DEFUN([gl_FUNC_MMAP_ANON],
+AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON],
 [
   dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-17  8:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-17  8:13 immutable, get-rusage-data: Fix autoconf warning Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).