about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/locale/strcoll.c11
-rw-r--r--src/locale/strcoll_l.c7
-rw-r--r--src/locale/wcscoll.c11
-rw-r--r--src/locale/wcscoll_l.c6
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);
-}