fix for line numbers for nested function declarations; fix execve error for ENOENT

This commit is contained in:
Chet Ramey
2022-10-11 16:17:22 -04:00
parent 22f21b760e
commit 55a8311420
6 changed files with 42 additions and 12 deletions
+2
View File
@@ -846,6 +846,8 @@ fprintf(stderr, "extmatch: flags = %d\n", flags);
case, we just want to compare the two as strings. */
return (STRCOMPARE (p - 1, pe, s, se));
glob_recursion_depth++;
switch (xc)
{
case L('+'): /* match one or more occurrences */
+5
View File
@@ -60,6 +60,7 @@ extern int fnmatch (const char *, const char *, int);
#endif
int glob_asciirange = GLOBASCII_DEFAULT;
int glob_recursion_depth;
#if FNMATCH_EQUIV_FALLBACK
/* Construct a string w1 = "c1" and a pattern w2 = "[[=c2=]]" and pass them
@@ -609,6 +610,8 @@ xstrmatch (pattern, string, flags)
wchar_t *wpattern, *wstring;
size_t plen, slen, mplen, mslen;
glob_recursion_depth = 0;
if (MB_CUR_MAX == 1)
return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
@@ -633,6 +636,8 @@ xstrmatch (pattern, string, flags)
return ret;
#else
glob_recursion_depth = 0;
return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
#endif /* !HANDLE_MULTIBYTE */
}