diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-24 18:17:09 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-24 18:17:09 -0400 |
commit | 4b0306c83c8c3614afbaf18a18e22d24f335ea04 (patch) | |
tree | 430a51a14852c246201eb9d181e4893fa20dea84 /src | |
parent | 17a60f9d327c6f8b5707a06f9497d846e75c01f2 (diff) | |
download | musl-4b0306c83c8c3614afbaf18a18e22d24f335ea04.tar.gz musl-4b0306c83c8c3614afbaf18a18e22d24f335ea04.tar.bz2 musl-4b0306c83c8c3614afbaf18a18e22d24f335ea04.tar.xz musl-4b0306c83c8c3614afbaf18a18e22d24f335ea04.zip |
prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols
Diffstat (limited to 'src')
-rw-r--r-- | src/locale/strcoll.c | 11 | ||||
-rw-r--r-- | src/locale/strcoll_l.c | 7 | ||||
-rw-r--r-- | src/locale/wcscoll.c | 11 | ||||
-rw-r--r-- | src/locale/wcscoll_l.c | 6 |
4 files changed, 20 insertions, 15 deletions
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 <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); 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 <string.h> -#include <locale.h> - -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 <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); 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 <wchar.h> - -int wcscoll_l(const wchar_t *l, const wchar_t *r, locale_t locale) -{ - return wcscoll(l, r); -} |