am 8b9170b8: Merge "Add additional shielding against the ERROR macro."

* commit '8b9170b83b14a500222fdf525276cb0bc42c531d':
  Add additional shielding against the ERROR macro.
diff --git a/base/include/base/logging.h b/base/include/base/logging.h
index 230adb8..84ec538 100644
--- a/base/include/base/logging.h
+++ b/base/include/base/logging.h
@@ -17,6 +17,15 @@
 #ifndef BASE_LOGGING_H
 #define BASE_LOGGING_H
 
+#ifdef ERROR
+#error ERROR is already defined. If this is Windows code, #define NOGDI before \
+including anything.
+#endif
+
+#ifdef _WIN32
+#define NOGDI // Suppress the evil ERROR macro.
+#endif
+
 #include <functional>
 #include <memory>
 #include <ostream>
diff --git a/base/logging.cpp b/base/logging.cpp
index 83957b3..7a08c39 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -35,7 +35,6 @@
 #ifndef _WIN32
 #include <mutex>
 #else
-#define NOGDI // Suppress the evil ERROR macro.
 #include <windows.h>
 #endif