This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix strftime wcschr namespace (bug 17634)

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 @@
    <>.  */
 #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)
-#undef libc_hidden_def
-#define libc_hidden_def(a)
 #include <wcsmbs/wcschr.c>
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)
 #undef libc_hidden_def
 #define libc_hidden_def(a)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]