about summary refs log tree commit diff
path: root/src/locale/strxfrm.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-07-24 18:44:31 -0400
committerRich Felker <dalias@aerifal.cx>2013-07-24 18:44:31 -0400
commitad4a536769b5d4a736e324a7416571b0c17e47b9 (patch)
tree7d707e391e629d7c5c0446b8dfc03a956299fb01 /src/locale/strxfrm.c
parent4350935ca4521b647472b8c18053325e07541ba1 (diff)
downloadmusl-ad4a536769b5d4a736e324a7416571b0c17e47b9.tar.gz
musl-ad4a536769b5d4a736e324a7416571b0c17e47b9.tar.xz
musl-ad4a536769b5d4a736e324a7416571b0c17e47b9.zip
update strxfrm/wcsxfrm for future LC_COLLATE support and ABI compat
Diffstat (limited to 'src/locale/strxfrm.c')
-rw-r--r--src/locale/strxfrm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/locale/strxfrm.c b/src/locale/strxfrm.c
index d40be9e1..0ca9b071 100644
--- a/src/locale/strxfrm.c
+++ b/src/locale/strxfrm.c
@@ -1,9 +1,18 @@
 #include <string.h>
+#include <locale.h>
+#include "libc.h"
 
 /* collate only by code points */
-size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
+size_t __strxfrm_l(char *restrict dest, const char *restrict src, size_t n, locale_t loc)
 {
 	size_t l = strlen(src);
 	if (n > l) strcpy(dest, src);
 	return l;
 }
+
+size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
+{
+	return __strxfrm_l(dest, src, n, LC_GLOBAL_LOCALE);
+}
+
+weak_alias(__strxfrm_l, strxfrm_l);