summaryrefslogtreecommitdiffstats
path: root/firmware/common
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2011-12-04 21:07:06 +0000
committerRafaël Carré <rafael.carre@gmail.com>2011-12-04 21:07:06 +0000
commit09f6556e223cc9ac851304117bf1dfaf9b5582f3 (patch)
treeee0e5a194d74c350ad653ec938718e6212fade87 /firmware/common
parent280d9074abc7dd6d572da06700d6684e64e1961e (diff)
downloadrockbox-09f6556e223cc9ac851304117bf1dfaf9b5582f3.tar.gz
rockbox-09f6556e223cc9ac851304117bf1dfaf9b5582f3.zip
Compile fix for mingw-w64
Don't build str(n)casecmp as functions if they are already defined by preprocessor git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31147 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/strcasecmp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/common/strcasecmp.c b/firmware/common/strcasecmp.c
index b9dd6c13c4..cdfbe2f81a 100644
--- a/firmware/common/strcasecmp.c
+++ b/firmware/common/strcasecmp.c
@@ -2,6 +2,7 @@
#include <string.h>
#include <ctype.h>
+#ifndef strcasecmp
int strcasecmp(const char *s1, const char *s2)
{
while (*s1 != '\0' && tolower(*s1) == tolower(*s2)) {
@@ -11,7 +12,9 @@ int strcasecmp(const char *s1, const char *s2)
return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
}
+#endif
+#ifndef strncasecmp
int strncasecmp(const char *s1, const char *s2, size_t n)
{
int d = 0;
@@ -26,3 +29,4 @@ int strncasecmp(const char *s1, const char *s2, size_t n)
return d;
}
+#endif