diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
commit | bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch) | |
tree | 427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /lib/string.c | |
parent | 3d29cdff999c37b3876082278a8134a0642a02cd (diff) | |
parent | dc87c3985e9b442c60994308a96f887579addc39 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/Makefile
drivers/usb/input/gtco.c
Diffstat (limited to 'lib/string.c')
-rw-r--r-- | lib/string.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/string.c b/lib/string.c index bab440fb0dfc..5efafed3d6b6 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -60,6 +60,34 @@ int strnicmp(const char *s1, const char *s2, size_t len) | |||
60 | EXPORT_SYMBOL(strnicmp); | 60 | EXPORT_SYMBOL(strnicmp); |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #ifndef __HAVE_ARCH_STRCASECMP | ||
64 | int strcasecmp(const char *s1, const char *s2) | ||
65 | { | ||
66 | int c1, c2; | ||
67 | |||
68 | do { | ||
69 | c1 = tolower(*s1++); | ||
70 | c2 = tolower(*s2++); | ||
71 | } while (c1 == c2 && c1 != 0); | ||
72 | return c1 - c2; | ||
73 | } | ||
74 | EXPORT_SYMBOL(strcasecmp); | ||
75 | #endif | ||
76 | |||
77 | #ifndef __HAVE_ARCH_STRNCASECMP | ||
78 | int strncasecmp(const char *s1, const char *s2, size_t n) | ||
79 | { | ||
80 | int c1, c2; | ||
81 | |||
82 | do { | ||
83 | c1 = tolower(*s1++); | ||
84 | c2 = tolower(*s2++); | ||
85 | } while ((--n > 0) && c1 == c2 && c1 != 0); | ||
86 | return c1 - c2; | ||
87 | } | ||
88 | EXPORT_SYMBOL(strncasecmp); | ||
89 | #endif | ||
90 | |||
63 | #ifndef __HAVE_ARCH_STRCPY | 91 | #ifndef __HAVE_ARCH_STRCPY |
64 | /** | 92 | /** |
65 | * strcpy - Copy a %NUL terminated string | 93 | * strcpy - Copy a %NUL terminated string |