aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2006-04-11 01:53:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:40 -0400
commit8833d328caf009f8da58337e17a2cf5d52993a7c (patch)
treedc12f9c94f28ad0fb41ea6c4ebe6a0ae31c36ad1
parent894b5779ceeabdce139068310e58bcf51ed9bb22 (diff)
[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: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/string.h17
-rw-r--r--lib/string.c2
2 files changed, 14 insertions, 5 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index dee221429ad0..c61306da8c52 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -13,11 +13,6 @@
13extern "C" { 13extern "C" {
14#endif 14#endif
15 15
16extern char * strpbrk(const char *,const char *);
17extern char * strsep(char **,const char *);
18extern __kernel_size_t strspn(const char *,const char *);
19extern __kernel_size_t strcspn(const char *,const char *);
20
21extern char *strndup_user(const char __user *, long); 16extern char *strndup_user(const char __user *, long);
22 17
23/* 18/*
@@ -70,6 +65,18 @@ extern __kernel_size_t strlen(const char *);
70#ifndef __HAVE_ARCH_STRNLEN 65#ifndef __HAVE_ARCH_STRNLEN
71extern __kernel_size_t strnlen(const char *,__kernel_size_t); 66extern __kernel_size_t strnlen(const char *,__kernel_size_t);
72#endif 67#endif
68#ifndef __HAVE_ARCH_STRPBRK
69extern char * strpbrk(const char *,const char *);
70#endif
71#ifndef __HAVE_ARCH_STRSEP
72extern char * strsep(char **,const char *);
73#endif
74#ifndef __HAVE_ARCH_STRSPN
75extern __kernel_size_t strspn(const char *,const char *);
76#endif
77#ifndef __HAVE_ARCH_STRCSPN
78extern __kernel_size_t strcspn(const char *,const char *);
79#endif
73 80
74#ifndef __HAVE_ARCH_MEMSET 81#ifndef __HAVE_ARCH_MEMSET
75extern void * memset(void *,int,__kernel_size_t); 82extern void * memset(void *,int,__kernel_size_t);
diff --git a/lib/string.c b/lib/string.c
index 037a48acedbb..7be6f0a87e83 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -362,6 +362,7 @@ size_t strspn(const char *s, const char *accept)
362EXPORT_SYMBOL(strspn); 362EXPORT_SYMBOL(strspn);
363#endif 363#endif
364 364
365#ifndef __HAVE_ARCH_STRCSPN
365/** 366/**
366 * strcspn - Calculate the length of the initial substring of @s which does 367 * strcspn - Calculate the length of the initial substring of @s which does
367 * not contain letters in @reject 368 * not contain letters in @reject
@@ -384,6 +385,7 @@ size_t strcspn(const char *s, const char *reject)
384 return count; 385 return count;
385} 386}
386EXPORT_SYMBOL(strcspn); 387EXPORT_SYMBOL(strcspn);
388#endif
387 389
388#ifndef __HAVE_ARCH_STRPBRK 390#ifndef __HAVE_ARCH_STRPBRK
389/** 391/**