merge with 3.4.8
authorJim Meyering <jim@meyering.net>
Mon, 19 Apr 1993 00:39:34 +0000 (00:39 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 19 Apr 1993 00:39:34 +0000 (00:39 +0000)
lib/Makefile.in
lib/fnmatch.c

index affeea2..83ea275 100644 (file)
@@ -74,18 +74,20 @@ libfu.a: $(OBJECTS)
        $(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
index 20e2b50..8a25a90 100644 (file)
@@ -15,10 +15,26 @@ License along with this library; see the file COPYING.LIB.  If
 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 @@ fnmatch (pattern, string, flags)
 
   return FNM_NOMATCH;
 }
+
+#endif /* _LIBC or not __GNU_LIBRARY__.  */