summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-12-05 14:46:35 +0000
committerTom Rini <trini@ti.com>2012-12-11 13:17:34 -0700
commitb1f17bf5ff63a7e22e0299dd576c3b6cd38ae665 (patch)
treef96ee90f06bef6e031832cded766631486a88e76 /include
parentec7381fbf6f77cc465eb06a1ab6f8a99df1e487c (diff)
downloadu-boot-imx-b1f17bf5ff63a7e22e0299dd576c3b6cd38ae665.zip
u-boot-imx-b1f17bf5ff63a7e22e0299dd576c3b6cd38ae665.tar.gz
u-boot-imx-b1f17bf5ff63a7e22e0299dd576c3b6cd38ae665.tar.bz2
Add strcasecmp() and strncasecmp()
strncasecmp() is present as strnicmp() but disabled. Make it available and define strcasecmp() also. There is a only a small performance penalty to having strcasecmp() call strncasecmp(), so do this instead of a standalone function, to save code space. Update the prototype in arch-specific headers as needed to avoid warnings. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/string.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 9a8cbc2..de83355 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -38,8 +38,11 @@ extern int strcmp(const char *,const char *);
#ifndef __HAVE_ARCH_STRNCMP
extern int strncmp(const char *,const char *,__kernel_size_t);
#endif
-#if 0 /* not used - was: #ifndef __HAVE_ARCH_STRNICMP */
-extern int strnicmp(const char *, const char *, __kernel_size_t);
+#ifndef __HAVE_ARCH_STRCASECMP
+int strcasecmp(const char *s1, const char *s2);
+#endif
+#ifndef __HAVE_ARCH_STRNCASECMP
+extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
#endif
#ifndef __HAVE_ARCH_STRCHR
extern char * strchr(const char *,int);