public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] string: Hook up the default implementation on test-strncmp
@ 2023-02-06 20:15 Adhemerval Zanella
0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2023-02-06 20:15 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c863e33f784381c7341dc01e21c78d465e985bd6
commit c863e33f784381c7341dc01e21c78d465e985bd6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Jan 20 17:50:41 2023 -0300
string: Hook up the default implementation on test-strncmp
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diff:
---
string/test-strncmp.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/string/test-strncmp.c b/string/test-strncmp.c
index fb4c6420b8..35dc496eae 100644
--- a/string/test-strncmp.c
+++ b/string/test-strncmp.c
@@ -90,6 +90,22 @@ typedef int (*proto_t) (const CHAR *, const CHAR *, size_t);
IMPL (STRNCMP, 1)
+/* Also check the default implementation. */
+#undef STRNCMP
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(a)
+#undef attribute_hidden
+#define attribute_hidden
+#ifndef WIDE
+# define STRNCMP __strncmp_default
+# include "string/strncmp.c"
+# define STRNCMP_DEFAULT STRNCMP
+#else
+# define WCSNCMP __wcsncmp_default
+# include "wcsmbs/wcsncmp.c"
+# define STRNCMP_DEFAULT WCSNCMP
+#endif
+IMPL (STRNCMP_DEFAULT, 1)
static int
check_result (impl_t *impl, const CHAR *s1, const CHAR *s2, size_t n,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-06 20:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06 20:15 [glibc] string: Hook up the default implementation on test-strncmp Adhemerval Zanella
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).