Hi Bruno, Bruno Haible <br...@clisp.org> writes:
> This is unnecessary. As noted in > <https://lists.gnu.org/archive/html/bug-gnulib/2024-02/msg00146.html> > only those header files are needed that make use of #include_next. > Do a 'grep @INCLUDE_NEXT@ lib/*.in.h'. Right, I forgot that it only matters when #include_next was used. The grep should also include @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@. Without it math.in.h isn't found. That file prompted a clang warning which was my first report to Gnulib. :) > Your sort order is not appropriate. It sorts in the following order: > sysexits.h > sys/file.h > system.h > sys/un.h > which is weird. It is better to choose a sort order that keeps all > sys/* together. Which is what you happen to get in the "C" locale. Oops, I forgot locale existed. How do the attached patches look? Removing files that don't use #include_next and sorting using the C locale. netdb.h ordering also changed. I haven't pushed yet so feel free to correct anything. Collin
>From 34e8a27c48e2abfdd9129cdc868396a6182d0c88 Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Sat, 27 Jul 2024 12:10:32 -0700 Subject: [PATCH 1/2] doc: Fix yesterdays #include <...> change. * doc/gnulib-tool.texi (Style of #include statements): Remove files that don't include #include_next. Sort using the C locale. --- ChangeLog | 6 ++++++ doc/gnulib-tool.texi | 14 ++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d256d51400..5239d9aa3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-07-27 Collin Funk <collin.fu...@gmail.com> + + doc: Fix yesterdays #include <...> change. + * doc/gnulib-tool.texi (Style of #include statements): Remove files that + don't include #include_next. Sort using the C locale. + 2024-07-26 Collin Funk <collin.fu...@gmail.com> maintainer-makefile: Update list of headers to use #include <...>. diff --git a/doc/gnulib-tool.texi b/doc/gnulib-tool.texi index 10e0bfa1d9..54a295766e 100644 --- a/doc/gnulib-tool.texi +++ b/doc/gnulib-tool.texi @@ -575,8 +575,8 @@ @node Style of #include statements @item @code{locale.h} @item @code{math.h} @item @code{monetary.h} -@item @code{netdb.h} @item @code{net/if.h} +@item @code{netdb.h} @item @code{netinet/in.h} @item @code{poll.h} @item @code{pthread.h} @@ -586,14 +586,10 @@ @node Style of #include statements @item @code{spawn.h} @item @code{stdalign.h} @item @code{stdarg.h} -@item @code{stdbit.h} -@item @code{stdbool.h} -@item @code{stdckdint.h} @item @code{stddef.h} @item @code{stdint.h} @item @code{stdio.h} @item @code{stdlib.h} -@item @code{stdnoreturn.h} @item @code{string.h} @item @code{strings.h} @item @code{sys/msg.h} @@ -624,23 +620,17 @@ @node Style of #include statements but are not standardized: @itemize @asis{} @item @code{alloca.h} -@item @code{argz.h} @item @code{byteswap.h} @item @code{error.h} -@item @code{execinfo.h} @item @code{getopt.h} -@item @code{ieee754.h} @item @code{malloc.h} -@item @code{obstack.h} @item @code{omp.h} @item @code{pty.h} -@item @code{selinux/context.h} -@item @code{selinux/label.h} @item @code{selinux/selinux.h} -@item @code{sysexits.h} @item @code{sys/file.h} @item @code{sys/ioctl.h} @item @code{sys/random.h} +@item @code{sysexits.h} @item @code{utmp.h} @end itemize @noindent -- 2.45.2
>From 294412b369b0d834b6f96315ed1b349002698a56 Mon Sep 17 00:00:00 2001 From: Collin Funk <collin.fu...@gmail.com> Date: Sat, 27 Jul 2024 12:16:37 -0700 Subject: [PATCH 2/2] maintainer-makefile: Fix yesterdays #include <...> change. * top/maint.mk (gl_prefer_angle_bracket_headers_): Remove files that don't include #include_next. Sort using the C locale. --- ChangeLog | 4 ++++ top/maint.mk | 14 ++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5239d9aa3c..27985101ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-07-27 Collin Funk <collin.fu...@gmail.com> + maintainer-makefile: Fix yesterdays #include <...> change. + * top/maint.mk (gl_prefer_angle_bracket_headers_): Remove files that + don't include #include_next. Sort using the C locale. + doc: Fix yesterdays #include <...> change. * doc/gnulib-tool.texi (Style of #include statements): Remove files that don't include #include_next. Sort using the C locale. diff --git a/top/maint.mk b/top/maint.mk index 96796142ed..37f6889b06 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -544,7 +544,6 @@ sc_require_config_h_first: # sed -n -e 's/^@item[[:space:]]\{1,\}@code{\([^}]\{1,\}\)}$/\1/p' $GNULIB_SRCDIR/doc/gnulib-tool.texi | sort -u gl_prefer_angle_bracket_headers_ ?= \ alloca.h \ - argz.h \ arpa/inet.h \ assert.h \ byteswap.h \ @@ -553,7 +552,6 @@ gl_prefer_angle_bracket_headers_ ?= \ endian.h \ errno.h \ error.h \ - execinfo.h \ fcntl.h \ fenv.h \ float.h \ @@ -561,7 +559,6 @@ gl_prefer_angle_bracket_headers_ ?= \ getopt.h \ glob.h \ iconv.h \ - ieee754.h \ inttypes.h \ langinfo.h \ limits.h \ @@ -569,34 +566,26 @@ gl_prefer_angle_bracket_headers_ ?= \ malloc.h \ math.h \ monetary.h \ - netdb.h \ net/if.h \ + netdb.h \ netinet/in.h \ - obstack.h \ omp.h \ poll.h \ pthread.h \ pty.h \ sched.h \ search.h \ - selinux/context.h \ - selinux/label.h \ selinux/selinux.h \ signal.h \ spawn.h \ stdalign.h \ stdarg.h \ - stdbit.h \ - stdbool.h \ - stdckdint.h \ stddef.h \ stdint.h \ stdio.h \ stdlib.h \ - stdnoreturn.h \ string.h \ strings.h \ - sysexits.h \ sys/file.h \ sys/ioctl.h \ sys/msg.h \ @@ -614,6 +603,7 @@ gl_prefer_angle_bracket_headers_ ?= \ sys/un.h \ sys/utsname.h \ sys/wait.h \ + sysexits.h \ termios.h \ threads.h \ time.h \ -- 2.45.2