blob: d1d752b5036ea50e90d576ff2f5f852e68c0078b [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*
2 * Copyright (C) 2002 Manuel Novoa III
3 * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
4 *
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 */
7
8#include "_string.h"
9
10#ifdef __USE_GNU
11
12#ifdef WANT_WIDE
13# define Wmempcpy wmempcpy
14#else
15# undef mempcpy
16# define Wmempcpy mempcpy
17#endif
18
19Wvoid *Wmempcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
20{
21 register Wchar *r1 = s1;
22 register const Wchar *r2 = s2;
23
24 while (n) {
25 *r1++ = *r2++;
26 --n;
27 }
28
29 return r1;
30}
31
32libc_hidden_weak(Wmempcpy)
33#endif