aboutsummaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/strgutil.c b/util/strgutil.c
index 9ab63a047..861bf0d6b 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -559,6 +559,18 @@ strlwr(char *s)
}
#endif
+#ifndef HAVE_STRCASECMP
+int
+strcasecmp( const char *a, const char *b )
+{
+ for( ; *a && *b; a++, b++ ) {
+ if( *a != *b && toupper(*a) != toupper(*b) )
+ break;
+ }
+ return *(const byte*)a - *(const byte*)b;
+}
+#endif
+
/****************
* mingw32/cpd has a memicmp()
*/