diff --git a/src/locale/duplocale.c b/src/locale/duplocale.c index 5f01e13799ad51cfd184782fbf22b7c832143422..f9fc1ffa75dac6e0c816984e94fe8754cc93edae 100644 --- a/src/locale/duplocale.c +++ b/src/locale/duplocale.c @@ -1,6 +1,7 @@ #include #include #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 4e089f223b9c95f1013cb762eed6299a0574128f..ee3f029abf5a10169ca77e9ebc0080df83464fd0 100644 --- a/src/locale/freelocale.c +++ b/src/locale/freelocale.c @@ -1,7 +1,10 @@ #include #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 1dccef63f71a90e40b4c6c1b663d3dd0864f9e1b..13dfb1ed359f4cea89150590e8d6e931ee5e7fe6 100644 --- a/src/locale/iswctype_l.c +++ b/src/locale/iswctype_l.c @@ -1,6 +1,9 @@ #include +#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 986e796f68452d284f76e9c79dbf2128770bb9a9..447c8fc20262420510135d7c26081acb4b86d638 100644 --- a/src/locale/newlocale.c +++ b/src/locale/newlocale.c @@ -1,6 +1,7 @@ #include #include #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 05fcde5318200d9de25345398ac5ebc05ad39a83..aaaea370f81fabf9c2399752bc93e2b6eab1440f 100644 --- a/src/locale/towlower_l.c +++ b/src/locale/towlower_l.c @@ -1,6 +1,9 @@ #include +#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 aa861ae6749f3b5327005954f7676bebfd7f46cb..ad02a4beab3ec1add96a46c89cdb154d8b6656bb 100644 --- a/src/locale/towupper_l.c +++ b/src/locale/towupper_l.c @@ -1,6 +1,9 @@ #include +#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 9c7995783d24869d118d7f1a5ab7cd295aeacc0d..224ef38727310d65104e29bccc02e5a31df16ef9 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 01f9c67f416e17217cdd4c1a28b8b9e0dfaf9968..601bab37d163fa88544ac11e4557d658c8bb92f0 100644 --- a/src/locale/wctype_l.c +++ b/src/locale/wctype_l.c @@ -1,6 +1,9 @@ #include +#include "libc.h" wctype_t wctype_l(const char *s, locale_t l) { return wctype(s); } + +weak_alias(wctype_l, __wctype_l);