Added stpcpy() implementation for the sake of compatibility (it's not a POSIX function).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9735 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d7fe004a2a
commit
40360d8c38
@ -8,6 +8,7 @@ KernelMergeObject posix_string.o :
|
||||
memcpy.c
|
||||
memmove.c
|
||||
memset.c
|
||||
stpcpy.c
|
||||
strcasecmp.c
|
||||
strcasestr.c
|
||||
strcat.c
|
||||
|
21
src/kernel/libroot/posix/string/stpcpy.c
Normal file
21
src/kernel/libroot/posix/string/stpcpy.c
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* This is not a POSIX function, but since BeOS exports it, we need to, as well. */
|
||||
|
||||
char *
|
||||
stpcpy(char *dest, char const *src)
|
||||
{
|
||||
while ((*dest++ = *src++) != '\0')
|
||||
;
|
||||
|
||||
return dest - 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user