diff options
Diffstat (limited to '')
-rw-r--r-- | util/strgutil.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/util/strgutil.c b/util/strgutil.c index d19ba6e54..809b0c3f2 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -92,17 +92,6 @@ strlist_last( STRLIST node ) - -int -memicmp( const char *a, const char *b, size_t n ) -{ - for( ; n; n--, a++, b++ ) - if( *a != *b && toupper(*(const byte*)a) != toupper(*(const byte*)b) ) - return *(const byte *)a - *(const byte*)b; - return 0; -} - - /**************** * look for the substring SUB in buffer and return a pointer to that * substring in BUF or NULL if not found. @@ -217,3 +206,18 @@ strlwr(char *s) } #endif +/**************** + * mingw32/cpd has a memicmp() + */ +#ifndef HAVE_MEMICMP +int +memicmp( const char *a, const char *b, size_t n ) +{ + for( ; n; n--, a++, b++ ) + if( *a != *b && toupper(*(const byte*)a) != toupper(*(const byte*)b) ) + return *(const byte *)a - *(const byte*)b; + return 0; +} +#endif + + |