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) != 0)
> > ^
> > glob.c:291:14: error: use of undeclared identifier 'GLOB_ONLYDIR'
> > flags |= GLOB_ONLYDIR;
> >  ^
>
> This patch fixes it.
>

Thanks! All my builds are working now.


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)
> ^
> glob.c:291:14: error: use of undeclared identifier 'GLOB_ONLYDIR'
> flags |= GLOB_ONLYDIR;
>  ^

This patch fixes it.



2018-08-19  Bruno Haible  

glob: Fix another compilation error when glob.h is not replaced.
Reported by Reuben Thomas  in
.
* m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed.
* m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE.

diff --git a/m4/glob.m4 b/m4/glob.m4
index a9af4e4..69fd2ab 100644
--- a/m4/glob.m4
+++ b/m4/glob.m4
@@ -1,4 +1,4 @@
-# glob.m4 serial 19
+# glob.m4 serial 20
 dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -67,6 +67,11 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || 
_GNU_GLOB_INTERFACE_VERSION == 2 ? 1
   REPLACE_GLOB_PATTERN_P=1
 fi
   fi
+
+  if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
+GLOB_H=glob.h
+AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"])
+  fi
 ])
 
 # Prerequisites of lib/glob.c and lib/globfree.c.
diff --git a/m4/glob_h.m4 b/m4/glob_h.m4
index 717cf54..d504c06 100644
--- a/m4/glob_h.m4
+++ b/m4/glob_h.m4
@@ -1,4 +1,4 @@
-# glob_h.m4 serial 3
+# glob_h.m4 serial 4
 dnl Copyright (C) 2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 dnl From Bruno Haible.
 
-AC_DEFUN([gl_GLOB_H],
+AC_DEFUN_ONCE([gl_GLOB_H],
 [
   AC_REQUIRE([gl_GLOB_H_DEFAULTS])
   m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])




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 glob.c:81:
In file included from ./scratch_buffer.h:4:
In file included from ./libc-config.h:33:
../config.h:927:9: warning: 'fnmatch' macro redefined [-Wmacro-redefined]
#define fnmatch posix_fnmatch
^
./fnmatch.h:554:12: note: previous definition is here
#   define fnmatch rpl_fnmatch
   ^

-- 
https://rrt.sc3d.org


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 declarations. Since glob.h is not supposed
> to define the macros 'weak_alias', 'libc_hidden_def', etc. you cannot
> count on '#include ' to provide these macros.
>

Many thanks for the explanation. (Testing the patch now.)

-- 
https://rrt.sc3d.org


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 'weak_alias', 'libc_hidden_def', etc. you cannot
count on '#include ' to provide these macros.

Bruno




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 Thomas  again.
* lib/globfree.c: Include .

diff --git a/lib/globfree.c b/lib/globfree.c
index b56ab28..def36e6 100644
--- a/lib/globfree.c
+++ b/lib/globfree.c
@@ -17,7 +17,7 @@
.  */
 
 #ifndef _LIBC
-# include 
+# include 
 #endif
 
 #include 




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 needs libc-config.h as well.
>>
>
> Yes. I assumed that "config.h" was a typo here, because the #ifndef _LIBC
> block seems to be fairly common in gnulib.
>
> I now get the same error, but with globfree.c. I am not sure why I didn't
> need this in my patches…
>

OK, globfree.c should already have seen libc-config.h via glob.h, so I
don't see why it's *not* working.

The precise error I get:


../../lib/globfree.c:40:1: warning: return type defaults to ‘int’
[enabled by default]
 libc_hidden_def (globfree)
 ^
../../lib/globfree.c: In function ‘libc_hidden_def’:
../../lib/globfree.c:40:1: warning: type of ‘globfree’ defaults to
‘int’ [enabled by default]
../../lib/globfree.c:40:1: error: expected ‘{’ at end of input

-- 
https://rrt.sc3d.org


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 "config.h" was a typo here, because the #ifndef _LIBC
block seems to be fairly common in gnulib.

I now get the same error, but with globfree.c. I am not sure why I didn't
need this in my patches…

-- 
https://rrt.sc3d.org


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 replaced.
Reported and fix proposed by Reuben Thomas  in
.
* lib/glob_pattern_p.c: Include .
* modules/glob (Depends-on): Add libc-config.

diff --git a/lib/glob_pattern_p.c b/lib/glob_pattern_p.c
index b7f19bb..70d0258 100644
--- a/lib/glob_pattern_p.c
+++ b/lib/glob_pattern_p.c
@@ -17,7 +17,7 @@
.  */
 
 #ifndef _LIBC
-# include 
+# include 
 #endif
 
 #include 
diff --git a/modules/glob b/modules/glob
index 4bf2dd2..88bfce2 100644
--- a/modules/glob
+++ b/modules/glob
@@ -20,6 +20,7 @@ d-type  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 
1]
 flexmember  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 fnmatch [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 getlogin_r  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
+libc-config [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 memchr  [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 mempcpy [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]
 opendir [test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1]




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 it with something better.
>
> Done as follows:
>   - I added a small test module 'scratch_buffer-tests'. It showed the same
> errors as reported by Reuben.
>   - The I inserted '#include ' in scratch_buffer.h. The
> errors
> went away.
>
> Reuben, could you please verify that it fixes the issue with glob.c in your
> situation? Thanks.
>

This makes the build break again because of the problem I reported in
glob_pattern_p.c (see my patch for it).


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 test module 'scratch_buffer-tests'. It showed the same
errors as reported by Reuben.
  - The I inserted '#include ' in scratch_buffer.h. The errors
went away.

Reuben, could you please verify that it fixes the issue with glob.c in your
situation? Thanks.


2018-08-18  Bruno Haible  

scratch_buffer: Add tests.
* tests/test-scratch-buffer.c: New file.
* modules/scratch_buffer-tests: New file.

2018-08-18  Bruno Haible  

scratch_buffer: Fix include file.
Reported by Reuben Thomas  in
.
* lib/scratch_buffer.h: Include  first. Add
double-inclusion guard.

2018-08-18  Bruno Haible  

glob-h: Revert Paul Eggert's revert.
* m4/glob_h.m4: Revert to previous state.
* modules/glob-h: Likewise.

>From 5fef422c49de3f1c220fb0082af9246569af420d Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 18 Aug 2018 21:31:30 +0200
Subject: [PATCH 1/3] glob-h: Revert Paul Eggert's revert.

* m4/glob_h.m4: Revert to previous state.
* modules/glob-h: Likewise.
---
 ChangeLog  |  6 ++
 m4/glob_h.m4   | 18 +-
 modules/glob-h |  7 ++-
 3 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 120b4e9..973abae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-18  Bruno Haible  
+
+	glob-h: Revert Paul Eggert's revert.
+	* m4/glob_h.m4: Revert to previous state.
+	* modules/glob-h: Likewise.
+
 2018-08-18  Paul Eggert  
 
 	glob-h: always build glob.h
diff --git a/m4/glob_h.m4 b/m4/glob_h.m4
index 9fe49c7..717cf54 100644
--- a/m4/glob_h.m4
+++ b/m4/glob_h.m4
@@ -1,4 +1,4 @@
-# glob_h.m4 serial 2
+# glob_h.m4 serial 3
 dnl Copyright (C) 2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,6 +21,22 @@ AC_DEFUN([gl_GLOB_H],
   fi
   AC_SUBST([HAVE_GLOB_H])
 
+  m4_ifdef([gl_POSIXCHECK],
+[GLOB_H=glob.h],
+[GLOB_H=''
+ if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then
+   dnl Override  always, to support the C++ GNULIB_NAMESPACE.
+   GLOB_H=glob.h
+ else
+   if test $ac_cv_header_glob_h != yes; then
+ dnl Provide a substitute  file.
+ GLOB_H=glob.h
+   fi
+ fi
+])
+  AC_SUBST([GLOB_H])
+  AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include 
diff --git a/modules/glob-h b/modules/glob-h
index b61bc33..b490a73 100644
--- a/modules/glob-h
+++ b/modules/glob-h
@@ -20,9 +20,10 @@ configure.ac:
 gl_GLOB_H
 
 Makefile.am:
-BUILT_SOURCES += glob.h
+BUILT_SOURCES += $(GLOB_H)
 
 # We need the following in order to create .
+if GL_GENERATE_GLOB_H
 glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@@ -43,6 +44,10 @@ glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
 	  < $(srcdir)/glob.in.h; \
 	} > $@-t && \
 	mv $@-t $@
+else
+glob.h: $(top_builddir)/config.status
+	rm -f $@
+endif
 MOSTLYCLEANFILES += glob.h glob.h-t
 
 Include:
-- 
2.7.4

>From ba153ed1edb23bf14f21b9892ff169f10d39911f Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sat, 18 Aug 2018 21:35:11 +0200
Subject: [PATCH 2/3] scratch_buffer: Fix include file.

Reported by Reuben Thomas  in
.

* lib/scratch_buffer.h: Include  first. Add
double-inclusion guard.
---
 ChangeLog| 8 
 lib/scratch_buffer.h | 7 +++
 2 files changed, 15 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 973abae..000eb2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-08-18  Bruno Haible  
 
+	scratch_buffer: Fix include file.
+	Reported by Reuben Thomas  in
+	.
+	* lib/scratch_buffer.h: Include  first. Add
+	double-inclusion guard.
+
+2018-08-18  Bruno Haible  
+
 	glob-h: Revert Paul Eggert's revert.
 	* m4/glob_h.m4: Revert to previous state.
 	* modules/glob-h: Likewise.
diff --git a/lib/scratch_buffer.h b/lib/scratch_buffer.h
index 52f0ed6..4c0db3e 100644
--- a/lib/scratch_buffer.h
+++ b/lib/scratch_buffer.h
@@ -1,4 +1,11 @@
+#ifndef _GL_SCRATCH_BUFFER_H
+#define _GL_SCRATCH_BUFFER_H
+
+#include 
+
 #define __libc_scratch_buffer_grow gl_scratch_buffer_grow
 #define 

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 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 +
+++ lib/glob_pattern_p.c	2018-08-18 01:45:54.605914993 +0100
@@ -17,7 +17,7 @@
.  */
 
 #ifndef _LIBC
-# include 
+# include 
 #endif
 
 #include 
--- 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 
+#endif
+
 /* Scratch buffers with a default stack allocation and fallback to
heap allocation.  It is expected that this function is used in this
way:


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 reason. Please feel free to 
revert the patch and replace it with something better. It was meant only as a 
stop-gap to prevent builds breaking for programs using the 'glob' module (which 
is the underlying problem that Reuben reported).




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 needs to #include libc-config.h 
for
   > > libc_hidden_proto?

   Indeed, the module description modules/scratch_buffer states that he
   should be able to
  #include 
   but he can't do so because this header file uses the undefined macro
   libc_hidden_proto.

   If the module had a unit test, this bug would have been apparent much sooner.

2) Paul Smith requested in
   
   that .h files be omitted when they are not necessary. I have started work
   in this direction (regarding iconv-h, utime-h, fnmatch-h, glob-h), and
   there is more to come.
   Now, you revert part of these changes without discussion?!

   I thought that on this mailing list, we had an agreement that we discuss
   patches _before_ committing them, if they are controversial.

Bruno





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 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.
>From 4ecaa9f2580c6d0c32d20034f4ed8602a79d7f25 Mon Sep 17 00:00:00 2001
From: Paul Eggert 
Date: Sat, 18 Aug 2018 00:54:35 -0700
Subject: [PATCH] glob-h: always build glob.h

This works around a problem reported by Reuben Thomas in:
http://lists.gnu.org/r/bug-gnulib/2018-08/msg00079.html
This workaround always builds glob.h, even on platforms that
do not need it; perhaps this could be improved someday.
* m4/glob_h.m4 (gl_GLOB_H): Do not set or use GLOB_H, since glob.h
is always created now.
* modules/glob-h (BUILT_SOURCES, glob.h): Always build glob.h.
---
 ChangeLog  | 11 +++
 m4/glob_h.m4   | 18 +-
 modules/glob-h |  7 +--
 3 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bcf7f6839..120b4e94e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2018-08-18  Paul Eggert  
+
+	glob-h: always build glob.h
+	This works around a problem reported by Reuben Thomas in:
+	http://lists.gnu.org/r/bug-gnulib/2018-08/msg00079.html
+	This workaround always builds glob.h, even on platforms that
+	do not need it; perhaps this could be improved someday.
+	* m4/glob_h.m4 (gl_GLOB_H): Do not set or use GLOB_H, since glob.h
+	is always created now.
+	* modules/glob-h (BUILT_SOURCES, glob.h): Always build glob.h.
+
 2018-08-13  Bruno Haible  
 
 	monetary: Simplify m4 code.
diff --git a/m4/glob_h.m4 b/m4/glob_h.m4
index 942efe585..9fe49c733 100644
--- a/m4/glob_h.m4
+++ b/m4/glob_h.m4
@@ -1,4 +1,4 @@
-# glob_h.m4 serial 1
+# glob_h.m4 serial 2
 dnl Copyright (C) 2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,22 +21,6 @@ AC_DEFUN([gl_GLOB_H],
   fi
   AC_SUBST([HAVE_GLOB_H])
 
-  m4_ifdef([gl_POSIXCHECK],
-[GLOB_H=glob.h],
-[GLOB_H=''
- if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then
-   dnl Override  always, to support the C++ GNULIB_NAMESPACE.
-   GLOB_H=glob.h
- else
-   if test $ac_cv_header_glob_h != yes; then
- dnl Provide a substitute  file.
- GLOB_H=glob.h
-   fi
- fi
-])
-  AC_SUBST([GLOB_H])
-  AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"])
-
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include 
diff --git a/modules/glob-h b/modules/glob-h
index b490a7327..b61bc 100644
--- a/modules/glob-h
+++ b/modules/glob-h
@@ -20,10 +20,9 @@ configure.ac:
 gl_GLOB_H
 
 Makefile.am:
-BUILT_SOURCES += $(GLOB_H)
+BUILT_SOURCES += glob.h
 
 # We need the following in order to create .
-if GL_GENERATE_GLOB_H
 glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@@ -44,10 +43,6 @@ glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
 	  < $(srcdir)/glob.in.h; \
 	} > $@-t && \
 	mv $@-t $@
-else
-glob.h: $(top_builddir)/config.status
-	rm -f $@
-endif
 MOSTLYCLEANFILES += glob.h glob.h-t
 
 Include:
-- 
2.17.1



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 version 9.1.0 (clang-902.0.39.2)
>>
>>
> Also with gcc-5 and gcc-6. Actually, the problem seems to be simply when I
> build glob.c: if I build on a system with a recent glibc that doesn't need
> gnulib's glob.c, I don't get the problem.
>
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…

-- 
https://rrt.sc3d.org


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. Actually, the problem seems to be simply when I
build glob.c: if I build on a system with a recent glibc that doesn't need
gnulib's glob.c, I don't get the problem.

-- 
https://rrt.sc3d.org


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:
./malloc/scratch_buffer.h:98:8: error: unknown type name '__always_inline'
static __always_inline bool
   ^
./malloc/scratch_buffer.h:98:1: error: invalid storage class specifier in
function declarator
static __always_inline bool
^

-- 
https://rrt.sc3d.org