[xml] Patch to guard #define WIN32_LEAN_AND_MEAN



I'm having errors in chromium doing a rollup to the latest code.
https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.win%2Fwin7_chromium_rel_ng%2F39058%2F%2B%2Frecipes%2Fsteps%2Fcompile__with_patch_%2F0%2Fstdout

The error I get is because we already have WIN32_LEAN_AND_MEAN defined.  The attached patch guards the definition.

 #if defined(_WIN32) && !defined(__CYGWIN__)
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #endif

An alternative is:

 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(WIN32_LEAN_AND_MEAN)
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif

Or feel free to use any other solution.

Attachment: 0001-Check-if-WIN32_LEAN_AND_MEAN-is-already-defined.-Hel.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]