diff options
Diffstat (limited to 'newlib/libc/machine/spu/strcpy.c')
-rw-r--r-- | newlib/libc/machine/spu/strcpy.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/newlib/libc/machine/spu/strcpy.c b/newlib/libc/machine/spu/strcpy.c index 69045bae8..4d71cf483 100644 --- a/newlib/libc/machine/spu/strcpy.c +++ b/newlib/libc/machine/spu/strcpy.c @@ -1,6 +1,9 @@ /* - (C) Copyright 2008 + (C) Copyright 2001,2006, International Business Machines Corporation, + Sony Computer Entertainment, Incorporated, + Toshiba Corporation, + All rights reserved. Redistribution and use in source and binary forms, with or without @@ -27,15 +30,19 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <spu_intrinsics.h> #include <stddef.h> -#include "strcpy.h" -/* - * Copy the string pointed to by src (up to and including the /0 +/* Copy the string pointed to by src (up to and including the /0 * character) into the array pointed to by dest. If copy between * two arrays that overlap, then behavior is undefined. */ + char * strcpy(char * __restrict__ dest, const char * __restrict__ src) { - return _strncpy(dest, src, 0, 0, 0); + /* Due to the need to support all alignment variances, this + * function can not easily be optimized. As a result, it is + * serviced using strlen and memcpy. + */ + return ((char *)memcpy((void *)dest, (const void *)src, strlen(src)+1)); } |