From 4b0306c83c8c3614afbaf18a18e22d24f335ea04 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 24 Jul 2013 18:17:09 -0400 Subject: [PATCH] prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols --- src/locale/strcoll.c | 11 ++++++++++- src/locale/strcoll_l.c | 7 ------- src/locale/wcscoll.c | 11 ++++++++++- src/locale/wcscoll_l.c | 6 ------ 4 files changed, 20 insertions(+), 15 deletions(-) delete mode 100644 src/locale/strcoll_l.c delete mode 100644 src/locale/wcscoll_l.c 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); -} -- 2.25.1