about summary refs log tree commit diff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-01-10 18:00:56 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-06 16:19:35 -0300
commit506f7dbbabbad1f2d9f745636937b20c2670c29b (patch)
treee1b89230f62fd75dac9a48d47fc4d1d2600b0d14 /sysdeps/s390
parent685e844a97ba0506dee575ba530b170edaa59fed (diff)
downloadglibc-506f7dbbabbad1f2d9f745636937b20c2670c29b.tar.gz
glibc-506f7dbbabbad1f2d9f745636937b20c2670c29b.tar.xz
glibc-506f7dbbabbad1f2d9f745636937b20c2670c29b.zip
string: Improve generic strchr
New algorithm now calls strchrnul.

Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu,
and powerpc64-linux-gnu by removing the arch-specific assembly
implementation and disabling multi-arch (it covers both LE and BE
for 64 and 32 bits).

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/strchr-c.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/s390/strchr-c.c b/sysdeps/s390/strchr-c.c
index c00f2cceea..90822ae0f4 100644
--- a/sysdeps/s390/strchr-c.c
+++ b/sysdeps/s390/strchr-c.c
@@ -21,13 +21,14 @@
 #if HAVE_STRCHR_C
 # if HAVE_STRCHR_IFUNC
 #  define STRCHR STRCHR_C
-#  undef weak_alias
+# endif
+
+# include <string/strchr.c>
+
+# if HAVE_STRCHR_IFUNC
 #  if defined SHARED && IS_IN (libc)
-#   undef libc_hidden_builtin_def
-#   define libc_hidden_builtin_def(name)			\
-     __hidden_ver1 (__strchr_c, __GI_strchr, __strchr_c);
+__hidden_ver1 (__strchr_c, __GI_strchr, __strchr_c);
 #  endif
 # endif
 
-# include <string/strchr.c>
 #endif