Those two #ifdefs were wrong on my setup (straightforward RosBE 3.4.2, and also updat...
[reactos.git] / reactos / lib / libwine / string.c
1 #include <ctype.h>
2 #include "wine/config.h"
3 #include "wine/port.h"
4
5 #ifndef HAVE_STRCASECMP
6
7 #ifdef strcasecmp
8 # undef strcasecmp
9 #endif
10
11 int strcasecmp( const char *str1, const char *str2 )
12 {
13 const unsigned char *ustr1 = (const unsigned char *)str1;
14 const unsigned char *ustr2 = (const unsigned char *)str2;
15
16 while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) {
17 ustr1++;
18 ustr2++;
19 }
20 return toupper(*ustr1) - toupper(*ustr2);
21 }
22 #endif