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
This commit is contained in:
parent
2c61c19f80
commit
d6d20de8b7
@ -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.
|
||||
|
@ -74,7 +74,7 @@ C["__xpg_sigpause"]=1
|
||||
seen=""
|
||||
seen_enable=""
|
||||
seen_disable=""
|
||||
object=gensub(/^.*\[(.*)\]:$/,"\\1","",$0)
|
||||
object=gensub(/^.*\[(.*)\]:$/, "\\1", 1, $0)
|
||||
next
|
||||
}
|
||||
{
|
||||
|
@ -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 ":";
|
||||
|
Loading…
x
Reference in New Issue
Block a user