aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-01-10 18:00:55 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-06 16:19:35 -0300
commit0f4254311ebf15b8f3f6f66182e8dd5151a58a88 (patch)
tree9a03470d7c7ec394b35cecaf2e1b57a7e8dc08cc /sysdeps/s390
parent2a8867a17ffe5c5a4251fd40bf6c73a3fd426062 (diff)
downloadglibc-0f4254311ebf15b8f3f6f66182e8dd5151a58a88.zip
glibc-0f4254311ebf15b8f3f6f66182e8dd5151a58a88.tar.gz
glibc-0f4254311ebf15b8f3f6f66182e8dd5151a58a88.tar.bz2
string: Improve generic strnlen with memchr
It also cleanups the multiple inclusion by leaving the ifunc implementation to undef the weak_alias and libc_hidden_def. Co-authored-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/strnlen-c.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/s390/strnlen-c.c b/sysdeps/s390/strnlen-c.c
index 172fcc7..95156a0 100644
--- a/sysdeps/s390/strnlen-c.c
+++ b/sysdeps/s390/strnlen-c.c
@@ -21,14 +21,16 @@
#if HAVE_STRNLEN_C
# if HAVE_STRNLEN_IFUNC
# define STRNLEN STRNLEN_C
+# endif
+
+# include <string/strnlen.c>
+
+# if HAVE_STRNLEN_IFUNC
# if defined SHARED && IS_IN (libc)
-# undef libc_hidden_def
-# define libc_hidden_def(name) \
- __hidden_ver1 (__strnlen_c, __GI_strnlen, __strnlen_c); \
- strong_alias (__strnlen_c, __strnlen_c_1); \
- __hidden_ver1 (__strnlen_c_1, __GI___strnlen, __strnlen_c_1);
+__hidden_ver1 (__strnlen_c, __GI_strnlen, __strnlen_c);
+strong_alias (__strnlen_c, __strnlen_c_1);
+__hidden_ver1 (__strnlen_c_1, __GI___strnlen, __strnlen_c_1);
# endif
# endif
-# include <string/strnlen.c>
#endif