diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-01-10 18:00:56 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-06 16:19:35 -0300 |
commit | 506f7dbbabbad1f2d9f745636937b20c2670c29b (patch) | |
tree | e1b89230f62fd75dac9a48d47fc4d1d2600b0d14 /sysdeps/s390 | |
parent | 685e844a97ba0506dee575ba530b170edaa59fed (diff) | |
download | glibc-506f7dbbabbad1f2d9f745636937b20c2670c29b.zip glibc-506f7dbbabbad1f2d9f745636937b20c2670c29b.tar.gz glibc-506f7dbbabbad1f2d9f745636937b20c2670c29b.tar.bz2 |
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.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/s390/strchr-c.c b/sysdeps/s390/strchr-c.c index c00f2cc..90822ae 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 |