OSDN Git Service

libc/metag: add __kernel_long_t and __kernel_ulong_t
[uclinux-h8/uClibc.git] / libc / string / stpcpy.c
1 /*
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 WANT_WIDE
11 # define Wstpcpy wcpcpy
12 #else
13 # undef stpcpy
14 # define Wstpcpy stpcpy
15 #endif
16
17 Wchar *Wstpcpy(register Wchar * __restrict s1, const Wchar * __restrict s2)
18 {
19         while ( (*s1++ = *s2++) != 0 );
20
21         return s1 - 1;
22 }
23
24 #ifndef WANT_WIDE
25 libc_hidden_def(stpcpy)
26 #endif