OLD | NEW |
---|---|
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #ifndef CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ | 15 #ifndef CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
16 #define CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ | 16 #define CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
17 | 17 |
18 #include <windows.h> | 18 #include <windows.h> |
19 #include <dbghelp.h> | 19 #include <dbghelp.h> |
20 #include <stdint.h> | 20 #include <stdint.h> |
21 #include <winnt.h> | 21 #include <winnt.h> |
22 | 22 |
23 #include "base/compiler_specific.h" | 23 #include "base/compiler_specific.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
25 #include "util/misc/uuid.h" | 25 #include "util/misc/uuid.h" |
26 | 26 |
27 #if defined(COMPILER_MSVC) | |
28 // C4200 is "nonstandard extension used : zero-sized array in struct/union". | 27 // C4200 is "nonstandard extension used : zero-sized array in struct/union". |
29 // We would like to globally disable this warning, but unfortunately, the | 28 // We would like to globally disable this warning, but unfortunately, the |
30 // compiler is buggy and only supports disabling it with a pragma, so we can't | 29 // compiler is buggy and only supports disabling it with a pragma, so we can't |
31 // disable it with other silly warnings in build/common.gypi. See: | 30 // disable it with other silly warnings in build/common.gypi. See: |
32 // https://connect.microsoft.com/VisualStudio/feedback/details/1114440 | 31 // https://connect.microsoft.com/VisualStudio/feedback/details/1114440 |
33 #pragma warning(push) | 32 MSVC_PUSH_DISABLE_WARNING(4200) |
Mark Mentovai
2015/02/05 18:24:10
Semicolons?
scottmg
2015/02/05 18:51:43
I think that would result in a stray semicolon at
| |
34 #pragma warning(disable: 4200) | |
35 #endif // COMPILER_MSVC | |
36 | 33 |
37 #if defined(COMPILER_MSVC) | 34 #if defined(COMPILER_MSVC) |
38 #define PACKED | 35 #define PACKED |
39 #pragma pack(push, 1) | 36 #pragma pack(push, 1) |
40 #else | 37 #else |
41 #define PACKED __attribute__((packed)) | 38 #define PACKED __attribute__((packed)) |
42 #endif // COMPILER_MSVC | 39 #endif // COMPILER_MSVC |
43 | 40 |
44 namespace crashpad { | 41 namespace crashpad { |
45 | 42 |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 //! | 460 //! |
464 //! This field is present when #version is at least `1`. | 461 //! This field is present when #version is at least `1`. |
465 MINIDUMP_LOCATION_DESCRIPTOR module_list; | 462 MINIDUMP_LOCATION_DESCRIPTOR module_list; |
466 }; | 463 }; |
467 | 464 |
468 #if defined(COMPILER_MSVC) | 465 #if defined(COMPILER_MSVC) |
469 #pragma pack(pop) | 466 #pragma pack(pop) |
470 #endif // COMPILER_MSVC | 467 #endif // COMPILER_MSVC |
471 #undef PACKED | 468 #undef PACKED |
472 | 469 |
473 #if defined(COMPILER_MSVC) | 470 MSVC_POP_WARNING() // C4200 |
474 #pragma warning(pop) // C4200 | |
475 #endif // COMPILER_MSVC | |
476 | 471 |
477 } // namespace crashpad | 472 } // namespace crashpad |
478 | 473 |
479 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ | 474 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
OLD | NEW |