Bash-4.3 patch 34

This commit is contained in:
Chet Ramey 2015-05-19 14:55:02 -04:00
commit 8daea13bac
4 changed files with 10 additions and 4 deletions

0
-i
View file

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
-i

View file

@ -751,9 +751,11 @@ unset_builtin (list)
WORD_LIST *list; WORD_LIST *list;
{ {
int unset_function, unset_variable, unset_array, opt, nameref, any_failed; int unset_function, unset_variable, unset_array, opt, nameref, any_failed;
int global_unset_func, global_unset_var;
char *name; char *name;
unset_function = unset_variable = unset_array = nameref = any_failed = 0; unset_function = unset_variable = unset_array = nameref = any_failed = 0;
global_unset_func = global_unset_var = 0;
reset_internal_getopt (); reset_internal_getopt ();
while ((opt = internal_getopt (list, "fnv")) != -1) while ((opt = internal_getopt (list, "fnv")) != -1)
@ -761,10 +763,10 @@ unset_builtin (list)
switch (opt) switch (opt)
{ {
case 'f': case 'f':
unset_function = 1; global_unset_func = 1;
break; break;
case 'v': case 'v':
unset_variable = 1; global_unset_var = 1;
break; break;
case 'n': case 'n':
nameref = 1; nameref = 1;
@ -777,7 +779,7 @@ unset_builtin (list)
list = loptend; list = loptend;
if (unset_function && unset_variable) if (global_unset_func && global_unset_var)
{ {
builtin_error (_("cannot simultaneously unset a function and a variable")); builtin_error (_("cannot simultaneously unset a function and a variable"));
return (EXECUTION_FAILURE); return (EXECUTION_FAILURE);
@ -795,6 +797,9 @@ unset_builtin (list)
name = list->word->word; name = list->word->word;
unset_function = global_unset_func;
unset_variable = global_unset_var;
#if defined (ARRAY_VARS) #if defined (ARRAY_VARS)
unset_array = 0; unset_array = 0;
if (!unset_function && valid_array_reference (name)) if (!unset_function && valid_array_reference (name))

View file

@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */ looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 33 #define PATCHLEVEL 34
#endif /* _PATCHLEVEL_H_ */ #endif /* _PATCHLEVEL_H_ */