This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix strftime wcschr namespace (bug 17634)
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 10 Dec 2014 08:51:25 -0200
- Subject: Re: Fix strftime wcschr namespace (bug 17634)
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1411280043560 dot 15307 at digraph dot polyomino dot org dot uk> <548788AE dot 50808 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1412100036460 dot 18857 at digraph dot polyomino dot org dot uk>
On 09-12-2014 22:37, Joseph Myers wrote:
> On Tue, 9 Dec 2014, Adhemerval Zanella wrote:
>
>> This patch breaks both powerpc32 and powerpc64 builds and I fixed it by using
>> these changes over yours:
> This doesn't apply cleanly to me - could you send it as an attachment?
>
> patching file sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
> Hunk #1 FAILED at 17.
> 1 out of 1 hunk FAILED -- saving rejects to file sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c.rej
> patching file sysdeps/powerpc/powerpc64/multiarch/wcschr.c
> Hunk #1 succeeded at 32 with fuzz 1.
>
Sure, in attachments.
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
index d273d8d..ae5c517 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c
@@ -17,23 +17,25 @@
<http://www.gnu.org/licenses/>. */
#if IS_IN (libc)
+# define wcschr __redirect_wcschr
# include <wchar.h>
# include <shlib-compat.h>
# include "init-arch.h"
-extern __typeof (wcschr) __wcschr_ppc attribute_hidden;
-extern __typeof (wcschr) __wcschr_power6 attribute_hidden;
-extern __typeof (wcschr) __wcschr_power7 attribute_hidden;
+extern __typeof (__redirect_wcschr) __wcschr_ppc attribute_hidden;
+extern __typeof (__redirect_wcschr) __wcschr_power6 attribute_hidden;
+extern __typeof (__redirect_wcschr) __wcschr_power7 attribute_hidden;
-libc_ifunc (__wcschr,
+extern __typeof (__redirect_wcschr) __libc_wcschr;
+
+libc_ifunc (__libc_wcschr,
(hwcap & PPC_FEATURE_HAS_VSX)
? __wcschr_power7 :
(hwcap & PPC_FEATURE_ARCH_2_05)
? __wcschr_power6
: __wcschr_ppc);
-weak_alias (__wcschr, wcschr)
+#undef wcschr
+weak_alias (__libc_wcschr, wcschr)
#else
-#undef libc_hidden_def
-#define libc_hidden_def(a)
#include <wcsmbs/wcschr.c>
#endif
diff --git a/sysdeps/powerpc/powerpc64/multiarch/wcschr.c b/sysdeps/powerpc/powerpc64/multiarch/wcschr.c
index d273d8d..658cd93 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/wcschr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/wcschr.c
@@ -32,6 +32,7 @@ libc_ifunc (__wcschr,
? __wcschr_power6
: __wcschr_ppc);
weak_alias (__wcschr, wcschr)
+libc_hidden_builtin_def (wcschr)
#else
#undef libc_hidden_def
#define libc_hidden_def(a)