about summary refs log tree commit diff
path: root/src/locale/langinfo.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-07-24 18:52:02 -0400
committerRich Felker <dalias@aerifal.cx>2013-07-24 18:52:02 -0400
commit87be54a135db6d9ad16fcffe72b05c8d23b0f089 (patch)
treed8ed72c76869c96515034fc0bf56792742ab0c1e /src/locale/langinfo.c
parentad4a536769b5d4a736e324a7416571b0c17e47b9 (diff)
downloadmusl-87be54a135db6d9ad16fcffe72b05c8d23b0f089.tar.gz
musl-87be54a135db6d9ad16fcffe72b05c8d23b0f089.tar.xz
musl-87be54a135db6d9ad16fcffe72b05c8d23b0f089.zip
rework langinfo code for ABI compat and for use by time code
Diffstat (limited to 'src/locale/langinfo.c')
-rw-r--r--src/locale/langinfo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/locale/langinfo.c b/src/locale/langinfo.c
index 01593148..b4d53744 100644
--- a/src/locale/langinfo.c
+++ b/src/locale/langinfo.c
@@ -25,7 +25,7 @@ static const char c_time[] =
 static const char c_messages[] = "^[yY]\0" "^[nN]";
 static const char c_numeric[] = ".\0" "";
 
-char *__langinfo(nl_item item)
+char *__nl_langinfo_l(nl_item item, locale_t loc)
 {
 	int cat = item >> 16;
 	int idx = item & 65535;
@@ -58,4 +58,10 @@ char *__langinfo(nl_item item)
 	return (char *)str;
 }
 
-weak_alias(__langinfo, nl_langinfo);
+char *__nl_langinfo(nl_item item)
+{
+	return __nl_langinfo_l(item, LC_GLOBAL_LOCALE);
+}
+
+weak_alias(__nl_langinfo, nl_langinfo);
+weak_alias(__nl_langinfo_l, nl_langinfo_l);