On 2/24/21 9:38 AM, Tom Tromey wrote:
../../../binutils-gdb/gnulib/import/glob.c:89: error: expected declaration specifiers before ‘__THROWNL’
Possibly this is due to glob.c not including libc-config.h first thing, which it should do anyway. I fixed that by installing the attached.
If this doesn't suffice, please investigate why the gnulib cdefs.h is not being used. libc-config includes gnulib cdefs.h if __attribute_maybe_unused__ is not defined; does /usr/include/sys/cdefs.h define that macro on your platform? That sort of thing.
Thanks.
From 494fea035166a4947db72bd23161faa1f1733708 Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Wed, 24 Feb 2021 10:52:59 -0800 Subject: [PATCH 1/2] glob: include libc-config.h in a more-standard way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inspired by Tom Tromey’s report for RHEL 6 in: https://lists.gnu.org/r/bug-gnulib/2021-02/msg00088.html * lib/glob.c [!_LIBC]: Include libc-config.h, not just config.h --- ChangeLog | 7 +++++++ lib/glob.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bbc8adf4b..3b78c47a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-02-24 Paul Eggert <egg...@cs.ucla.edu> + + glob: include libc-config.h in a more-standard way + Inspired by Tom Tromey’s report for RHEL 6 in: + https://lists.gnu.org/r/bug-gnulib/2021-02/msg00088.html + * lib/glob.c [!_LIBC]: Include libc-config.h, not just config.h + 2021-02-21 Bruno Haible <br...@clisp.org> string-buffer: Add tests. diff --git a/lib/glob.c b/lib/glob.c index 32c88e5d1..775911ef5 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -21,7 +21,7 @@ optimizes away the pattern == NULL test below. */ # define _GL_ARG_NONNULL(params) -# include <config.h> +# include <libc-config.h> #endif -- 2.27.0
From 5c7fc16b455ba87ffd1fab50905f96bc20c7b05b Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Wed, 24 Feb 2021 11:36:06 -0800 Subject: [PATCH 2/2] glob: include libc-config.h only if needed --- ChangeLog | 1 + lib/glob.in.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b78c47a6..ddfb37935 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Inspired by Tom Tromey’s report for RHEL 6 in: https://lists.gnu.org/r/bug-gnulib/2021-02/msg00088.html * lib/glob.c [!_LIBC]: Include libc-config.h, not just config.h + * lib/glob.in.h: Include libc-config.h only if needed. 2021-02-21 Bruno Haible <br...@clisp.org> diff --git a/lib/glob.in.h b/lib/glob.in.h index d4270d7f4..d8b03c5f3 100644 --- a/lib/glob.in.h +++ b/lib/glob.in.h @@ -70,7 +70,9 @@ typedef int (*_gl_glob_errfunc_fn) (const char *, int); /* Preparations for including the standard GNU C Library header. */ -# include <libc-config.h> +# ifndef __attribute_maybe_unused__ +# include <libc-config.h> +# endif # include <stddef.h> -- 2.27.0