This is the mail archive of the glibc-cvs@sourceware.org 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]

GNU C Library master sources branch master updated. glibc-2.21-269-gfb78612


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  fb78612a963cfe1299b33b1c60a0c24a206276c3 (commit)
      from  a8b6a3a6c1be265750c33766ba1f4151ae29749d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb78612a963cfe1299b33b1c60a0c24a206276c3

commit fb78612a963cfe1299b33b1c60a0c24a206276c3
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Wed Feb 25 16:22:10 2015 -0300

    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.

diff --git a/ChangeLog b/ChangeLog
index dddb0ae..8f7c176 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-04-15  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* wcsmbs/wcschr.c [WCSCHR] (wcschr): Define as __wcschr.  Remove
+	conditionals for weak_alias and libc_hidden_weak.
+	* sysdeps/i386/i686/multiarch/wcschr-c.c [libc]: Undefine
+	libc_hidden_weak and weak_alias.
+	* sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c [libc]:
+	Undefine libc_hidden_weak. Define libc_hidden_def for SHARED builds
+	and weak_alias for static one.
+
 2015-04-15  David S. Miller  <davem@davemloft.net>
 
 	* sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.
diff --git a/sysdeps/i386/i686/multiarch/wcschr-c.c b/sysdeps/i386/i686/multiarch/wcschr-c.c
index 786c132..38d41d0 100644
--- a/sysdeps/i386/i686/multiarch/wcschr-c.c
+++ b/sysdeps/i386/i686/multiarch/wcschr-c.c
@@ -1,6 +1,12 @@
 #include <wchar.h>
 
 #if IS_IN (libc)
+# undef libc_hidden_weak
+# define libc_hidden_weak(name)
+
+# undef weak_alias
+# define weak_alias(name,alias)
+
 # ifdef SHARED
 #  undef libc_hidden_def
 #  define libc_hidden_def(name) \
@@ -8,9 +14,9 @@
    strong_alias (__wcschr_ia32, __wcschr_ia32_1); \
    __hidden_ver1 (__wcschr_ia32_1, __GI___wcschr, __wcschr_ia32_1);
 # endif
-# define WCSCHR  __wcschr_ia32
 #endif
 
 extern __typeof (wcschr) __wcschr_ia32;
 
-#include "wcsmbs/wcschr.c"
+#define WCSCHR  __wcschr_ia32
+#include <wcsmbs/wcschr.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
index df586a6..3b2ab3a 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c
@@ -18,16 +18,26 @@
 #include <wchar.h>
 
 #if IS_IN (libc)
+# undef libc_hidden_weak
+# define libc_hidden_weak(name)
+
+# undef weak_alias
+# undef libc_hidden_def
+
 # ifdef SHARED
-#   undef libc_hidden_def
-#   define libc_hidden_def(name)  \
+#  define libc_hidden_def(name)  \
     __hidden_ver1 (__wcschr_ppc, __GI_wcschr, __wcschr_ppc); \
     strong_alias (__wcschr_ppc, __wcschr_ppc_1); \
     __hidden_ver1 (__wcschr_ppc_1, __GI___wcschr, __wcschr_ppc_1);
-# endif
-# define WCSCHR  __wcschr_ppc
+#  define weak_alias(name,alias)
+# else
+#  define weak_alias(name, alias) \
+    _weak_alias(__wcschr_ppc, __wcschr)
+#  define libc_hidden_def(name)
+# endif /* SHARED  */
 #endif
 
 extern __typeof (wcschr) __wcschr_ppc;
 
+#define WCSCHR  __wcschr_ppc
 #include <wcsmbs/wcschr.c>
diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c
index a287283..77624be 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

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   10 ++++++++++
 sysdeps/i386/i686/multiarch/wcschr-c.c             |   10 ++++++++--
 .../powerpc32/power4/multiarch/wcschr-ppc32.c      |   18 ++++++++++++++----
 wcsmbs/wcschr.c                                    |   17 +++++------------
 4 files changed, 37 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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