Re: new module 'hasmntopt'

Bruno Haible <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.gnu.findutils.bugs
Message-ID <1903559.CQOukoFCf9@nimes>
Hi Berny,

> While trying to update gnulib in findutils, I've been prompted by this new syntax-check failure:
> 
>    find/fstype.c:30:#if HAVE_MNTENT_H
>    maint.mk: do not test the above HAVE_<header>_H symbol(s);
>      with the corresponding gnulib module, they are always true
>    make: *** [maint.mk:969: sc_prohibit_always_true_header_tests] Error 1

Either remove that #include <mntent.h> (since fstype.c does not need it, AFAICS),
or make it unconditional.

> Reproducer:
> 
>    $ ./gnulib-tool --create-testdir --dir=/tmp/testdir mntent \
>         && cd /tmp/testdir \
>         && ./configure && make
> 
> ... yields in gllib/mntent.h:584:
> 
>    #if  && 1

Indeed. Thanks for the report. This patch fixes it:


2024-10-07  Bruno Haible  <[email protected]>

	mntent: Fix syntax error when module 'hasmntopt' is not in use.
	Reported by Bernhard Voelker <[email protected]> in
	<https://lists.gnu.org/archive/html/bug-gnulib/2024-10/msg00039.html>.
	* modules/mntent (configure.ac): Invoke gl_MNTENT_H_REQUIRE_DEFAULTS.

diff --git a/modules/mntent b/modules/mntent
index 8dc48c38d0..e0926b4760 100644
--- a/modules/mntent
+++ b/modules/mntent
@@ -14,6 +14,7 @@ snippet/warn-on-use
 
 configure.ac:
 gl_MNTENT_H
+gl_MNTENT_H_REQUIRE_DEFAULTS
 gl_CONDITIONAL_HEADER([mntent.h])
 AC_PROG_MKDIR_P
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.