diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-04-29 21:13:14 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-04-29 21:13:14 +0000 |
commit | 19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch) | |
tree | 40b1cb534496a7f1ca0f5c314a523c69f1fee464 /include/asm-ppc/string.h | |
parent | 7206675c40394c78a90e74812bbdbf8cf3cca1be (diff) |
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'include/asm-ppc/string.h')
-rw-r--r-- | include/asm-ppc/string.h | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/include/asm-ppc/string.h b/include/asm-ppc/string.h index 7d550d1ed..66243582e 100644 --- a/include/asm-ppc/string.h +++ b/include/asm-ppc/string.h @@ -5,12 +5,12 @@ /* * keep things happy, the compile became unhappy since memset is - * in include/string.h and lib/string.c with different args + * in include/linux/string.h and lib/string.c with different prototypes * -- Cort */ - +#if 1 #define __HAVE_ARCH_MEMSET -extern inline void * memset(void * s,int c,size_t count) +extern __inline__ void * memset(void * s,int c,__kernel_size_t count) { char *xs = (char *) s; @@ -19,44 +19,8 @@ extern inline void * memset(void * s,int c,size_t count) return s; } -#define __HAVE_ARCH_STRSTR -/* Return the first occurrence of NEEDLE in HAYSTACK. */ -extern inline char * -strstr(const char *haystack, const char *needle) -{ - const char *const needle_end = strchr(needle, '\0'); - const char *const haystack_end = strchr(haystack, '\0'); - const size_t needle_len = needle_end - needle; - const size_t needle_last = needle_len - 1; - const char *begin; - - if (needle_len == 0) -#ifdef __linux__ - return (char *) haystack; -#else - return (char *) haystack_end; #endif - if ((size_t) (haystack_end - haystack) < needle_len) - return NULL; - - for (begin = &haystack[needle_last]; begin < haystack_end; ++begin) - { - register const char *n = &needle[needle_last]; - register const char *h = begin; - - do - if (*h != *n) - goto loop; /* continue for loop */ - while (--n >= needle && --h >= haystack); - - return (char *) h; - - loop:; - } - - return NULL; -} - +#define bzero(addr,size) memset((addr),(int)(0),(size)) #endif |