Browse Source

prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols

rs-1.0
Rich Felker 13 years ago
parent
commit
4b0306c83c
  1. 11
      src/locale/strcoll.c
  2. 7
      src/locale/strcoll_l.c
  3. 11
      src/locale/wcscoll.c
  4. 6
      src/locale/wcscoll_l.c

11
src/locale/strcoll.c

@ -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);

7
src/locale/strcoll_l.c

@ -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);
}

11
src/locale/wcscoll.c

@ -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);

6
src/locale/wcscoll_l.c

@ -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);
}
Loading…
Cancel
Save