[Lldb-commits] [lldb] r214197 - [Windows] Delegate str[n]casecmp to the appropriate MSVCRT func.
Zachary Turner
zturner at google.com
Tue Jul 29 12:08:55 PDT 2014
Author: zturner
Date: Tue Jul 29 14:08:55 2014
New Revision: 214197
URL: http://llvm.org/viewvc/llvm-project?rev=214197&view=rev
Log:
[Windows] Delegate str[n]casecmp to the appropriate MSVCRT func.
Modified:
lldb/trunk/source/Host/windows/Windows.cpp
Modified: lldb/trunk/source/Host/windows/Windows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Windows.cpp?rev=214197&r1=214196&r2=214197&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Windows.cpp (original)
+++ lldb/trunk/source/Host/windows/Windows.cpp Tue Jul 29 14:08:55 2014
@@ -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)
More information about the lldb-commits
mailing list