On 18 August 2018 at 08:57, Paul Eggert <[email protected]> wrote:
> Reuben Thomas wrote:
>
>> Looks like lib/malloc/scratch_buffer.h needs to #include libc-config.h for
>> libc_hidden_proto? Only I can't quite believe it could be something so
>> simple for code that was last changed a while ago…
>>
>
> Does August 7 count as "a while ago"? Anyway, I suspect that caused the
> problem. I installed the attached which should fix things, albeit more
> drastically than I'd like as it creates glob.h in cases where it's not
> needed.
>
Thanks! I was assuming the problem was in lib/malloc/scratch_buffer.h,
which it seems should include libc-config.h; there's a similar problem in
glob_pattern_p.c.
I attach the patches I used to fix it. I'm interested to know, if they're
misguided, why so, as the fault seemed pretty obvious to me.
--
https://rrt.sc3d.org
--- gnulib/lib/glob_pattern_p.c 2018-03-03 08:59:51.303361707 +0000
+++ lib/glob_pattern_p.c 2018-08-18 01:45:54.605914993 +0100
@@ -17,7 +17,7 @@
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
#endif
#include <glob.h>
--- gnulib/lib/malloc/scratch_buffer.h 2018-08-18 01:02:45.685731224 +0100
+++ lib/malloc/scratch_buffer.h 2018-08-18 01:08:42.942494699 +0100
@@ -18,7 +18,11 @@
#ifndef _SCRATCH_BUFFER_H
#define _SCRATCH_BUFFER_H
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
/* Scratch buffers with a default stack allocation and fallback to
heap allocation. It is expected that this function is used in this
way: