From: Adhemerval Zanella Date: Fri, 20 Jan 2023 20:50:41 +0000 (-0300) Subject: string: Hook up the default implementation on test-strncmp X-Git-Tag: glibc-2.38~612 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c863e33f784381c7341dc01e21c78d465e985bd6;p=thirdparty%2Fglibc.git string: Hook up the default implementation on test-strncmp Reviewed-by: Richard Henderson --- diff --git a/string/test-strncmp.c b/string/test-strncmp.c index fb4c6420b8e..35dc496eae8 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,