mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
string: Hook up the default implementation on test-stpcpy
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@ -26,26 +26,36 @@
|
|||||||
#include "test-string.h"
|
#include "test-string.h"
|
||||||
#ifndef WIDE
|
#ifndef WIDE
|
||||||
# define CHAR char
|
# define CHAR char
|
||||||
# define SIMPLE_STPCPY simple_stpcpy
|
|
||||||
# define STPCPY stpcpy
|
# define STPCPY stpcpy
|
||||||
#else
|
#else
|
||||||
# include <wchar.h>
|
# include <wchar.h>
|
||||||
# define CHAR wchar_t
|
# define CHAR wchar_t
|
||||||
# define SIMPLE_STPCPY simple_wcpcpy
|
|
||||||
# define STPCPY wcpcpy
|
# define STPCPY wcpcpy
|
||||||
#endif /* !WIDE */
|
#endif /* !WIDE */
|
||||||
|
|
||||||
CHAR *SIMPLE_STPCPY (CHAR *, const CHAR *);
|
|
||||||
|
|
||||||
IMPL (SIMPLE_STPCPY, 0)
|
|
||||||
IMPL (STPCPY, 1)
|
IMPL (STPCPY, 1)
|
||||||
|
|
||||||
CHAR *
|
/* Also check the generic implementation. */
|
||||||
SIMPLE_STPCPY (CHAR *dst, const CHAR *src)
|
#undef STPCPY
|
||||||
{
|
#undef weak_alias
|
||||||
while ((*dst++ = *src++) != '\0');
|
#define weak_alias(a, b)
|
||||||
return dst - 1;
|
#undef libc_hidden_def
|
||||||
}
|
#define libc_hidden_def(a)
|
||||||
|
#undef libc_hidden_builtin_def
|
||||||
|
#define libc_hidden_builtin_def(a)
|
||||||
|
#undef attribute_hidden
|
||||||
|
#define attribute_hidden
|
||||||
|
#ifndef WIDE
|
||||||
|
# define STPCPY __stpcpy_default
|
||||||
|
# include "string/stpcpy.c"
|
||||||
|
IMPL (__stpcpy_default, 1)
|
||||||
|
#else
|
||||||
|
# define __wcslen wcslen
|
||||||
|
# define __wmemcpy wmemcpy
|
||||||
|
# define WCPCPY __wcpcpy_default
|
||||||
|
# include "wcsmbs/wcpcpy.c"
|
||||||
|
IMPL (__wcpcpy_default, 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef CHAR
|
#undef CHAR
|
||||||
#include "test-strcpy.c"
|
#include "test-strcpy.c"
|
||||||
|
Reference in New Issue
Block a user