]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
gawk: fix gensub usage
authorMike Frysinger <vapier@gentoo.org>
Thu, 6 Aug 2015 08:14:56 +0000 (04:14 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 9 Aug 2015 08:19:17 +0000 (04:19 -0400)
The third arg can either be a string with "g" or "G", or it is a number.
The empty string elicits a warning with newer versions like so:
gawk: scripts/sysd-rules.awk:56: warning: gensub: third argument `' treated as 1

ChangeLog
nptl/tst-cancel-wrappers.sh
scripts/sysd-rules.awk

index b98894da29cbc3cba60a1d720748b02cd3aad464..38d8d1bce6dea30a0e080acd7259acdd309630f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-09  Mike Frysinger  <vapier@gentoo.org>
+
+       * nptl/tst-cancel-wrappers.sh: Change 3rd arg to gensub to 1.
+       * scripts/sysd-rules.awk: Likewise.
+
 2015-08-09  Mike Frysinger  <vapier@gentoo.org>
 
        * iconvdata/tst-tables.sh: Change echo -n to printf.
index b2d8302654cdc80de477cfa00ad58bbe567407e5..d492a541d3dd75b698697111c3b71df183aa4489 100644 (file)
@@ -74,7 +74,7 @@ C["__xpg_sigpause"]=1
   seen=""
   seen_enable=""
   seen_disable=""
-  object=gensub(/^.*\[(.*)\]:$/,"\\1","",$0)
+  object=gensub(/^.*\[(.*)\]:$/, "\\1", 1, $0)
   next
 }
 {
index cc143345c6662536f01a1f60cfe50859fda80a9f..cebc9d3e1b9172c1c26e715f5eaf5a26854cb128 100644 (file)
@@ -53,7 +53,7 @@ BEGIN {
         if (target_pattern == "%") {
           command_suffix = "";
         } else {
-          prefix = gensub(/%/, "", "", target_pattern);
+          prefix = gensub(/%/, "", 1, target_pattern);
           command_suffix = " $(" prefix  "CPPFLAGS)";
         }
         target = "$(objpfx)" target_pattern o ":";