[PATCH] msvc: Directly use MS version (_stricmp) of strcasecmp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This also removes an implicit conversion from size_t (unsigned) to int (signed).

_stricmp as well as _strnicmp are both available since VS2012.

Signed-off-by: Sven Strickroth <email@xxxxxxxxxx>
---
 compat/msvc.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/compat/msvc.h b/compat/msvc.h
index 580bb55bf4..ea6527f8b6 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -14,13 +14,7 @@
 #define ftruncate    _chsize
 #define strtoull     _strtoui64
 #define strtoll      _strtoi64
-
-static __inline int strcasecmp (const char *s1, const char *s2)
-{
-       int size1 = strlen(s1);
-       int sisz2 = strlen(s2);
-       return _strnicmp(s1, s2, sisz2 > size1 ? sisz2 : size1);
-}
+#define strcasecmp   _stricmp

 #undef ERROR

--
2.19.1.windows.1



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux