1 #ifdef HAVE_CONFIG_H
2 #include "../include/config.h"
3 #endif
4 
5 #if !defined(HAVE_STRCASECMP)
6 
7 typedef unsigned char u_char;
8 
9 int
strcasecmp(s1,s2)10 strcasecmp(s1, s2)
11 	        const char *s1, *s2;
12 {
13 	register const u_char
14 	*us1 = (const u_char *)s1,
15 	*us2 = (const u_char *)s2;
16 
17 	while (tolower(*us1) == tolower(*us2++))
18 		if (*us1++ == '\0')
19 			return (0);
20 	return (tolower(*us1) - tolower(*--us2));
21 }
22 
23 #endif /* !defined(HAVE_STRCASECMP) */
24