diff options
author | Spencer Low <CompareAndSwap@gmail.com> | 2015-05-19 22:12:06 -0700 |
---|---|---|
committer | Spencer Low <CompareAndSwap@gmail.com> | 2015-05-20 12:25:19 -0700 |
commit | ac3f7d9a78f9024563cc47f62206c6e3475778dd (patch) | |
tree | 3a6c4c37c047eb9f1d80c68fb19527a15cb684c4 /base/logging.cpp | |
parent | fe5b25132937963c8d9aef532bb0bb53bc0cea1f (diff) | |
download | system_core-ac3f7d9a78f9024563cc47f62206c6e3475778dd.tar.gz system_core-ac3f7d9a78f9024563cc47f62206c6e3475778dd.tar.bz2 system_core-ac3f7d9a78f9024563cc47f62206c6e3475778dd.zip |
adb / libbase: clean up NOGDI and evil ERROR macro
Instead of defining and undefining NOGDI:
1. Always #include "base/logging.h" after #include <windows.h>.
Unfortunately, I could not find an easy way to give the user a
warning/error if they include in the wrong order.
2. base/logging.h does #undef ERROR to undefine the evil ERROR macro
that is from another era and probably a bad idea to begin with.
Change-Id: I995d89620611e849af9d7ec47eb55fc0512377f2
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
Diffstat (limited to 'base/logging.cpp')
-rw-r--r-- | base/logging.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/logging.cpp b/base/logging.cpp index 7a08c39f2..34229a2f8 100644 --- a/base/logging.cpp +++ b/base/logging.cpp @@ -14,6 +14,10 @@ * limitations under the License. */ +#ifdef _WIN32 +#include <windows.h> +#endif + #include "base/logging.h" #include <libgen.h> @@ -34,8 +38,6 @@ #ifndef _WIN32 #include <mutex> -#else -#include <windows.h> #endif #include "base/macros.h" |