--- 5021_all_2.3.6-fnmatch-v2.patch 2006-03-14 15:54:41.000000000 +0000 +++ 5021_all_2.3.6-fnmatch.patch 2006-02-20 06:07:23.000000000 +0000 @@ -49,7 +49,7 @@ if (p) memset (&ps, '\0', sizeof (ps)); } -@@ -387,10 +381,8 @@ fnmatch (pattern, string, flags) +@@ -387,11 +381,8 @@ fnmatch (pattern, string, flags) { n = mbsrtowcs (NULL, &string, 0, &ps); if (__builtin_expect (n == (size_t) -1, 0)) @@ -57,9 +57,9 @@ - XXX Do we have to set `errno' to something which mbsrtows hasn't - already done? */ - return -1; +- wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); + /* Something wrong. Fall back to single byte matching. */ + goto try_singlebyte; - wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); assert (mbsinit (&ps)); (void) mbsrtowcs (wstring, &string, n + 1, &ps); }