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:
Axel Dörfler 2004-11-02 01:49:54 +00:00
parent d7fe004a2a
commit 40360d8c38
2 changed files with 22 additions and 0 deletions

View File

@ -8,6 +8,7 @@ KernelMergeObject posix_string.o :
memcpy.c
memmove.c
memset.c
stpcpy.c
strcasecmp.c
strcasestr.c
strcat.c

View 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;
}