forked from OSchip/llvm-project
[Windows] Delegate str[n]casecmp to the appropriate MSVCRT func.
llvm-svn: 214197
This commit is contained in:
parent
b1ccf5623b
commit
12f6f53618
|
@ -176,29 +176,12 @@ char *dirname(char *path)
|
|||
|
||||
int strcasecmp(const char* s1, const char* s2)
|
||||
{
|
||||
while (*s1 != '\0' && tolower(*s1) == tolower(*s2))
|
||||
{
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
|
||||
return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
|
||||
return stricmp(s1, s2);
|
||||
}
|
||||
|
||||
int strncasecmp(const char* s1, const char* s2, size_t n)
|
||||
{
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
||||
while (n-- != 0 && tolower(*s1) == tolower(*s2))
|
||||
{
|
||||
if (n == 0 || *s1 == '\0' || *s2 == '\0')
|
||||
break;
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
|
||||
return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2);
|
||||
return strnicmp(s1, s2, n);
|
||||
}
|
||||
|
||||
int usleep(uint32_t useconds)
|
||||
|
|
Loading…
Reference in New Issue