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  <br...@clisp.org>

        mntent: Fix syntax error when module 'hasmntopt' is not in use.
        Reported by Bernhard Voelker <m...@bernhard-voelker.de> 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
 




Reply via email to