prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols

This commit is contained in:
Rich Felker 2013-07-24 18:17:09 -04:00
parent 17a60f9d32
commit 4b0306c83c
4 changed files with 20 additions and 15 deletions

View File

@ -1,6 +1,15 @@
#include <string.h>
#include <locale.h>
#include "libc.h"
int strcoll(const char *l, const char *r)
int __strcoll_l(const char *l, const char *r, locale_t loc)
{
return strcmp(l, r);
}
int strcoll(const char *l, const char *r)
{
return __strcoll_l(l, r, LC_GLOBAL_LOCALE);
}
weak_alias(__strcoll_l, strcoll_l);

View File

@ -1,7 +0,0 @@
#include <string.h>
#include <locale.h>
int strcoll_l(const char *l, const char *r, locale_t loc)
{
return strcoll(l, r);
}

View File

@ -1,7 +1,16 @@
#include <wchar.h>
#include <locale.h>
#include "libc.h"
/* FIXME: stub */
int wcscoll(const wchar_t *l, const wchar_t *r)
int __wcscoll_l(const wchar_t *l, const wchar_t *r, locale_t locale)
{
return wcscmp(l, r);
}
int wcscoll(const wchar_t *l, const wchar_t *r)
{
return __wcscoll_l(l, r, LC_GLOBAL_LOCALE);
}
weak_alias(__wcscoll_l, wcscoll_l);

View File

@ -1,6 +0,0 @@
#include <wchar.h>
int wcscoll_l(const wchar_t *l, const wchar_t *r, locale_t locale)
{
return wcscoll(l, r);
}