summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/nlsfuncs.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2a16fa12f..45af01ab5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc
index 073aa1329..9467858c5 100644
--- a/winsup/cygwin/nlsfuncs.cc
+++ b/winsup/cygwin/nlsfuncs.cc
@@ -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.