diff options
| author | David Woodhouse <dwmw2@infradead.org> | 2007-04-27 19:16:19 +0100 |
|---|---|---|
| committer | David Woodhouse <dwmw2@infradead.org> | 2007-04-27 19:16:19 +0100 |
| commit | d1da4e50e5d09f02c340927a4fcb7f54202fa033 (patch) | |
| tree | 7f98317bdd45dbdb7644e9179891c5af6a3a8ef1 /lib/string.c | |
| parent | 78ab67da1002d954ea4c3e2b441e2483c41f94e8 (diff) | |
| parent | a205752d1ad2d37d6597aaae5a56fc396a770868 (diff) | |
| download | cachepc-linux-d1da4e50e5d09f02c340927a4fcb7f54202fa033.tar.gz cachepc-linux-d1da4e50e5d09f02c340927a4fcb7f54202fa033.zip | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/mtd/Kconfig
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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) EXPORT_SYMBOL(strnicmp); #endif +#ifndef __HAVE_ARCH_STRCASECMP +int strcasecmp(const char *s1, const char *s2) +{ + int c1, c2; + + do { + c1 = tolower(*s1++); + c2 = tolower(*s2++); + } while (c1 == c2 && c1 != 0); + return c1 - c2; +} +EXPORT_SYMBOL(strcasecmp); +#endif + +#ifndef __HAVE_ARCH_STRNCASECMP +int strncasecmp(const char *s1, const char *s2, size_t n) +{ + int c1, c2; + + do { + c1 = tolower(*s1++); + c2 = tolower(*s2++); + } while ((--n > 0) && c1 == c2 && c1 != 0); + return c1 - c2; +} +EXPORT_SYMBOL(strncasecmp); +#endif + #ifndef __HAVE_ARCH_STRCPY /** * strcpy - Copy a %NUL terminated string |
