|
140 | 140 | if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL)) |
141 | 141 | { |
142 | 142 | saw_escape++; |
143 | | ---- bash-4.4/builtins/set.def 2016-06-02 19:10:10.000000000 -0500 |
144 | | -+++ bash-4.4/builtins/set.def 2017-01-27 13:11:50.793821100 -0600 |
145 | | -@@ -56,6 +56,13 @@ extern int dont_save_function_defs; |
146 | | - #if defined (READLINE) |
147 | | - extern int no_line_editing; |
148 | | - #endif /* READLINE */ |
149 | | -+#ifdef __CYGWIN__ |
150 | | -+extern int igncr; |
151 | | -+static int set_minus_o_option_maybe (int, const char *, int); |
152 | | -+# define INTERACTIVE_ONLY ,1 |
153 | | -+#else |
154 | | -+# define INTERACTIVE_ONLY |
155 | | -+#endif |
156 | | - |
157 | | - $BUILTIN set |
158 | | - $FUNCTION set_builtin |
159 | | -@@ -92,6 +99,9 @@ Options: |
| 143 | +--- bash-5.1/builtins/set.def.orig 2020-08-03 20:31:43.000000000 +0200 |
| 144 | ++++ bash-5.1/builtins/set.def 2020-12-19 16:38:45.649368400 +0100 |
| 145 | +@@ -85,6 +85,9 @@ |
160 | 146 | #if defined (HISTORY) |
161 | 147 | history enable command history |
162 | 148 | #endif |
|
166 | 152 | ignoreeof the shell will not exit upon reading EOF |
167 | 153 | interactive-comments |
168 | 154 | allow comments to appear in interactive commands |
169 | | -@@ -192,29 +202,39 @@ const struct { |
| 155 | +@@ -176,6 +179,14 @@ |
| 156 | + |
| 157 | + static int previous_option_value; |
| 158 | + |
| 159 | ++#ifdef __CYGWIN__ |
| 160 | ++extern int igncr; |
| 161 | ++static int set_minus_o_option_maybe (int, const char *, int); |
| 162 | ++# define INTERACTIVE_ONLY ,1 |
| 163 | ++#else |
| 164 | ++# define INTERACTIVE_ONLY |
| 165 | ++#endif |
| 166 | ++ |
| 167 | + /* A struct used to match long options for set -o to the corresponding |
| 168 | + option letter or internal variable. The functions can be called to |
| 169 | + dynamically generate values. If you add a new variable name here |
| 170 | +@@ -187,29 +198,39 @@ |
170 | 171 | int *variable; |
171 | 172 | setopt_set_func_t *set_func; |
172 | 173 | setopt_get_func_t *get_func; |
|
210 | 211 | #endif |
211 | 212 | { "noclobber", 'C', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, |
212 | 213 | { "noexec", 'n', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, |
213 | | -@@ -233,7 +253,7 @@ const struct { |
| 214 | +@@ -228,7 +249,7 @@ |
214 | 215 | { "privileged", 'p', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, |
215 | 216 | { "verbose", 'v', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, |
216 | 217 | #if defined (READLINE) |
|
219 | 220 | #endif |
220 | 221 | { "xtrace", 'x', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, |
221 | 222 | {(char *)NULL, 0 , (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL }, |
222 | | -@@ -455,6 +475,15 @@ int |
| 223 | +@@ -486,6 +507,15 @@ |
223 | 224 | set_minus_o_option (on_or_off, option_name) |
224 | 225 | int on_or_off; |
225 | 226 | char *option_name; |
|
235 | 236 | { |
236 | 237 | register int i; |
237 | 238 |
|
238 | | -@@ -462,6 +491,10 @@ set_minus_o_option (on_or_off, option_na |
239 | | - { |
240 | | - if (STREQ (option_name, o_options[i].name)) |
241 | | - { |
| 239 | +@@ -496,6 +526,10 @@ |
| 240 | + return (EX_USAGE); |
| 241 | + } |
| 242 | + |
242 | 243 | +#ifdef __CYGWIN__ |
243 | 244 | + if (o_options[i].interactive_only && avoid_interactive) |
244 | 245 | + return EXECUTION_SUCCESS; |
245 | 246 | +#endif |
246 | | - if (o_options[i].letter == 0) |
247 | | - { |
248 | | - previous_option_value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); |
249 | | -@@ -588,7 +621,11 @@ parse_shellopts (value) |
| 247 | + if (o_options[i].letter == 0) |
| 248 | + { |
| 249 | + previous_option_value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name); |
| 250 | +@@ -616,7 +650,11 @@ |
250 | 251 | vptr = 0; |
251 | 252 | while (vname = extract_colon_unit (value, &vptr)) |
252 | 253 | { |
|
258 | 259 | free (vname); |
259 | 260 | } |
260 | 261 | } |
261 | | ---- bash-4.4/builtins/shopt.def 2016-05-06 14:00:02.000000000 -0500 |
262 | | -+++ bash-4.4/builtins/shopt.def 2017-01-27 13:11:50.793821100 -0600 |
263 | | -@@ -92,6 +92,10 @@ extern int glob_asciirange; |
264 | | - extern int lastpipe_opt; |
265 | | - extern int inherit_errexit; |
| 262 | +--- bash-5.1/builtins/shopt.def.orig 2020-12-19 16:11:42.347711100 +0100 |
| 263 | ++++ bash-5.1/builtins/shopt.def 2020-12-19 16:11:50.709182800 +0100 |
| 264 | +@@ -94,6 +94,10 @@ |
| 265 | + extern int localvar_inherit; |
| 266 | + extern int localvar_unset; |
266 | 267 |
|
267 | 268 | +#ifdef __CYGWIN__ |
268 | 269 | +extern int completion_strip_exe; |
|
271 | 272 | #if defined (EXTENDED_GLOB) |
272 | 273 | extern int extended_glob; |
273 | 274 | #endif |
274 | | -@@ -169,6 +173,9 @@ static struct { |
275 | | - { "compat41", &shopt_compat41, set_compatibility_level }, |
| 275 | +@@ -182,6 +186,9 @@ |
276 | 276 | { "compat42", &shopt_compat42, set_compatibility_level }, |
277 | 277 | { "compat43", &shopt_compat43, set_compatibility_level }, |
| 278 | + { "compat44", &shopt_compat44, set_compatibility_level }, |
278 | 279 | +#ifdef __CYGWIN__ |
279 | 280 | + { "completion_strip_exe", &completion_strip_exe, NULL }, |
280 | 281 | +#endif |
|
365 | 366 | +.so man1/bash.1 |
366 | 367 | .SH SEE ALSO |
367 | 368 | bash(1), sh(1) |
368 | | ---- bash-4.4/general.c 2016-08-11 10:16:56.000000000 -0500 |
369 | | -+++ bash-4.4/general.c 2017-01-27 13:11:50.809402700 -0600 |
370 | | -@@ -48,6 +48,10 @@ |
| 369 | +--- bash-5.1/general.c.orig 2020-07-28 20:35:53.000000000 +0200 |
| 370 | ++++ bash-5.1/general.c 2020-12-19 16:06:23.582528400 +0100 |
| 371 | +@@ -54,6 +54,10 @@ |
371 | 372 |
|
372 | 373 | #include <tilde/tilde.h> |
373 | 374 |
|
|
378 | 379 | #if !defined (errno) |
379 | 380 | extern int errno; |
380 | 381 | #endif /* !errno */ |
381 | | -@@ -718,7 +722,8 @@ make_absolute (string, dot_path) |
382 | | - { |
| 382 | +@@ -830,7 +834,7 @@ |
383 | 383 | char pathbuf[PATH_MAX + 1]; |
384 | 384 |
|
385 | | -- cygwin_conv_to_full_posix_path (string, pathbuf); |
386 | | -+ cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, string, pathbuf, |
387 | | -+ sizeof pathbuf); |
| 385 | + /* WAS cygwin_conv_to_full_posix_path (string, pathbuf); */ |
| 386 | +- cygwin_conv_path (CCP_WIN_A_TO_POSIX, string, pathbuf, PATH_MAX); |
| 387 | ++ cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, string, pathbuf, PATH_MAX); |
388 | 388 | result = savestring (pathbuf); |
389 | 389 | } |
390 | 390 | #else |
|
509 | 509 | } |
510 | 510 |
|
511 | 511 | static int |
512 | | ---- bash-4.4/subst.c 2017-01-27 12:21:44.779343300 -0600 |
513 | | -+++ bash-4.4/subst.c 2017-01-27 13:11:50.809402700 -0600 |
| 512 | +--- bash-5.1/subst.c.orig 2020-11-16 16:33:15.000000000 +0100 |
| 513 | ++++ bash-5.1/subst.c 2020-12-19 16:56:42.074812800 +0100 |
514 | 514 | @@ -43,6 +43,7 @@ |
515 | 515 | #include "posixstat.h" |
516 | 516 | #include "bashintl.h" |
|
519 | 519 | #include "shell.h" |
520 | 520 | #include "parser.h" |
521 | 521 | #include "flags.h" |
522 | | -@@ -5972,6 +5973,13 @@ read_comsub (fd, quoted, rflag) |
| 522 | +@@ -6216,6 +6217,13 @@ |
523 | 523 | #endif |
524 | 524 | continue; |
525 | 525 | } |
|
532 | 532 | +#endif |
533 | 533 |
|
534 | 534 | /* Add the character to ISTRING, possibly after resizing it. */ |
535 | | - RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE); |
536 | | -@@ -6096,6 +6104,28 @@ command_substitute (string, quoted) |
| 535 | + RESIZE_MALLOCED_BUFFER (istring, istring_index, mb_cur_max+1, istring_size, 512); |
| 536 | +@@ -6354,6 +6371,28 @@ |
537 | 537 | goto error_exit; |
538 | 538 | } |
539 | 539 |
|
|
559 | 559 | + } |
560 | 560 | +#endif /* __CYGWIN__ */ |
561 | 561 | + |
562 | | - old_pid = last_made_pid; |
563 | 562 | #if defined (JOB_CONTROL) |
564 | 563 | old_pipeline_pgrp = pipeline_pgrp; |
| 564 | + /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */ |
565 | 565 | --- bash-4.4/support/bashversion.c 2008-09-09 08:31:53.000000000 -0500 |
566 | 566 | +++ bash-4.4/support/bashversion.c 2017-01-27 13:11:50.809402700 -0600 |
567 | 567 | @@ -26,6 +26,9 @@ |
|
0 commit comments