about summary refs log tree commit diff
path: root/string/test-strcmp.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-01-17 10:13:35 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-06 16:19:35 -0300
commite7a0c81e61bfe0d60df5611bd3ce33b8da8c5836 (patch)
tree7fa9fab36162faa522061a30d8b8c2a0e215e9ba /string/test-strcmp.c
parentc19e3394a2a85cabc9a1a02551ec1c2d8085b148 (diff)
downloadglibc-e7a0c81e61bfe0d60df5611bd3ce33b8da8c5836.tar.gz
glibc-e7a0c81e61bfe0d60df5611bd3ce33b8da8c5836.tar.xz
glibc-e7a0c81e61bfe0d60df5611bd3ce33b8da8c5836.zip
string: Hook up the default implementation on test-strcmp
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'string/test-strcmp.c')
-rw-r--r--string/test-strcmp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/string/test-strcmp.c b/string/test-strcmp.c
index ceb0d29c74..fa3161688c 100644
--- a/string/test-strcmp.c
+++ b/string/test-strcmp.c
@@ -101,6 +101,28 @@ typedef int (*proto_t) (const CHAR *, const CHAR *);
 
 IMPL (STRCMP, 1)
 
+/* Also check the default implementation.  */
+#undef STRCMP
+#undef libc_hidden_builtin_def
+#define libc_hidden_builtin_def(a)
+#undef libc_hidden_def
+#define libc_hidden_def(a)
+#undef weak_alias
+#define weak_alias(a, b)
+#undef attribute_hidden
+#define attribute_hidden
+#ifndef WIDE
+# define STRCMP __strcmp_default
+# include "string/strcmp.c"
+# define STRCMP_DEFAULT STRCMP
+#else
+# define WCSCMP __wcscmp_default
+# include "wcsmbs/wcscmp.c"
+# define STRCMP_DEFAULT WCSCMP
+#endif
+IMPL (STRCMP_DEFAULT, 1)
+
+
 static int
 check_result (impl_t *impl,
 	     const CHAR *s1, const CHAR *s2,