From 09f6556e223cc9ac851304117bf1dfaf9b5582f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sun, 4 Dec 2011 21:07:06 +0000 Subject: [PATCH] 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 --- firmware/common/strcasecmp.c | 4 ++++ 1 file changed, 4 insertions(+) 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 #include +#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