summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/string.h
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-06 19:14:48 +0000
committerMiguel de Icaza <miguel@nuclecu.unam.mx>1997-08-06 19:14:48 +0000
commite2819e52a162873ff5061de81bb749831bdb5de9 (patch)
tree6067ea700202750ba335a423696f2972700e5f76 /include/asm-ppc/string.h
parent17a005074429bbf143e40401f405ae4363e56828 (diff)
Merge to 2.1.38.
IMPORTANT NOTE: I could not figure out what information is the one that should be used for the following files (ie, those that were in our tree, or those that came from Linus' patch), please, check these: include/asm-mips/jazz.h include/asm-mips/jazzdma.h include/asm-mips/ioctls.h
Diffstat (limited to 'include/asm-ppc/string.h')
-rw-r--r--include/asm-ppc/string.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/include/asm-ppc/string.h b/include/asm-ppc/string.h
index 66243582e..207ab3689 100644
--- a/include/asm-ppc/string.h
+++ b/include/asm-ppc/string.h
@@ -1,26 +1,27 @@
#ifndef _PPC_STRING_H_
#define _PPC_STRING_H_
-
-
-/*
- * keep things happy, the compile became unhappy since memset is
- * 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,__kernel_size_t count)
+#define __HAVE_ARCH_STRCPY
+#define __HAVE_ARCH_STRNCPY
+#define __HAVE_ARCH_STRLEN
+#define __HAVE_ARCH_STRCMP
+#define __HAVE_ARCH_STRCAT
+#define __HAVE_ARCH_MEMSET
+#define __HAVE_ARCH_BCOPY
+#define __HAVE_ARCH_MEMCPY
+#define __HAVE_ARCH_MEMMOVE
+#define __HAVE_ARCH_MEMCMP
+#define __HAVE_ARCH_MEMCHR
+/*#define bzero(addr,size) memset((addr),(int)(0),(size))*/
+extern inline void * memchr(const void * cs,int c,size_t count)
{
- char *xs = (char *) s;
-
- while (count--)
- *xs++ = c;
-
- return s;
+ unsigned long i = 0;
+ while ( count != i )
+ {
+ if ( (char)c == *(char *)(cs + i) )
+ return (void *)(cs + i);
+ i--;
+ }
+ return NULL;
}
#endif
-#define bzero(addr,size) memset((addr),(int)(0),(size))
-
-
-#endif