* - Kissed strtok() goodbye
*/
-#define IN_STRING_C 1
-
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ctype.h>
* @dest: Where to copy the string to
* @src: Where to copy the string from
*/
+#undef strcpy
char * strcpy(char * dest,const char *src)
{
char *tmp = dest;
/* nothing */;
return tmp;
}
+EXPORT_SYMBOL(strcpy);
#endif
#ifndef __HAVE_ARCH_STRNCPY
*
* The result is not %NUL-terminated if the source exceeds
* @count bytes.
+ *
+ * In the case where the length of @src is less than that of
+ * count, the remainder of @dest will be padded with %NUL.
+ *
*/
char * strncpy(char * dest,const char *src,size_t count)
{
}
return dest;
}
+EXPORT_SYMBOL(strncpy);
#endif
#ifndef __HAVE_ARCH_STRLCPY
* @dest: The string to be appended to
* @src: The string to append to it
*/
+#undef strcat
char * strcat(char * dest, const char * src)
{
char *tmp = dest;
return tmp;
}
+EXPORT_SYMBOL(strcat);
#endif
#ifndef __HAVE_ARCH_STRNCAT
if (count) {
while (*dest)
dest++;
- while ((*dest++ = *src++)) {
+ while ((*dest++ = *src++) != 0) {
if (--count == 0) {
*dest = '\0';
break;
return tmp;
}
+EXPORT_SYMBOL(strncat);
#endif
#ifndef __HAVE_ARCH_STRLCAT
* @cs: One string
* @ct: Another string
*/
+#undef strcmp
int strcmp(const char * cs,const char * ct)
{
register signed char __res;
return __res;
}
+EXPORT_SYMBOL(strcmp);
#endif
#ifndef __HAVE_ARCH_STRNCMP
return __res;
}
+EXPORT_SYMBOL(strncmp);
#endif
#ifndef __HAVE_ARCH_STRCHR
return NULL;
return (char *) s;
}
+EXPORT_SYMBOL(strchr);
#endif
#ifndef __HAVE_ARCH_STRRCHR
} while (--p >= s);
return NULL;
}
+EXPORT_SYMBOL(strrchr);
#endif
#ifndef __HAVE_ARCH_STRNCHR
return (char *) s;
return NULL;
}
+EXPORT_SYMBOL(strnchr);
#endif
#ifndef __HAVE_ARCH_STRLEN
/* nothing */;
return sc - s;
}
+EXPORT_SYMBOL(strlen);
#endif
#ifndef __HAVE_ARCH_STRNLEN
/* nothing */;
return sc - s;
}
+EXPORT_SYMBOL(strnlen);
#endif
#ifndef __HAVE_ARCH_STRSPN
return count;
}
+EXPORT_SYMBOL(strcspn);
#ifndef __HAVE_ARCH_STRPBRK
/**
}
return NULL;
}
+EXPORT_SYMBOL(strpbrk);
#endif
#ifndef __HAVE_ARCH_STRSEP
return s;
}
-#endif
-
-#ifndef __HAVE_ARCH_BCOPY
-/**
- * bcopy - Copy one area of memory to another
- * @srcp: Where to copy from
- * @destp: Where to copy to
- * @count: The size of the area.
- *
- * Note that this is the same as memcpy(), with the arguments reversed.
- * memcpy() is the standard, bcopy() is a legacy BSD function.
- *
- * You should not use this function to access IO space, use memcpy_toio()
- * or memcpy_fromio() instead.
- */
-void bcopy(const void * srcp, void * destp, size_t count)
-{
- const char *src = srcp;
- char *dest = destp;
-
- while (count--)
- *dest++ = *src++;
-}
+EXPORT_SYMBOL(memset);
#endif
#ifndef __HAVE_ARCH_MEMCPY
return dest;
}
+EXPORT_SYMBOL(memcpy);
#endif
#ifndef __HAVE_ARCH_MEMMOVE
return dest;
}
+EXPORT_SYMBOL(memmove);
#endif
#ifndef __HAVE_ARCH_MEMCMP
* @ct: Another area of memory
* @count: The size of the area.
*/
+#undef memcmp
int memcmp(const void * cs,const void * ct,size_t count)
{
const unsigned char *su1, *su2;
break;
return res;
}
+EXPORT_SYMBOL(memcmp);
#endif
#ifndef __HAVE_ARCH_MEMSCAN
}
return (void *) p;
}
+EXPORT_SYMBOL(memscan);
#endif
#ifndef __HAVE_ARCH_STRSTR
}
return NULL;
}
+EXPORT_SYMBOL(strstr);
#endif
#ifndef __HAVE_ARCH_MEMCHR
}
return NULL;
}
-
+EXPORT_SYMBOL(memchr);
#endif