Loading adb/Android.mk +0 −6 Original line number Diff line number Diff line Loading @@ -96,9 +96,6 @@ LOCAL_STATIC_LIBRARIES := libcrypto_static ifeq ($(HOST_OS),windows) LOCAL_C_INCLUDES += development/host/windows/usb/api/ # Windows.h defines an awful ERROR macro that collides with base/logging.h. # Suppress it with NOGDI. LOCAL_CFLAGS += -DNOGDI endif include $(BUILD_HOST_STATIC_LIBRARY) Loading Loading @@ -165,9 +162,6 @@ ifeq ($(HOST_OS),darwin) endif ifeq ($(HOST_OS),windows) # Windows.h defines an awful ERROR macro that collides with base/logging.h. # Suppress it with NOGDI. LOCAL_CFLAGS += -DNOGDI LOCAL_LDLIBS += -lws2_32 -lgdi32 EXTRA_STATIC_LIBS := AdbWinApi endif Loading adb/adb_auth_host.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -16,11 +16,6 @@ #define TRACE_TAG TRACE_AUTH #ifdef _WIN32 // This blocks some definitions we need on Windows. #undef NOGDI #endif #include "sysdeps.h" #include "adb_auth.h" Loading adb/sysdeps_win32.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ #define TRACE_TAG TRACE_SYSDEPS // For whatever reason this blocks the definition of ToAscii... #undef NOGDI #include "sysdeps.h" #include <winsock2.h> /* winsock.h *must* be included before windows.h. */ Loading base/include/base/logging.h +5 −8 Original line number Diff line number Diff line Loading @@ -13,18 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ #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 // NOTE: For Windows, you must include logging.h after windows.h to allow the // following code to suppress the evil ERROR macro: #ifdef _WIN32 #ifndef NOGDI #define NOGDI // Suppress the evil ERROR macro. // windows.h includes wingdi.h which defines an evil macro ERROR. #ifdef ERROR #undef ERROR #endif #endif Loading base/logging.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ * limitations under the License. */ #ifdef _WIN32 #include <windows.h> #endif #include "base/logging.h" #include <libgen.h> Loading @@ -34,8 +38,6 @@ #ifndef _WIN32 #include <mutex> #else #include <windows.h> #endif #include "base/macros.h" Loading Loading
adb/Android.mk +0 −6 Original line number Diff line number Diff line Loading @@ -96,9 +96,6 @@ LOCAL_STATIC_LIBRARIES := libcrypto_static ifeq ($(HOST_OS),windows) LOCAL_C_INCLUDES += development/host/windows/usb/api/ # Windows.h defines an awful ERROR macro that collides with base/logging.h. # Suppress it with NOGDI. LOCAL_CFLAGS += -DNOGDI endif include $(BUILD_HOST_STATIC_LIBRARY) Loading Loading @@ -165,9 +162,6 @@ ifeq ($(HOST_OS),darwin) endif ifeq ($(HOST_OS),windows) # Windows.h defines an awful ERROR macro that collides with base/logging.h. # Suppress it with NOGDI. LOCAL_CFLAGS += -DNOGDI LOCAL_LDLIBS += -lws2_32 -lgdi32 EXTRA_STATIC_LIBS := AdbWinApi endif Loading
adb/adb_auth_host.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -16,11 +16,6 @@ #define TRACE_TAG TRACE_AUTH #ifdef _WIN32 // This blocks some definitions we need on Windows. #undef NOGDI #endif #include "sysdeps.h" #include "adb_auth.h" Loading
adb/sysdeps_win32.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ #define TRACE_TAG TRACE_SYSDEPS // For whatever reason this blocks the definition of ToAscii... #undef NOGDI #include "sysdeps.h" #include <winsock2.h> /* winsock.h *must* be included before windows.h. */ Loading
base/include/base/logging.h +5 −8 Original line number Diff line number Diff line Loading @@ -13,18 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ #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 // NOTE: For Windows, you must include logging.h after windows.h to allow the // following code to suppress the evil ERROR macro: #ifdef _WIN32 #ifndef NOGDI #define NOGDI // Suppress the evil ERROR macro. // windows.h includes wingdi.h which defines an evil macro ERROR. #ifdef ERROR #undef ERROR #endif #endif Loading
base/logging.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ * limitations under the License. */ #ifdef _WIN32 #include <windows.h> #endif #include "base/logging.h" #include <libgen.h> Loading @@ -34,8 +38,6 @@ #ifndef _WIN32 #include <mutex> #else #include <windows.h> #endif #include "base/macros.h" Loading