diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-03 19:51:14 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-03 19:51:14 -0400 |
commit | 5600088d387491bd0af1879aa64e5d388805d8ec (patch) | |
tree | 924a8da2c193498161598b29aa563dff3328e1f4 /src/locale | |
parent | 3910e93340990a8107d9d9d1e8d5e9102817315f (diff) | |
download | musl-5600088d387491bd0af1879aa64e5d388805d8ec.tar.gz musl-5600088d387491bd0af1879aa64e5d388805d8ec.tar.bz2 musl-5600088d387491bd0af1879aa64e5d388805d8ec.tar.xz musl-5600088d387491bd0af1879aa64e5d388805d8ec.zip |
fix nl_langinfo to actually use the existing, correct internal version
Diffstat (limited to 'src/locale')
-rw-r--r-- | src/locale/langinfo.c | 7 | ||||
-rw-r--r-- | src/locale/nl_langinfo.c | 13 |
2 files changed, 5 insertions, 15 deletions
diff --git a/src/locale/langinfo.c b/src/locale/langinfo.c index f7f56012..01593148 100644 --- a/src/locale/langinfo.c +++ b/src/locale/langinfo.c @@ -1,5 +1,6 @@ #include <locale.h> #include <langinfo.h> +#include "libc.h" static const char c_time[] = "Sun\0" "Mon\0" "Tue\0" "Wed\0" "Thu\0" "Fri\0" "Sat\0" @@ -24,7 +25,7 @@ static const char c_time[] = static const char c_messages[] = "^[yY]\0" "^[nN]"; static const char c_numeric[] = ".\0" ""; -const char *__langinfo(nl_item item) +char *__langinfo(nl_item item) { int cat = item >> 16; int idx = item & 65535; @@ -54,5 +55,7 @@ const char *__langinfo(nl_item item) } for (; idx; idx--, str++) for (; *str; str++); - return str; + return (char *)str; } + +weak_alias(__langinfo, nl_langinfo); diff --git a/src/locale/nl_langinfo.c b/src/locale/nl_langinfo.c deleted file mode 100644 index bb3a2c46..00000000 --- a/src/locale/nl_langinfo.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <langinfo.h> - -// FIXME: other items - -char *nl_langinfo(nl_item item) -{ - switch (item) { - case CODESET: - return "UTF-8"; - default: - return ""; - } -} |