public inbox for
help / color / mirror / Atom feed
From: Adhemerval Zanella <>
Subject: [glibc] string: Hook up the default implementation on test-strlen
Date: Mon,  6 Feb 2023 20:14:53 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=52d9adc9e33819323eb971712c136bd618cdea1d

commit 52d9adc9e33819323eb971712c136bd618cdea1d
Author: Adhemerval Zanella <>
Date:   Tue Jan 17 10:10:21 2023 -0300

    string: Hook up the default implementation on test-strlen
    Also remove the simple_STRLEN and builtin_strlen, which are not used
    Reviewed-by: Richard Henderson <>

 string/test-strlen.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/string/test-strlen.c b/string/test-strlen.c
index 81adf23737..0f98576f40 100644
--- a/string/test-strlen.c
+++ b/string/test-strlen.c
@@ -37,27 +37,24 @@
 typedef size_t (*proto_t) (const CHAR *);
-/* Naive implementation to verify results.  */
-simple_STRLEN (const CHAR *s)
-  const CHAR *p;
-  for (p = s; *p; ++p);
-  return p - s;
+/* Also check the generic implementation.  */
+#undef STRLEN
+#undef weak_alias
+#define weak_alias(a, b)
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(a)
 #ifndef WIDE
-builtin_strlen (const CHAR *p)
-  return __builtin_strlen (p);
-IMPL (builtin_strlen, 0)
+# define STRLEN __strlen_default
+# include "string/strlen.c"
+IMPL (__strlen_default, 1)
+# define WCSLEN __wcslen_default
+# include "wcsmbs/wcslen.c"
+IMPL (__wcslen_default, 1)
 static void
 do_one_test (impl_t *impl, const CHAR *s, size_t exp_len)

                 reply	other threads:[~2023-02-06 20:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).