]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
string: Hook up the default implementation on test-strcmp
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 17 Jan 2023 13:13:35 +0000 (10:13 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 6 Feb 2023 19:19:35 +0000 (16:19 -0300)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
string/test-strcmp.c

index ceb0d29c74665bf504d9ed6eb3439da78d27ea1b..fa3161688c3a9eff47f6556e15c2589f7ea1d739 100644 (file)
@@ -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,