From fb78612a963cfe1299b33b1c60a0c24a206276c3 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 25 Feb 2015 16:22:10 -0300 Subject: powerpc: Fix __wcschr static build This patch fix the static build for strftime, which uses __wcschr. Current powerpc32 implementation defines the __wcschr be an alias to __wcschr_ppc32 and current implementation misses the correct alias for static build. It also changes the default wcschr.c logic so a IFUNC implementation should just define WCSCHR and undefine the required alias/internal definitions. --- wcsmbs/wcschr.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'wcsmbs') diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c index a287283411..77624be36b 100644 --- a/wcsmbs/wcschr.c +++ b/wcsmbs/wcschr.c @@ -17,17 +17,13 @@ #include -/* Find the first occurrence of WC in WCS. */ -#ifdef WCSCHR -# define wcschr WCSCHR -#else -# define wcschr __wcschr +#ifndef WCSCHR +# define WCSCHR __wcschr #endif +/* Find the first occurrence of WC in WCS. */ wchar_t * -wcschr (wcs, wc) - const wchar_t *wcs; - const wchar_t wc; +WCSCHR (const wchar_t *wcs, const wchar_t wc) { do if (*wcs == wc) @@ -36,9 +32,6 @@ wcschr (wcs, wc) return NULL; } -libc_hidden_def (wcschr) -#ifndef WCSCHR -# undef wcschr +libc_hidden_def (__wcschr) weak_alias (__wcschr, wcschr) libc_hidden_weak (wcschr) -#endif -- cgit v1.2.3