Blame SOURCES/make-3.82-empty-members.patch

71dafe
From b06b8c64a29a5ba3a8daecd829fa2f98d42cb285 Mon Sep 17 00:00:00 2001
71dafe
From: Paul Smith <psmith@gnu.org>
71dafe
Date: Sun, 12 Jun 2011 16:22:04 +0000
71dafe
Subject: Fix another error related to whitespace handling in archives.
71dafe
71dafe
Note that this is a stripped version of the patch--ChangeLogs and some
71dafe
VMS stuff were kept out.
71dafe
---
71dafe
diff --git a/read.c b/read.c
71dafe
index c87d4a7..b012094 100644
71dafe
--- a/read.c
71dafe
+++ b/read.c
71dafe
@@ -3044,16 +3044,16 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
71dafe
                       nlen -= (n + 1) - tp;
71dafe
                       tp = n + 1;
71dafe
 
71dafe
-                      /* If we have just "lib(", part of something like
71dafe
-                         "lib( a b)", go to the next item.  */
71dafe
-                      if (! nlen)
71dafe
-                        continue;
71dafe
-
71dafe
                       /* We can stop looking now.  */
71dafe
                       break;
71dafe
                     }
71dafe
                 }
71dafe
               while (*e != '\0');
71dafe
+
71dafe
+              /* If we have just "lib(", part of something like "lib( a b)",
71dafe
+                 go to the next item.  */
71dafe
+              if (! nlen)
71dafe
+                continue;
71dafe
             }
71dafe
         }
71dafe
 
71dafe
diff --git a/tests/scripts/features/archives b/tests/scripts/features/archives
71dafe
index 00aa1af..3fe46a0 100644
71dafe
--- a/tests/scripts/features/archives
71dafe
+++ b/tests/scripts/features/archives
71dafe
@@ -36,6 +36,11 @@ utouch(-50, 'a2.o');
71dafe
 run_make_test('all: libxx.a(a3.o *.o)', '',
71dafe
               "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n");
71dafe
 
71dafe
+# Check whitespace handling
71dafe
+utouch(-40, 'a2.o');
71dafe
+run_make_test('all: libxx.a(  a3.o    *.o     )', '',
71dafe
+              "ar rv libxx.a a2.o\nr - a2.o\n");
71dafe
+
71dafe
 rmfiles(qw(a1.o a2.o a3.o libxx.a));
71dafe
 
71dafe
 # This tells the test driver that the perl test script executed properly.
71dafe
--
71dafe
cgit v0.9.0.2