Avoid to unconditionally include rtc_base/win32.h.
This CL adds #error to spot where rtc_base/win32.h is unconditionally
included and fixes all the places where it happens.
Bug: webrtc:8814
Change-Id: I3c005acf2cdb58a51f1bcaa4acaeebd272c56660
Reviewed-on: https://webrtc-review.googlesource.com/46060
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21840}
diff --git a/rtc_base/win32.h b/rtc_base/win32.h
index 0cbc412..78f66a7 100644
--- a/rtc_base/win32.h
+++ b/rtc_base/win32.h
@@ -11,7 +11,9 @@
#ifndef RTC_BASE_WIN32_H_
#define RTC_BASE_WIN32_H_
-#if defined(WEBRTC_WIN)
+#ifndef WEBRTC_WIN
+#error "Only #include this header in Windows builds"
+#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
@@ -83,5 +85,4 @@
} // namespace rtc
-#endif // WEBRTC_WIN
#endif // RTC_BASE_WIN32_H_