Reduce the usage of Windows.h, and add macros to slim Windows.h
diff --git a/lib/cpp/src/thrift/windows/Sync.h b/lib/cpp/src/thrift/windows/Sync.h
index b1c83ee..f5b8a05 100644
--- a/lib/cpp/src/thrift/windows/Sync.h
+++ b/lib/cpp/src/thrift/windows/Sync.h
@@ -27,7 +27,13 @@
#include <thrift/concurrency/Exception.h>
#include <thrift/TNonCopyable.h>
+// Including Windows.h can conflict with Winsock2 usage, and also
+// adds problematic macros like min() and max(). Try to work around:
+#define NOMINMAX
+#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
+#undef NOMINMAX
+#undef WIN32_LEAN_AND_MEAN
/*
Lightweight synchronization objects that only make sense on Windows. For cross-platform