X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/7b00c0c43f52e9d27168e67a26aac19065cdb40c..ad3c9f2af814c84582fdd1649e49ec4f68572c5a:/regex/FreeBSD/regexec.c.patch diff --git a/regex/FreeBSD/regexec.c.patch b/regex/FreeBSD/regexec.c.patch deleted file mode 100644 index 409ee17..0000000 --- a/regex/FreeBSD/regexec.c.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- regexec.c.bsdnew 2009-11-11 11:29:04.000000000 -0800 -+++ regexec.c 2009-11-11 12:21:46.000000000 -0800 -@@ -39,6 +39,8 @@ static char sccsid[] = "@(#)regexec.c 8. - #include - __FBSDID("$FreeBSD: src/lib/libc/regex/regexec.c,v 1.8 2007/06/11 03:05:54 delphij Exp $"); - -+#include "xlocale_private.h" -+ - /* - * the outer shell of regexec() - * -@@ -62,12 +64,12 @@ __FBSDID("$FreeBSD: src/lib/libc/regex/r - static int nope __unused = 0; /* for use in asserts; shuts lint up */ - - static __inline size_t --xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy) -+xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy, locale_t loc) - { - size_t nr; - wchar_t wc; - -- nr = mbrtowc(&wc, s, n, mbs); -+ nr = mbrtowc_l(&wc, s, n, mbs, loc); - if (wi != NULL) - *wi = wc; - if (nr == 0) -@@ -86,7 +88,8 @@ xmbrtowc_dummy(wint_t *wi, - const char *s, - size_t n __unused, - mbstate_t *mbs __unused, -- wint_t dummy __unused) -+ wint_t dummy __unused, -+ locale_t loc __unused) - { - - if (wi != NULL) -@@ -176,6 +179,8 @@ xmbrtowc_dummy(wint_t *wi, - /* function names */ - #define LNAMES /* flag */ - -+#undef __FBSDID -+#define __FBSDID(x) - #include "engine.c" - - /* multibyte character & large states version */ -@@ -224,7 +229,8 @@ regexec(const regex_t * __restrict preg, - return(REG_BADPAT); - eflags = GOODFLAGS(eflags); - -- if (MB_CUR_MAX > 1) -+ g->loc = __current_locale(); -+ if (MB_CUR_MAX_L(g->loc) > 1) - return(mmatcher(g, (char *)string, nmatch, pmatch, eflags)); - else if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE)) - return(smatcher(g, (char *)string, nmatch, pmatch, eflags));