changeset 77:a08372bfb97e

merge with 3.4.8
author Jim Meyering <jim@meyering.net>
date Mon, 19 Apr 1993 00:39:34 +0000
parents 7031c61568a0
children c4584fcae3a5
files lib/Makefile.in lib/fnmatch.c
diffstat 2 files changed, 28 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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 <errno.h>
 #include <fnmatch.h>
 #include <ctype.h>
 
+
+/* 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__.  */