prepare strcoll/wcscoll for LC_COLLATE support and add ABI symbols
authorRich Felker <dalias@aerifal.cx>
Wed, 24 Jul 2013 22:17:09 +0000 (18:17 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 24 Jul 2013 22:17:09 +0000 (18:17 -0400)
src/locale/strcoll.c
src/locale/strcoll_l.c [deleted file]
src/locale/wcscoll.c
src/locale/wcscoll_l.c [deleted file]

index 30bccd6..8b84b1e 100644 (file)
@@ -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 (file)
index 7948b0d..0000000
+++ /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);
-}
index cdbce1c..95a4ca7 100644 (file)
@@ -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 (file)
index f257ec8..0000000
+++ /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);
-}