summaryrefslogtreecommitdiff
path: root/app-shells/bash/files/bash-5.2_p9-fix-for-extglob-in-compat-mode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/bash/files/bash-5.2_p9-fix-for-extglob-in-compat-mode.patch')
-rw-r--r--app-shells/bash/files/bash-5.2_p9-fix-for-extglob-in-compat-mode.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-5.2_p9-fix-for-extglob-in-compat-mode.patch b/app-shells/bash/files/bash-5.2_p9-fix-for-extglob-in-compat-mode.patch
new file mode 100644
index 000000000000..440800666870
--- /dev/null
+++ b/app-shells/bash/files/bash-5.2_p9-fix-for-extglob-in-compat-mode.patch
@@ -0,0 +1,42 @@
+https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00039.html
+https://bugs.gentoo.org/873931
+
+*** ../bash-5.2-patched/parse.y 2022-08-31 11:47:03.000000000 -0400
+--- parse.y 2022-10-05 11:55:18.000000000 -0400
+***************
+*** 4230,4234 ****
+ sh_parser_state_t ps;
+ sh_input_line_state_t ls;
+! int orig_ind, nc, sflags, start_lineno;
+ char *ret, *ep, *ostring;
+
+--- 4230,4234 ----
+ sh_parser_state_t ps;
+ sh_input_line_state_t ls;
+! int orig_ind, nc, sflags, start_lineno, local_extglob;
+ char *ret, *ep, *ostring;
+
+***************
+*** 4273,4277 ****
+ expand_aliases = 0;
+ #if defined (EXTENDED_GLOB)
+! global_extglob = extended_glob; /* for reset_parser() */
+ #endif
+
+--- 4273,4277 ----
+ expand_aliases = 0;
+ #if defined (EXTENDED_GLOB)
+! local_extglob = global_extglob = extended_glob; /* for reset_parser() */
+ #endif
+
+***************
+*** 4291,4294 ****
+--- 4291,4297 ----
+ restore_parser_state (&ps);
+
++ #if defined (EXTENDED_GLOB)
++ extended_glob = local_extglob;
++ #endif
+ token_to_read = 0;
+
+