Added BSD style bcopy/bzero() functions to the build again - BeOS bash

uses them, too, and maybe others as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8772 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-09-01 14:35:20 +00:00
parent 7800e87a5a
commit 1676c18192
3 changed files with 50 additions and 32 deletions

View File

@ -1,34 +1,37 @@
SubDir OBOS_TOP src kernel libroot posix string ;
KernelMergeObject posix_string.o :
<$(SOURCE_GRIST)>memchr.c
<$(SOURCE_GRIST)>memcmp.c
<$(SOURCE_GRIST)>memcpy.c
<$(SOURCE_GRIST)>memmove.c
<$(SOURCE_GRIST)>memset.c
<$(SOURCE_GRIST)>strcasecmp.c
<$(SOURCE_GRIST)>strcasestr.c
<$(SOURCE_GRIST)>strcat.c
<$(SOURCE_GRIST)>strchr.c
<$(SOURCE_GRIST)>strchrnul.c
<$(SOURCE_GRIST)>strcmp.c
<$(SOURCE_GRIST)>strcpy.c
<$(SOURCE_GRIST)>strcspn.c
<$(SOURCE_GRIST)>strdup.c
<$(SOURCE_GRIST)>strerror.c
<$(SOURCE_GRIST)>strlcat.c
<$(SOURCE_GRIST)>strlcpy.c
<$(SOURCE_GRIST)>strlen.c
<$(SOURCE_GRIST)>strncat.c
<$(SOURCE_GRIST)>strncmp.c
<$(SOURCE_GRIST)>strncpy.c
<$(SOURCE_GRIST)>strnicmp.c
<$(SOURCE_GRIST)>strnlen.c
<$(SOURCE_GRIST)>strpbrk.c
<$(SOURCE_GRIST)>strrchr.c
<$(SOURCE_GRIST)>strspn.c
<$(SOURCE_GRIST)>strstr.c
<$(SOURCE_GRIST)>strtok.c
:
-fPIC -DPIC
bcopy.c
bzero.c
memchr.c
memcmp.c
memcpy.c
memmove.c
memset.c
strcasecmp.c
strcasestr.c
strcat.c
strchr.c
strchrnul.c
strcmp.c
strcoll.c
strcpy.c
strcspn.c
strdup.c
strerror.c
strlcat.c
strlcpy.c
strlen.c
strncat.c
strncmp.c
strncpy.c
strnicmp.c
strnlen.c
strpbrk.c
strrchr.c
strspn.c
strstr.c
strtok.c
: -fPIC -DPIC
;

View File

@ -3,9 +3,16 @@
** Distributed under the terms of the NewOS License.
*/
#include <sys/types.h>
#include <string.h>
#ifdef bcopy
# undef bcopy
#endif
void *bcopy(void const *src, void *dest, size_t count);
void *
bcopy(void const *src, void *dest, size_t count)
{

View File

@ -3,12 +3,20 @@
** Distributed under the terms of the NewOS License.
*/
#include <sys/types.h>
#include <string.h>
#ifdef bzero
# undef bzero
#endif
void bzero(void *dest, size_t count);
void
bzero(void *dst, size_t count)
bzero(void *dest, size_t count)
{
memset(dst, 0, count);
memset(dest, 0, count);
}