OLD | NEW |
| 1 /* Modified for Chromium to support stlport and libc++ adaptively */ |
1 /* config.h. Generated from config.h.in by configure. */ | 2 /* config.h. Generated from config.h.in by configure. */ |
2 /* config.h.in. Generated from configure.ac by autoheader. */ | 3 /* config.h.in. Generated from configure.ac by autoheader. */ |
3 | 4 |
4 /* the name of <hash_set> */ | 5 /* We want to detect which header files to include for the unordered (hash) |
| 6 collections standardized in C++11 but first introduced as part of TR1. |
| 7 Specifically, we want to avoid including ext/ headers when using libc++ as |
| 8 it will generate noisy build warnings. |
| 9 |
| 10 We take a several-tier approach. First, attempt to use clang's __has_include |
| 11 and test for libc++'s configuration header. If that isn't available, include |
| 12 <new> which will define libc++'s version macro (if using libc++). |
| 13 |
| 14 There are no really good alternative headers that do less work. For example, |
| 15 ciso646 and cstdbool and commonly recommended, but they both have issues. |
| 16 The first has side effects with MSVC, and the second does not exists on Apple |
| 17 platforms (the system libstdc++ is too old). |
| 18 |
| 19 This dynamic check is necessary to allow using this normally dynamically |
| 20 generated header with Chromium's many supported build configurations. It |
| 21 should be expanded to import the right header on other platforms as |
| 22 desired. */ |
| 23 |
| 24 #if defined(__has_include) |
| 25 #if __has_include(<__config>) |
| 26 #include <__config> |
| 27 #else // __has_include(<__config>) |
| 28 #include <new> |
| 29 #endif // __has_include(<__config>) |
| 30 #endif // defined(__has_include) |
| 31 |
| 32 /* the name of <hash_map> */ |
| 33 #if defined(_LIBCPP_VERSION) |
| 34 #define HASH_MAP_CLASS unordered_map |
| 35 #else |
5 #define HASH_MAP_CLASS hash_map | 36 #define HASH_MAP_CLASS hash_map |
| 37 #endif |
6 | 38 |
7 /* the location of <hash_map> */ | 39 /* the location of <unordered_map> or <hash_map> */ |
8 #if defined(USE_STLPORT) | 40 #if defined(USE_STLPORT) |
9 #define HASH_MAP_H <hash_map> | 41 #define HASH_MAP_H <hash_map> |
| 42 #elif defined(_LIBCPP_VERSION) |
| 43 #define HASH_MAP_H <unordered_map> |
10 #else | 44 #else |
11 #define HASH_MAP_H <ext/hash_map> | 45 #define HASH_MAP_H <ext/hash_map> |
12 #endif | 46 #endif |
13 | 47 |
14 /* the namespace of hash_map/hash_set */ | 48 /* the namespace of hash_map/hash_set */ |
15 #if defined(USE_STLPORT) | 49 #if defined(USE_STLPORT) || defined(_LIBCPP_VERSION) |
16 #define HASH_NAMESPACE std | 50 #define HASH_NAMESPACE std |
17 #else | 51 #else |
18 #define HASH_NAMESPACE __gnu_cxx | 52 #define HASH_NAMESPACE __gnu_cxx |
19 #endif | 53 #endif |
20 | 54 |
21 /* the name of <hash_set> */ | 55 /* the name of <hash_set> */ |
| 56 #if defined(_LIBCPP_VERSION) |
| 57 #define HASH_SET_CLASS unordered_set |
| 58 #else |
22 #define HASH_SET_CLASS hash_set | 59 #define HASH_SET_CLASS hash_set |
| 60 #endif |
23 | 61 |
24 /* the location of <hash_set> */ | 62 /* the location of <unordered_set> or <hash_set> */ |
25 #if defined(USE_STLPORT) | 63 #if defined(USE_STLPORT) |
26 #define HASH_SET_H <hash_set> | 64 #define HASH_SET_H <hash_set> |
| 65 #elif defined(_LIBCPP_VERSION) |
| 66 #define HASH_SET_H <unordered_set> |
27 #else | 67 #else |
28 #define HASH_SET_H <ext/hash_set> | 68 #define HASH_SET_H <ext/hash_set> |
29 #endif | 69 #endif |
30 | 70 |
31 /* Define to 1 if you have the <dlfcn.h> header file. */ | 71 /* Define to 1 if you have the <dlfcn.h> header file. */ |
32 #define HAVE_DLFCN_H 1 | 72 #define HAVE_DLFCN_H 1 |
33 | 73 |
34 /* Define to 1 if you have the <fcntl.h> header file. */ | 74 /* Define to 1 if you have the <fcntl.h> header file. */ |
35 #define HAVE_FCNTL_H 1 | 75 #define HAVE_FCNTL_H 1 |
36 | 76 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 /* Enable extensions on Solaris. */ | 187 /* Enable extensions on Solaris. */ |
148 #ifndef __EXTENSIONS__ | 188 #ifndef __EXTENSIONS__ |
149 # define __EXTENSIONS__ 1 | 189 # define __EXTENSIONS__ 1 |
150 #endif | 190 #endif |
151 #ifndef _POSIX_PTHREAD_SEMANTICS | 191 #ifndef _POSIX_PTHREAD_SEMANTICS |
152 # define _POSIX_PTHREAD_SEMANTICS 1 | 192 # define _POSIX_PTHREAD_SEMANTICS 1 |
153 #endif | 193 #endif |
154 #ifndef _TANDEM_SOURCE | 194 #ifndef _TANDEM_SOURCE |
155 # define _TANDEM_SOURCE 1 | 195 # define _TANDEM_SOURCE 1 |
156 #endif | 196 #endif |
OLD | NEW |