Commit 8833d328 authored by Kyle McMartin's avatar Kyle McMartin Committed by Linus Torvalds

[PATCH] Clean up arch-overrides in linux/string.h

Some string functions were safely overrideable in lib/string.c, but their
corresponding declarations in linux/string.h were not.  Correct this, and
make strcspn overrideable.

Odds of someone wanting to do optimized assembly of these are small, but
for the sake of cleanliness, might as well bring them into line with the
rest of the file.
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 894b5779
...@@ -13,11 +13,6 @@ ...@@ -13,11 +13,6 @@
extern "C" { extern "C" {
#endif #endif
extern char * strpbrk(const char *,const char *);
extern char * strsep(char **,const char *);
extern __kernel_size_t strspn(const char *,const char *);
extern __kernel_size_t strcspn(const char *,const char *);
extern char *strndup_user(const char __user *, long); extern char *strndup_user(const char __user *, long);
/* /*
...@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *); ...@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *);
#ifndef __HAVE_ARCH_STRNLEN #ifndef __HAVE_ARCH_STRNLEN
extern __kernel_size_t strnlen(const char *,__kernel_size_t); extern __kernel_size_t strnlen(const char *,__kernel_size_t);
#endif #endif
#ifndef __HAVE_ARCH_STRPBRK
extern char * strpbrk(const char *,const char *);
#endif
#ifndef __HAVE_ARCH_STRSEP
extern char * strsep(char **,const char *);
#endif
#ifndef __HAVE_ARCH_STRSPN
extern __kernel_size_t strspn(const char *,const char *);
#endif
#ifndef __HAVE_ARCH_STRCSPN
extern __kernel_size_t strcspn(const char *,const char *);
#endif
#ifndef __HAVE_ARCH_MEMSET #ifndef __HAVE_ARCH_MEMSET
extern void * memset(void *,int,__kernel_size_t); extern void * memset(void *,int,__kernel_size_t);
......
...@@ -362,6 +362,7 @@ size_t strspn(const char *s, const char *accept) ...@@ -362,6 +362,7 @@ size_t strspn(const char *s, const char *accept)
EXPORT_SYMBOL(strspn); EXPORT_SYMBOL(strspn);
#endif #endif
#ifndef __HAVE_ARCH_STRCSPN
/** /**
* strcspn - Calculate the length of the initial substring of @s which does * strcspn - Calculate the length of the initial substring of @s which does
* not contain letters in @reject * not contain letters in @reject
...@@ -384,6 +385,7 @@ size_t strcspn(const char *s, const char *reject) ...@@ -384,6 +385,7 @@ size_t strcspn(const char *s, const char *reject)
return count; return count;
} }
EXPORT_SYMBOL(strcspn); EXPORT_SYMBOL(strcspn);
#endif
#ifndef __HAVE_ARCH_STRPBRK #ifndef __HAVE_ARCH_STRPBRK
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment