From 1676c181921e271aee47906b6f8389f95cce6581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 1 Sep 2004 14:35:20 +0000 Subject: [PATCH] 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 --- src/kernel/libroot/posix/string/Jamfile | 63 +++++++++++++------------ src/kernel/libroot/posix/string/bcopy.c | 7 +++ src/kernel/libroot/posix/string/bzero.c | 12 ++++- 3 files changed, 50 insertions(+), 32 deletions(-) diff --git a/src/kernel/libroot/posix/string/Jamfile b/src/kernel/libroot/posix/string/Jamfile index 30c65d37ac..397c6c4ea6 100644 --- a/src/kernel/libroot/posix/string/Jamfile +++ b/src/kernel/libroot/posix/string/Jamfile @@ -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 ; diff --git a/src/kernel/libroot/posix/string/bcopy.c b/src/kernel/libroot/posix/string/bcopy.c index 3507c84972..589e88bd36 100644 --- a/src/kernel/libroot/posix/string/bcopy.c +++ b/src/kernel/libroot/posix/string/bcopy.c @@ -3,9 +3,16 @@ ** Distributed under the terms of the NewOS License. */ + #include #include +#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) { diff --git a/src/kernel/libroot/posix/string/bzero.c b/src/kernel/libroot/posix/string/bzero.c index 8630c966a4..f0ab5b23a8 100644 --- a/src/kernel/libroot/posix/string/bzero.c +++ b/src/kernel/libroot/posix/string/bzero.c @@ -3,12 +3,20 @@ ** Distributed under the terms of the NewOS License. */ + #include #include + +#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); }