Re: Compilation error in glob.c with gcc 4.8

2018-08-19 Thread Reuben Thomas
On Sun, 19 Aug 2018, 10:48 Bruno Haible, wrote: > Reuben Thomas wrote: > > > > Sorry, I pasted the wrong part of the output. Here's the first error: > > > > glob.c:282:53: error: use of undeclared identifier '__GLOB_FLAGS' > > if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) !=

Re: Compilation error in glob.c with gcc 4.8

2018-08-19 Thread Bruno Haible
Reuben Thomas wrote: > > Sorry, I pasted the wrong part of the output. Here's the first error: > > glob.c:282:53: error: use of undeclared identifier '__GLOB_FLAGS' > if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) > ^ >

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Reuben Thomas
On 18 August 2018 at 22:34, Bruno Haible wrote: > Reuben Thomas wrote: > > I now get the same error, but with globfree.c. I am not sure why I didn't > > need this in my patches… > > OK. Done as follows: > Getting close. This now works on GNU/Linux, but breaks on Darwin: In file included from

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Reuben Thomas
On 18 August 2018 at 22:38, Bruno Haible wrote: > Reuben Thomas wrote: > > OK, globfree.c should already have seen libc-config.h via glob.h, so I > > don't see why it's *not* working. > > We have a new optimization that omits the generated glob.h when it would > not add relevant standardized

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Bruno Haible
Reuben Thomas wrote: > OK, globfree.c should already have seen libc-config.h via glob.h, so I > don't see why it's *not* working. We have a new optimization that omits the generated glob.h when it would not add relevant standardized declarations. Since glob.h is not supposed to define the macros

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Bruno Haible
Reuben Thomas wrote: > I now get the same error, but with globfree.c. I am not sure why I didn't > need this in my patches… OK. Done as follows: 2018-08-18 Bruno Haible glob: Fix another compilation error when glob.h is not replaced. Reported and fix proposed by Reuben

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Reuben Thomas
On 18 August 2018 at 22:22, Reuben Thomas wrote: > On 18 August 2018 at 21:45, Bruno Haible wrote: > >> Reuben Thomas wrote: >> > This makes the build break again because of the problem I reported in >> > glob_pattern_p.c (see my patch for it). >> >> Ah, I see. The macro 'weak_alias' apparently

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Reuben Thomas
On 18 August 2018 at 21:45, Bruno Haible wrote: > Reuben Thomas wrote: > > This makes the build break again because of the problem I reported in > > glob_pattern_p.c (see my patch for it). > > Ah, I see. The macro 'weak_alias' apparently needs libc-config.h as well. > Yes. I assumed that

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Bruno Haible
Reuben Thomas wrote: > This makes the build break again because of the problem I reported in > glob_pattern_p.c (see my patch for it). Ah, I see. The macro 'weak_alias' apparently needs libc-config.h as well. 2018-08-18 Bruno Haible glob: Fix compilation error when glob.h is not

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Paul Eggert
Thanks for doing all those fixes, and sorry for any confusion that I introduced.

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Reuben Thomas
On 18 August 2018 at 20:45, Bruno Haible wrote: > Paul Eggert wrote: > > I didn't think the patch would be controversial > > ... whereas I would think that every revert or partial revert is > controversial > (except for obvious typos). > > > Please feel free to > > revert the patch and replace

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Bruno Haible
Paul Eggert wrote: > I didn't think the patch would be controversial ... whereas I would think that every revert or partial revert is controversial (except for obvious typos). > Please feel free to > revert the patch and replace it with something better. Done as follows: - I added a small

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Reuben Thomas
On 18 August 2018 at 08:57, Paul Eggert 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

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Paul Eggert
Bruno Haible wrote: I thought that on this mailing list, we had an agreement that we discuss patches_before_ committing them, if they are controversial. I didn't think the patch would be controversial, since glob.h is built for all sorts of reasons and this just seemed to be another

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Bruno Haible
Hi Paul, > 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. This is frustrating in two aspects: 1) Reuben clearly stated a problem that he perceived: > > Looks like lib/malloc/scratch_buffer.h

Re: Compilation error in glob.c with gcc 4.8

2018-08-18 Thread Paul Eggert
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

Re: Compilation error in glob.c with gcc 4.8

2018-08-17 Thread Reuben Thomas
On 18 August 2018 at 00:48, Reuben Thomas wrote: > On 17 August 2018 at 17:59, Reuben Thomas wrote: > >> On 17 August 2018 at 17:57, Reuben Thomas wrote: >> >>> I'm getting the following error on Ubuntu 14.04 with gcc 4.8, current >>> gnulib: >>> >>> Similar error on macOS with Apple LLVM

Re: Compilation error in glob.c with gcc 4.8

2018-08-17 Thread Reuben Thomas
On 17 August 2018 at 17:59, Reuben Thomas wrote: > On 17 August 2018 at 17:57, Reuben Thomas wrote: > >> I'm getting the following error on Ubuntu 14.04 with gcc 4.8, current gnulib: >> >> Similar error on macOS with Apple LLVM version 9.1.0 (clang-902.0.39.2) > > Also with gcc-5 and gcc-6.

Re: Compilation error in glob.c with gcc 4.8

2018-08-17 Thread Reuben Thomas
On 17 August 2018 at 17:57, Reuben Thomas wrote: > I'm getting the following error on Ubuntu 14.04 with gcc 4.8, current gnulib: > > Similar error on macOS with Apple LLVM version 9.1.0 (clang-902.0.39.2) In file included from glob.c:81: In file included from ./scratch_buffer.h:4: