From: Rich Felker Date: Wed, 24 Jul 2013 22:17:09 +0000 (-0400) Subject: prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols X-Git-Tag: v0.9.12~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b0306c83c8c3614afbaf18a18e22d24f335ea04;p=oweals%2Fmusl.git prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols --- diff --git a/src/locale/strcoll.c b/src/locale/strcoll.c index 30bccd62..8b84b1e6 100644 --- a/src/locale/strcoll.c +++ b/src/locale/strcoll.c @@ -1,6 +1,15 @@ #include +#include +#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); diff --git a/src/locale/strcoll_l.c b/src/locale/strcoll_l.c deleted file mode 100644 index 7948b0d1..00000000 --- a/src/locale/strcoll_l.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int strcoll_l(const char *l, const char *r, locale_t loc) -{ - return strcoll(l, r); -} diff --git a/src/locale/wcscoll.c b/src/locale/wcscoll.c index cdbce1c2..95a4ca74 100644 --- a/src/locale/wcscoll.c +++ b/src/locale/wcscoll.c @@ -1,7 +1,16 @@ #include +#include +#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); diff --git a/src/locale/wcscoll_l.c b/src/locale/wcscoll_l.c deleted file mode 100644 index f257ec8d..00000000 --- a/src/locale/wcscoll_l.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int wcscoll_l(const wchar_t *l, const wchar_t *r, locale_t locale) -{ - return wcscoll(l, r); -}