msvc: directly use MS version (_stricmp) of strcasecmp

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@cs-ware.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sven Strickroth committed Nov 19, 2018 at 16:14 UTC d27525e519310b515b3014cef5920f80930a20ce
1 file changed +1 -7
compat/msvc.h
+1 -7
@@ -10,18 +10,12 @@
10 #define inline __inline
11 #define __inline__ __inline
12 #define __attribute__(x)
13 +#define strcasecmp _stricmp
14 #define strncasecmp _strnicmp
15 #define ftruncate _chsize
16 #define strtoull _strtoui64
17 #define strtoll _strtoi64
18
18 -static __inline int strcasecmp (const char *s1, const char *s2)
19 -{
20 - int size1 = strlen(s1);
21 - int sisz2 = strlen(s2);
22 - return _strnicmp(s1, s2, sisz2 > size1 ? sisz2 : size1);
23 -}
24 -
19 #undef ERROR
20
21 #include "compat/mingw.h"