* nlsfuncs.cc (wcsxfrm): Call LCMapStringW with LCMAP_BYTEREV flag to

allow correct comparison using wcscmp.
This commit is contained in:
Corinna Vinschen 2010-01-23 10:11:43 +00:00
parent bc9fcc287d
commit e020bfa85b
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-01-23 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (wcsxfrm): Call LCMapStringW with LCMAP_BYTEREV flag to
allow correct comparison using wcscmp.
2010-01-22 Corinna Vinschen <corinna@vinschen.de>
* posix.sgml (strfmon): Move to implemented SUSv4 API.

View File

@ -637,7 +637,7 @@ wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t wsn)
if (!collate_lcid)
return wcslcpy (ws1, ws2, wsn);
ret = LCMapStringW (collate_lcid, LCMAP_SORTKEY,
ret = LCMapStringW (collate_lcid, LCMAP_SORTKEY | LCMAP_BYTEREV,
ws2, -1, ws1, wsn * sizeof (wchar_t));
/* LCMapStringW returns byte count including the terminating NUL character,
wcsxfrm is supposed to return length in wchar_t excluding the NUL.