[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
address@hidden: [PATCH] use own copy of glob.c]
From: |
Dmitry Goncharov |
Subject: |
address@hidden: [PATCH] use own copy of glob.c] |
Date: |
Sat, 16 Dec 2017 23:59:02 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
glibc's glob.c currently does not handle patterns with a trailing slash
correctly.
https://sourceware.org/bugzilla/show_bug.cgi?id=22513.
This patch switches to gmake's own implementaion of glob until glibc is fixed.
Once glibc is fixed a version check can be added.
If the tests patch submitted in another email is applied then this patch should
be applied as well. Otherwise, gmake won't pass the tests on glibc systems.
regards, Dmitry
diff --git a/configure.ac b/configure.ac
index 4710832..1e0c6f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -410,7 +410,7 @@ AC_CACHE_CHECK([if system libc has GNU glob],
[make_cv_sys_gnu_glob],
gnu glob
# endif
#endif],
- [make_cv_sys_gnu_glob=yes],
+ [make_cv_sys_gnu_glob=no],
[make_cv_sys_gnu_glob=no])])
AS_IF([test "$make_cv_sys_gnu_glob" = no],
[ GLOBINC='-I$(srcdir)/glob'
diff --git a/glob/glob.c b/glob/glob.c
index f3911bc..6f8c8a4 100644
--- a/glob/glob.c
+++ b/glob/glob.c
@@ -57,6 +57,7 @@ USA. */
# endif
#endif
+#undef ELIDE_CODE
#ifndef ELIDE_CODE
#if defined STDC_HEADERS || defined __GNU_LIBRARY__
@@ -208,7 +209,7 @@ my_realloc (p, n)
#endif /* __GNU_LIBRARY__ || __DJGPP__ */
-#if !defined __alloca && !defined __GNU_LIBRARY__
+#if !defined __alloca
# ifdef __GNUC__
# undef alloca
@@ -255,6 +256,10 @@ extern char *alloca ();
# endif
#endif
+#ifndef __stat
+# define __stat stat
+#endif
+
#if !(defined STDC_HEADERS || defined __GNU_LIBRARY__)
# undef size_t
# define size_t unsigned int
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- address@hidden: [PATCH] use own copy of glob.c],
Dmitry Goncharov <=