commit: 23e3f65f2723f80c335d9309629439c27080b29f
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Aug 3 00:52:02 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 3 00:52:02 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=23e3f65f
Alter a variable name in quote_args()
Now that POSIX-1.2024 has been ratified, strictly_posix no longer makes
sense as a variable name.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
functions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/functions.sh b/functions.sh
index 7dd4d8f..94114cc 100644
--- a/functions.sh
+++ b/functions.sh
@@ -380,14 +380,14 @@ quote_args()
seq_by["\134"] = "\\"
}
BEGIN {
- strictly_posix = length(ENVIRON["POSIXLY_CORRECT"])
+ issue = length(ENVIRON["POSIXLY_CORRECT"]) ? 7 : 8;
argc = ARGC
ARGC = 1
for (arg_idx = 1; arg_idx < argc; arg_idx++) {
arg = ARGV[arg_idx]
if (arg == q) {
word = "\\" q
- } else if (strictly_posix || arg !~
/[\001-\037\177-\377]/) {
+ } else if (issue < 8 || arg !~ /[\001-\037\177-\377]/) {
gsub(q, q "\\" q q, arg)
word = q arg q
} else {