diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-08-06 04:14:56 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-08-09 04:19:17 -0400 |
commit | d6d20de8b7ff6da6f3d29c5edb0ae3070f997f30 (patch) | |
tree | 180507c9f03b0eb48e852f08826743a6d31b5e80 | |
parent | 2c61c19f80e21743ef36bc53597ba893d4836dfc (diff) | |
download | glibc-d6d20de8b7ff6da6f3d29c5edb0ae3070f997f30.tar.gz glibc-d6d20de8b7ff6da6f3d29c5edb0ae3070f997f30.tar.xz glibc-d6d20de8b7ff6da6f3d29c5edb0ae3070f997f30.zip |
gawk: fix gensub usage
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | nptl/tst-cancel-wrappers.sh | 2 | ||||
-rw-r--r-- | scripts/sysd-rules.awk | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index b98894da29..38d8d1bce6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 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. * nss/db-Makefile: Likewise. * posix/tst-getconf.sh: Likewise. diff --git a/nptl/tst-cancel-wrappers.sh b/nptl/tst-cancel-wrappers.sh index b2d8302654..d492a541d3 100644 --- a/nptl/tst-cancel-wrappers.sh +++ b/nptl/tst-cancel-wrappers.sh @@ -74,7 +74,7 @@ C["__xpg_sigpause"]=1 seen="" seen_enable="" seen_disable="" - object=gensub(/^.*\[(.*)\]:$/,"\\1","",$0) + object=gensub(/^.*\[(.*)\]:$/, "\\1", 1, $0) next } { diff --git a/scripts/sysd-rules.awk b/scripts/sysd-rules.awk index cc143345c6..cebc9d3e1b 100644 --- a/scripts/sysd-rules.awk +++ b/scripts/sysd-rules.awk @@ -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 ":"; |