summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-07-24 18:40:52 -0400
committerRich Felker <dalias@aerifal.cx>2013-07-24 18:40:52 -0400
commit4350935ca4521b647472b8c18053325e07541ba1 (patch)
tree12688c7c8dae04785a9edf07c2ef179a0637f5f6 /src
parenta512c7d8496d587281a1da41adc02c7785339429 (diff)
downloadmusl-4350935ca4521b647472b8c18053325e07541ba1.tar.gz
musl-4350935ca4521b647472b8c18053325e07541ba1.tar.bz2
musl-4350935ca4521b647472b8c18053325e07541ba1.tar.xz
musl-4350935ca4521b647472b8c18053325e07541ba1.zip
add ABI compat aliases for a number of locale_t functions
Diffstat (limited to 'src')
-rw-r--r--src/locale/duplocale.c3
-rw-r--r--src/locale/freelocale.c3
-rw-r--r--src/locale/iswctype_l.c3
-rw-r--r--src/locale/newlocale.c3
-rw-r--r--src/locale/towlower_l.c3
-rw-r--r--src/locale/towupper_l.c3
-rw-r--r--src/locale/uselocale.c3
-rw-r--r--src/locale/wctype_l.c3
8 files changed, 24 insertions, 0 deletions
diff --git a/src/locale/duplocale.c b/src/locale/duplocale.c
index 5f01e137..f9fc1ffa 100644
--- a/src/locale/duplocale.c
+++ b/src/locale/duplocale.c
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <string.h>
#include "locale_impl.h"
+#include "libc.h"
locale_t duplocale(locale_t old)
{
@@ -9,3 +10,5 @@ locale_t duplocale(locale_t old)
if (new && old != LC_GLOBAL_LOCALE) memcpy(new, old, sizeof *new);
return new;
}
+
+weak_alias(duplocale, __duplocale);
diff --git a/src/locale/freelocale.c b/src/locale/freelocale.c
index 4e089f22..ee3f029a 100644
--- a/src/locale/freelocale.c
+++ b/src/locale/freelocale.c
@@ -1,7 +1,10 @@
#include <stdlib.h>
#include "locale_impl.h"
+#include "libc.h"
void freelocale(locale_t l)
{
free(l);
}
+
+weak_alias(freelocale, __freelocale);
diff --git a/src/locale/iswctype_l.c b/src/locale/iswctype_l.c
index 1dccef63..13dfb1ed 100644
--- a/src/locale/iswctype_l.c
+++ b/src/locale/iswctype_l.c
@@ -1,6 +1,9 @@
#include <wctype.h>
+#include "libc.h"
int iswctype_l(wint_t c, wctype_t t, locale_t l)
{
return iswctype(c, t);
}
+
+weak_alias(iswctype_l, __iswctype_l);
diff --git a/src/locale/newlocale.c b/src/locale/newlocale.c
index 986e796f..447c8fc2 100644
--- a/src/locale/newlocale.c
+++ b/src/locale/newlocale.c
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <string.h>
#include "locale_impl.h"
+#include "libc.h"
locale_t newlocale(int mask, const char *name, locale_t base)
{
@@ -9,3 +10,5 @@ locale_t newlocale(int mask, const char *name, locale_t base)
if (!base) base = calloc(1, sizeof *base);
return base;
}
+
+weak_alias(newlocale, __newlocale);
diff --git a/src/locale/towlower_l.c b/src/locale/towlower_l.c
index 05fcde53..aaaea370 100644
--- a/src/locale/towlower_l.c
+++ b/src/locale/towlower_l.c
@@ -1,6 +1,9 @@
#include <wctype.h>
+#include "libc.h"
wint_t towlower_l(wint_t c, locale_t l)
{
return towlower(c);
}
+
+weak_alias(towlower_l, __towlower_l);
diff --git a/src/locale/towupper_l.c b/src/locale/towupper_l.c
index aa861ae6..ad02a4be 100644
--- a/src/locale/towupper_l.c
+++ b/src/locale/towupper_l.c
@@ -1,6 +1,9 @@
#include <wctype.h>
+#include "libc.h"
wint_t towupper_l(wint_t c, locale_t l)
{
return towupper(c);
}
+
+weak_alias(towupper_l, __towupper_l);
diff --git a/src/locale/uselocale.c b/src/locale/uselocale.c
index 9c799578..224ef387 100644
--- a/src/locale/uselocale.c
+++ b/src/locale/uselocale.c
@@ -1,5 +1,6 @@
#include "locale_impl.h"
#include "pthread_impl.h"
+#include "libc.h"
locale_t uselocale(locale_t l)
{
@@ -8,3 +9,5 @@ locale_t uselocale(locale_t l)
if (l) self->locale = l;
return old;
}
+
+weak_alias(uselocale, __uselocale);
diff --git a/src/locale/wctype_l.c b/src/locale/wctype_l.c
index 01f9c67f..601bab37 100644
--- a/src/locale/wctype_l.c
+++ b/src/locale/wctype_l.c
@@ -1,6 +1,9 @@
#include <wctype.h>
+#include "libc.h"
wctype_t wctype_l(const char *s, locale_t l)
{
return wctype(s);
}
+
+weak_alias(wctype_l, __wctype_l);