# HG changeset patch # User Jim Meyering # Date 735179974 0 # Node ID a08372bfb97e69afe02d76bd211dc8ade3ce2769 # Parent 7031c61568a08c8e502f75fca9c1c148d861adbd merge with 3.4.8 diff --git a/lib/Makefile.in b/lib/Makefile.in --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -74,18 +74,20 @@ $(AR) cr $@ $(OBJECTS) -$(RANLIB) $@ -# Since this directory contains two parsers, using bison without -y -# is the only way to reliably do a parallel make. +# Since this directory contains two parsers, we have to be careful to avoid +# running two $(YACC)s during parallel makes. See below. getdate.c: getdate.y @echo expect 9 shift/reduce conflicts - -bison -o getdate.c $(srcdir)/getdate.y || $(YACC) $(srcdir)/getdate.y - test ! -f y.tab.c || mv y.tab.c getdate.c + $(YACC) $(srcdir)/getdate.y + mv y.tab.c getdate.c # Make the rename atomic, in case sed is interrupted and later rerun. -posixtm.c: posixtm.y - -bison -o posixtm.tab.c $(srcdir)/posixtm.y \ - || $(YACC) $(srcdir)/posixtm.y - test ! -f y.tab.c || mv y.tab.c posixtm.tab.c +# The artificial dependency on getdate.c keeps the two parsers from being +# built in parallel. Enforcing this little bit of sequentiality lets +# everyone (even those without bison) still run mostly parallel builds. +posixtm.c: posixtm.y getdate.c + $(YACC) $(srcdir)/posixtm.y + mv y.tab.c posixtm.tab.c sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c mv tposixtm.c posixtm.c rm -f posixtm.tab.c diff --git a/lib/fnmatch.c b/lib/fnmatch.c --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -15,10 +15,26 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#if defined (_LIBC) || !defined (__GNU_LIBRARY__) + + #if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) extern int errno; #endif @@ -180,3 +196,5 @@ return FNM_NOMATCH; } + +#endif /* _LIBC or not __GNU_LIBRARY__. */