Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Unified Diff: device/bluetooth/bluetooth_low_energy_defs_win.h

Issue 1233393002: Conditionally disable bthledef.h workaround (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_low_energy_defs_win.h
diff --git a/device/bluetooth/bluetooth_low_energy_defs_win.h b/device/bluetooth/bluetooth_low_energy_defs_win.h
index 77220c74cdaa92bfa012db75725ab1b1cc3c8f8d..bb4e468f8593bdee174b69e4a57832d1d4cd5d3a 100644
--- a/device/bluetooth/bluetooth_low_energy_defs_win.h
+++ b/device/bluetooth/bluetooth_low_energy_defs_win.h
@@ -8,10 +8,16 @@
#include <windows.h>
#include <cfg.h>
#include <devpkey.h>
+#include <ntverp.h> // For VER_PRODUCTBUILD
#include <setupapi.h>
+#if VER_PRODUCTBUILD > 9600
+// bthledef.h is fixed in the Windows 10 SDK and the extra pop then triggers a
+// warning, so we skip it when VER_PRODUCTBUILD is > 9600 (8.1 SDK)
+#include <bthledef.h>
+#else
#pragma warning(push)
-// bthledef.h is buggy and contains
+// bthledef.h in the Windows 8.1 SDK is buggy and contains
// #pragma pop
// which should be
// #pragma warning(pop)
@@ -21,6 +27,7 @@
#include <bthledef.h>
#pragma warning(pop)
#pragma warning(pop)
+#endif
#include <bluetoothapis.h>
#include <bluetoothleapis.h>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698