]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
string: Hook up the default implementation on test-strncmp
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 20 Jan 2023 20:50:41 +0000 (17:50 -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-strncmp.c

index fb4c6420b8e32bbb49abbac30d1f9b21d1770900..35dc496eae840dc23748d293f757545700e12199 100644 (file)
@@ -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,