From 85fee2565364cb31b72252a07538c97a52e48ca7 Mon Sep 17 00:00:00 2001 From: Marcus Geelnard Date: Wed, 8 May 2019 14:59:06 +0200 Subject: MinGW fix: Use _MSC_VER instead of _WIN32 where appropriate Use _MSC_VER (instead of _WIN32) for things that are specific for Visual Studio. Also remove #include from hiredis.h, as it leaks too many symbols and defines into the global namespace, which is undesirable for a public interface header. Anyone who uses the the affected parts of the hiredis API needs to include the appropriate headers anyway in order to declare struct timeval variables. --- win32.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'win32.h') diff --git a/win32.h b/win32.h index 7cb5706..04289c6 100644 --- a/win32.h +++ b/win32.h @@ -2,10 +2,20 @@ #define _WIN32_HELPER_INCLUDE #ifdef _MSC_VER +#include /* for struct timeval */ + #ifndef inline #define inline __inline #endif +#ifndef strcasecmp +#define strcasecmp stricmp +#endif + +#ifndef strncasecmp +#define strncasecmp strnicmp +#endif + #ifndef va_copy #define va_copy(d,s) ((d) = (s)) #endif -- cgit v1.2.3