Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 126164 | Differences between
and this patch

Collapse All | Expand All

(-)5021_all_2.3.6-fnmatch-v2.patch (-2 / +2 lines)
Lines 49-55 Link Here
49
 	  if (p)
49
 	  if (p)
50
 	    memset (&ps, '\0', sizeof (ps));
50
 	    memset (&ps, '\0', sizeof (ps));
51
 	}
51
 	}
52
@@ -387,10 +381,8 @@ fnmatch (pattern, string, flags)
52
@@ -387,11 +381,8 @@ fnmatch (pattern, string, flags)
53
 	{
53
 	{
54
 	  n = mbsrtowcs (NULL, &string, 0, &ps);
54
 	  n = mbsrtowcs (NULL, &string, 0, &ps);
55
 	  if (__builtin_expect (n == (size_t) -1, 0))
55
 	  if (__builtin_expect (n == (size_t) -1, 0))
Lines 57-65 Link Here
57
-	       XXX Do we have to set `errno' to something which mbsrtows hasn't
57
-	       XXX Do we have to set `errno' to something which mbsrtows hasn't
58
-	       already done?  */
58
-	       already done?  */
59
-	    return -1;
59
-	    return -1;
60
-	  wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
60
+	    /* Something wrong.  Fall back to single byte matching.  */
61
+	    /* Something wrong.  Fall back to single byte matching.  */
61
+	    goto try_singlebyte;
62
+	    goto try_singlebyte;
62
	  wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t));
63
 	  assert (mbsinit (&ps));
63
 	  assert (mbsinit (&ps));
64
 	  (void) mbsrtowcs (wstring, &string, n + 1, &ps);
64
 	  (void) mbsrtowcs (wstring, &string, n + 1, &ps);
65
 	}
65
 	}

Return to bug 126164