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_UTIL_STDLIB_CXX_H_ | 15 #ifndef CRASHPAD_UTIL_STDLIB_CXX_H_ |
16 #define CRASHPAD_UTIL_STDLIB_CXX_H_ | 16 #define CRASHPAD_UTIL_STDLIB_CXX_H_ |
17 | 17 |
| 18 #include "build/build_config.h" |
| 19 |
| 20 #if defined(COMPILER_MSVC) |
| 21 |
| 22 #define CXX_LIBRARY_VERSION 2011 |
| 23 |
| 24 #else // !COMPILER_MSVC |
| 25 |
18 // <ciso646> doesn’t do very much, and under libc++, it will cause the | 26 // <ciso646> doesn’t do very much, and under libc++, it will cause the |
19 // _LIBCPP_VERSION macro to be defined properly. Under libstdc++, it doesn’t | 27 // _LIBCPP_VERSION macro to be defined properly. Under libstdc++, it doesn’t |
20 // cause __GLIBCXX__ to be defined, but if _LIBCPP_VERSION isn’t defined after | 28 // cause __GLIBCXX__ to be defined, but if _LIBCPP_VERSION isn’t defined after |
21 // #including <ciso646>, assume libstdc++ and #include libstdc++’s internal | 29 // #including <ciso646>, assume libstdc++ and #include libstdc++’s internal |
22 // header that defines __GLIBCXX__. | 30 // header that defines __GLIBCXX__. |
23 | 31 |
24 #include <ciso646> | 32 #include <ciso646> |
25 | 33 |
26 #if !defined(_LIBCPP_VERSION) | 34 #if !defined(_LIBCPP_VERSION) |
27 #if defined(__has_include) | 35 #if defined(__has_include) |
(...skipping 19 matching lines...) Expand all Loading... |
47 __GLIBCXX__ != 20110416ul && /* GCC 4.4.6 */ \ | 55 __GLIBCXX__ != 20110416ul && /* GCC 4.4.6 */ \ |
48 __GLIBCXX__ != 20120313ul && /* GCC 4.4.7 */ \ | 56 __GLIBCXX__ != 20120313ul && /* GCC 4.4.7 */ \ |
49 __GLIBCXX__ != 20110428ul && /* GCC 4.5.3 */ \ | 57 __GLIBCXX__ != 20110428ul && /* GCC 4.5.3 */ \ |
50 __GLIBCXX__ != 20120702ul) || /* GCC 4.5.4 */ \ | 58 __GLIBCXX__ != 20120702ul) || /* GCC 4.5.4 */ \ |
51 (defined(_LIBCPP_VERSION))) | 59 (defined(_LIBCPP_VERSION))) |
52 #define CXX_LIBRARY_VERSION 2011 | 60 #define CXX_LIBRARY_VERSION 2011 |
53 #else | 61 #else |
54 #define CXX_LIBRARY_VERSION 2003 | 62 #define CXX_LIBRARY_VERSION 2003 |
55 #endif | 63 #endif |
56 | 64 |
| 65 #endif // COMPILER_MSVC |
| 66 |
57 #endif // CRASHPAD_UTIL_STDLIB_CXX_H_ | 67 #endif // CRASHPAD_UTIL_STDLIB_CXX_H_ |
OLD | NEW |