Fix compilation errors when attempting to compile Folly without WIN32_LEAN_AND_MEAN...
authorChristopher Dykes <cdykes@fb.com>
Thu, 4 Aug 2016 22:49:36 +0000 (15:49 -0700)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Thu, 4 Aug 2016 22:54:26 +0000 (15:54 -0700)
Summary: Without `WIN32_LEAN_AND_MEAN` defined, including `Windows.h` includes a massive number of extra headers. There are situations that need things that are defined in those headers, so keep folly working even when it isn't defined.

Reviewed By: yfeldblum

Differential Revision: D3671350

fbshipit-source-id: 0de986e17cdd4be386be8a9eeb0075b4af44024d

folly/portability/SysTime.h
folly/portability/Windows.h

index 162ff21ac132b82e7ecd918a6faeebdde1fa8f8b..a2c32e31317eb3be1b4aca23d47850da891bd0fd 100755 (executable)
@@ -20,7 +20,7 @@
 #include <sys/time.h>
 #else
 // Someone decided this was a good place to define timeval.....
-#include <WinSock2.h>
+#include <folly/portability/Windows.h>
 struct timezone {
   int tz_minuteswest;
   int tz_dsttime;
index 3b4885864d03ae99fdc0f5efb04061e94be10535..70b5254138f7e7523c07c8f8597d3e3c9263dea5 100755 (executable)
@@ -37,8 +37,8 @@
 #include <direct.h> // nolint
 #endif
 
-#include <Windows.h>
 #include <WinSock2.h>
+#include <Windows.h>
 
 #ifdef CAL_GREGORIAN
 #undef CAL_GREGORIAN