diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-24 18:44:31 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-24 18:44:31 -0400 |
commit | ad4a536769b5d4a736e324a7416571b0c17e47b9 (patch) | |
tree | 7d707e391e629d7c5c0446b8dfc03a956299fb01 /src/locale/strxfrm.c | |
parent | 4350935ca4521b647472b8c18053325e07541ba1 (diff) | |
download | musl-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.c | 11 |
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); |