* nlsfuncs.cc (__collate_range_cmp): Convert input to wchar_t and call
wcscoll since all calling functions are using wide chars. Explain in preceeding comment.
This commit is contained in:
parent
9e8cf6ebbd
commit
c1d6d05470
winsup/cygwin
|
@ -1,3 +1,9 @@
|
||||||
|
2013-06-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* nlsfuncs.cc (__collate_range_cmp): Convert input to wchar_t and call
|
||||||
|
wcscoll since all calling functions are using wide chars. Explain in
|
||||||
|
preceeding comment.
|
||||||
|
|
||||||
2013-06-18 Corinna Vinschen <corinna@vinschen.de>
|
2013-06-18 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* spawn.cc (child_info_spawn::worker): Eliminate wascygexec.
|
* spawn.cc (child_info_spawn::worker): Eliminate wascygexec.
|
||||||
|
|
|
@ -1187,13 +1187,15 @@ strcoll (const char *s1, const char *s2)
|
||||||
return ret - CSTR_EQUAL;
|
return ret - CSTR_EQUAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* BSD. Used in glob.cc and regcomp.c, for instance. */
|
/* BSD. Used from glob.cc, fnmatch.c and regcomp.c. Make sure caller is
|
||||||
|
using wide chars. Unfortunately the definition of this functions hides
|
||||||
|
the required input type. */
|
||||||
extern "C" int
|
extern "C" int
|
||||||
__collate_range_cmp (int c1, int c2)
|
__collate_range_cmp (int c1, int c2)
|
||||||
{
|
{
|
||||||
char s1[2] = { (char) c1, '\0' };
|
wchar_t s1[2] = { (wchar_t) c1, L'\0' };
|
||||||
char s2[2] = { (char) c2, '\0' };
|
wchar_t s2[2] = { (wchar_t) c2, L'\0' };
|
||||||
return strcoll (s1, s2);
|
return wcscoll (s1, s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" size_t
|
extern "C" size_t
|
||||||
|
|
Loading…
Reference in New Issue