Cygwin's ctype.h says;
/* These macros are intentionally written in a manner that will trigger
a gcc -Wall warning if the user mistakenly passes a 'char' instead
of an int containing an 'unsigned char'.
(snip) */
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127308
91177308-0d34-0410-b5e6-
96231b3b80d8
int my_stricmp(const char *s1, const char *s2) {
while (*s1 && *s2) {
- int c1 = tolower(*s1), c2 = tolower(*s2);
+ int c1 = tolower((unsigned char)*s1), c2 = tolower((unsigned char)*s2);
if (c1 < c2)
return -1;
else if (c1 > c2)