Fix the Windows header mess
Don't include windows.h and wsockcompat.h from config.h but only when
needed.
Don't define _WINSOCKAPI_ manually. This was apparently done to stop
windows.h from including winsock.h which is a problem if winsock2.h
wasn't included first. But on MinGW, this causes compiler warnings.
Define WIN32_LEAN_AND_MEAN instead which has the same effect.
Always use the compiler-defined _WIN32 macro instead of WIN32.
diff --git a/timsort.h b/timsort.h
index 19aebf2..724e066 100644
--- a/timsort.h
+++ b/timsort.h
@@ -24,14 +24,14 @@
#else
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
-#elif defined(WIN32)
+#elif defined(_WIN32)
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#endif
#endif
#ifndef MK_UINT64
-#if defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1300
+#if defined(_MSC_VER) && _MSC_VER < 1300
#define MK_UINT64(x) ((uint64_t)(x))
#else
#define MK_UINT64(x) x##ULL