diff mbox

Fix regex wcrtomb namespace (bug 18496)

Message ID alpine.DEB.2.10.1506052029540.16975@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers June 5, 2015, 8:30 p.m. UTC
The regex code brings in references to wcrtomb, which isn't in all the
standards that contain regex.  This patch makes it call __wcrtomb
instead (in fact some places already called __wcrtomb, so this patch
makes it internally consistent about which name is used).

Tested for x86_64 and x86 that installed stripped shared libraries are
unchanged by the patch.

2015-06-05  Joseph Myers  <joseph@codesourcery.com>

	[BZ #18496]
	* posix/regex_internal.c (build_wcs_upper_buffer): Call __wcrtomb
	instead of wcrtomb.

Comments

Roland McGrath June 5, 2015, 9:30 p.m. UTC | #1
OK
diff mbox

Patch

diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index d77d3a1..8597d7e 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -317,7 +317,7 @@  build_wcs_upper_buffer (re_string_t *pstr)
 		  size_t mbcdlen;
 
 		  wcu = __towupper (wc);
-		  mbcdlen = wcrtomb (buf, wcu, &prev_st);
+		  mbcdlen = __wcrtomb (buf, wcu, &prev_st);
 		  if (BE (mbclen == mbcdlen, 1))
 		    memcpy (pstr->mbs + byte_idx, buf, mbclen);
 		  else
@@ -387,7 +387,7 @@  build_wcs_upper_buffer (re_string_t *pstr)
 		size_t mbcdlen;
 
 		wcu = __towupper (wc);
-		mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
+		mbcdlen = __wcrtomb ((char *) buf, wcu, &prev_st);
 		if (BE (mbclen == mbcdlen, 1))
 		  memcpy (pstr->mbs + byte_idx, buf, mbclen);
 		else if (mbcdlen != (size_t) -1)