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) | 27 #if defined(COMPILER_MSVC) |
| 28 // C4200 is "nonstandard extension used : zero-sized array in struct/union". |
| 29 // 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 |
| 31 // disable it with other silly warnings in build/common.gypi. See: |
| 32 // https://connect.microsoft.com/VisualStudio/feedback/details/1114440 |
| 33 #pragma warning(push) |
| 34 #pragma warning(disable: 4200) |
| 35 #endif // COMPILER_MSVC |
| 36 |
| 37 #if defined(COMPILER_MSVC) |
28 #define PACKED | 38 #define PACKED |
29 #pragma pack(push, 1) | 39 #pragma pack(push, 1) |
30 #else | 40 #else |
31 #define PACKED __attribute__((packed)) | 41 #define PACKED __attribute__((packed)) |
32 #endif // COMPILER_MSVC | 42 #endif // COMPILER_MSVC |
33 | 43 |
34 namespace crashpad { | 44 namespace crashpad { |
35 | 45 |
36 //! \brief Minidump stream type values for MINIDUMP_DIRECTORY::StreamType. Each | 46 //! \brief Minidump stream type values for MINIDUMP_DIRECTORY::StreamType. Each |
37 //! stream structure has a corresponding stream type value to identify it. | 47 //! stream structure has a corresponding stream type value to identify it. |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 //! | 463 //! |
454 //! This field is present when #version is at least `1`. | 464 //! This field is present when #version is at least `1`. |
455 MINIDUMP_LOCATION_DESCRIPTOR module_list; | 465 MINIDUMP_LOCATION_DESCRIPTOR module_list; |
456 }; | 466 }; |
457 | 467 |
458 #if defined(COMPILER_MSVC) | 468 #if defined(COMPILER_MSVC) |
459 #pragma pack(pop) | 469 #pragma pack(pop) |
460 #endif // COMPILER_MSVC | 470 #endif // COMPILER_MSVC |
461 #undef PACKED | 471 #undef PACKED |
462 | 472 |
| 473 #if defined(COMPILER_MSVC) |
| 474 #pragma warning(pop) // C4200 |
| 475 #endif // COMPILER_MSVC |
| 476 |
463 } // namespace crashpad | 477 } // namespace crashpad |
464 | 478 |
465 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ | 479 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
OLD | NEW |