about summary refs log tree commit diff
path: root/wcsmbs/wcschr.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2015-02-25 16:22:10 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.com>2015-04-15 16:01:48 -0300
commitfb78612a963cfe1299b33b1c60a0c24a206276c3 (patch)
tree00f5737b3f31ddc237f52ac9c00bccdd8674af4d /wcsmbs/wcschr.c
parenta8b6a3a6c1be265750c33766ba1f4151ae29749d (diff)
downloadglibc-fb78612a963cfe1299b33b1c60a0c24a206276c3.tar.gz
glibc-fb78612a963cfe1299b33b1c60a0c24a206276c3.tar.xz
glibc-fb78612a963cfe1299b33b1c60a0c24a206276c3.zip
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.
Diffstat (limited to 'wcsmbs/wcschr.c')
-rw-r--r--wcsmbs/wcschr.c17
1 files changed, 5 insertions, 12 deletions
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 <wchar.h>
 
-/* 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