bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation error in glob.c with gcc 4.8


From: Bruno Haible
Subject: Re: Compilation error in glob.c with gcc 4.8
Date: Sun, 19 Aug 2018 11:48:05 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-130-generic; KDE/5.18.0; x86_64; ; )

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  <address@hidden>

        glob: Fix another compilation error when glob.h is not replaced.
        Reported by Reuben Thomas <address@hidden> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.
        * 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])])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]