+2025-05-11 Collin Funk <collin.funk1@gmail.com>
+
+ fts: Generate fts_.h.
+ Suggested by Bruno Haible in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2025-05/msg00134.html>.
+ * lib/fts_.h: Remove file.
+ * lib/fts.in.h: New file.
+ * m4/fts.m4 (gl_FUNC_FTS_CORE): Use gl_CHECK_HEADER_SYS_CDEFS_H instead
+ of AC_CHECK_HEADERS_ONCE.
+ * modules/fts (Files): Remove lib/fts_.h. Add lib/fts.in.h and
+ m4/sys_cdefs_h.m4.
+ (Depends-on): Add gen-header.
+ (Makefile.am): Add fts_.h to BUILT_SOURCES. Generate fts_.h using
+ fts.in.h while replacing @HAVE_SYS_CDEFS_H@. Add fts_.h and fts_.h-t to
+ MOSTLYCLEANFILES.
+
2025-05-11 Bruno Haible <bruno@clisp.org>
string-h, wchar-h: Fix some g++ -Wsystem-headers warnings.
# define __FLEXIBLE_ARRAY_MEMBER
# endif
# else
-# if HAVE_SYS_CDEFS_H
+# if @HAVE_SYS_CDEFS_H@
# include <sys/cdefs.h>
# endif
# define __FLEXIBLE_ARRAY_MEMBER FLEXIBLE_ARRAY_MEMBER
# fts.m4
-# serial 25
+# serial 26
dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
dnl Prerequisites of lib/fts.c.
gl_FUNC_OPENAT
- AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
+ gl_CHECK_HEADER_SYS_CDEFS_H
AC_CHECK_FUNCS_ONCE([fstatfs])
AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl
Traverse a file hierarchy.
Files:
-lib/fts_.h
+lib/fts.in.h
lib/fts.c
lib/fts-cycle.c
m4/fts.m4
+m4/sys_cdefs_h.m4
Depends-on:
+gen-header
alignasof
attribute
c99
gl_CONDITIONAL([GL_COND_OBJ_FTS], [true])
Makefile.am:
+BUILT_SOURCES += fts_.h
if GL_COND_OBJ_FTS
lib_SOURCES += fts.c
endif
+fts_.h: fts.in.h
+@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
+ $(gl_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+ $(srcdir)/fts.in.h > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += fts_.h fts_.h-t
+
Include:
"fts_.h"