OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEFS_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEFS_WIN_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEFS_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEFS_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <cfg.h> | 9 #include <cfg.h> |
10 #include <devpkey.h> | 10 #include <devpkey.h> |
| 11 #include <ntverp.h> // For VER_PRODUCTBUILD |
11 #include <setupapi.h> | 12 #include <setupapi.h> |
12 | 13 |
| 14 #if VER_PRODUCTBUILD > 9600 |
| 15 // bthledef.h is fixed in the Windows 10 SDK and the extra pop then triggers a |
| 16 // warning, so we skip it when VER_PRODUCTBUILD is > 9600 (8.1 SDK) |
| 17 #include <bthledef.h> |
| 18 #else |
13 #pragma warning(push) | 19 #pragma warning(push) |
14 // bthledef.h is buggy and contains | 20 // bthledef.h in the Windows 8.1 SDK is buggy and contains |
15 // #pragma pop | 21 // #pragma pop |
16 // which should be | 22 // which should be |
17 // #pragma warning(pop) | 23 // #pragma warning(pop) |
18 // So, we disable the "unknown pragma" warning, then actually pop, and then pop | 24 // So, we disable the "unknown pragma" warning, then actually pop, and then pop |
19 // our disabling of 4068. | 25 // our disabling of 4068. |
20 #pragma warning(disable: 4068) | 26 #pragma warning(disable: 4068) |
21 #include <bthledef.h> | 27 #include <bthledef.h> |
22 #pragma warning(pop) | 28 #pragma warning(pop) |
23 #pragma warning(pop) | 29 #pragma warning(pop) |
| 30 #endif |
24 | 31 |
25 #include <bluetoothapis.h> | 32 #include <bluetoothapis.h> |
26 #include <bluetoothleapis.h> | 33 #include <bluetoothleapis.h> |
27 | 34 |
28 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEFS_WIN_H_ | 35 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEFS_WIN_H_ |
OLD | NEW |