Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===--------------------------- __config ---------------------------------===// |
| 3 | // |
Howard Hinnant | c566dc3 | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 4 | // The LLVM Compiler Infrastructure |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 5 | // |
Howard Hinnant | ee11c31 | 2010-11-16 22:09:02 +0000 | [diff] [blame] | 6 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | #ifndef _LIBCPP_CONFIG |
| 12 | #define _LIBCPP_CONFIG |
| 13 | |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 14 | #if !defined(_MSC_VER) || defined(__clang__) |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 15 | #pragma GCC system_header |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 16 | #endif |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 17 | |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 18 | #ifdef __GNUC__ |
| 19 | #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) |
Eric Fiselier | 7d22317 | 2015-06-13 02:18:44 +0000 | [diff] [blame] | 20 | #else |
| 21 | #define _GNUC_VER 0 |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 22 | #endif |
| 23 | |
Marshall Clow | 955443b | 2015-07-17 16:36:44 +0000 | [diff] [blame] | 24 | #define _LIBCPP_VERSION 3800 |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 25 | |
| 26 | #define _LIBCPP_ABI_VERSION 1 |
| 27 | |
| 28 | #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y |
| 29 | #define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) |
| 30 | |
| 31 | #define _LIBCPP_NAMESPACE _LIBCPP_CONCAT(__,_LIBCPP_ABI_VERSION) |
| 32 | |
Eric Fiselier | 86fcc92 | 2015-07-10 20:26:38 +0000 | [diff] [blame] | 33 | |
| 34 | #ifndef __has_attribute |
| 35 | #define __has_attribute(__x) 0 |
| 36 | #endif |
| 37 | #ifndef __has_builtin |
| 38 | #define __has_builtin(__x) 0 |
| 39 | #endif |
| 40 | #ifndef __has_feature |
| 41 | #define __has_feature(__x) 0 |
| 42 | #endif |
| 43 | // '__is_identifier' returns '0' if '__x' is a reserved identifier provided by |
| 44 | // the compiler and '1' otherwise. |
| 45 | #ifndef __is_identifier |
| 46 | #define __is_identifier(__x) 1 |
| 47 | #endif |
| 48 | |
| 49 | |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 50 | #ifdef __LITTLE_ENDIAN__ |
| 51 | #if __LITTLE_ENDIAN__ |
| 52 | #define _LIBCPP_LITTLE_ENDIAN 1 |
| 53 | #define _LIBCPP_BIG_ENDIAN 0 |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 54 | #endif // __LITTLE_ENDIAN__ |
| 55 | #endif // __LITTLE_ENDIAN__ |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 56 | |
| 57 | #ifdef __BIG_ENDIAN__ |
| 58 | #if __BIG_ENDIAN__ |
| 59 | #define _LIBCPP_LITTLE_ENDIAN 0 |
| 60 | #define _LIBCPP_BIG_ENDIAN 1 |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 61 | #endif // __BIG_ENDIAN__ |
| 62 | #endif // __BIG_ENDIAN__ |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 63 | |
David Chisnall | 93008f0 | 2010-08-11 16:27:20 +0000 | [diff] [blame] | 64 | #ifdef __FreeBSD__ |
| 65 | # include <sys/endian.h> |
| 66 | # if _BYTE_ORDER == _LITTLE_ENDIAN |
| 67 | # define _LIBCPP_LITTLE_ENDIAN 1 |
| 68 | # define _LIBCPP_BIG_ENDIAN 0 |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 69 | # else // _BYTE_ORDER == _LITTLE_ENDIAN |
David Chisnall | 93008f0 | 2010-08-11 16:27:20 +0000 | [diff] [blame] | 70 | # define _LIBCPP_LITTLE_ENDIAN 0 |
| 71 | # define _LIBCPP_BIG_ENDIAN 1 |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 72 | # endif // _BYTE_ORDER == _LITTLE_ENDIAN |
Howard Hinnant | 1383035 | 2012-11-26 21:18:17 +0000 | [diff] [blame] | 73 | # ifndef __LONG_LONG_SUPPORTED |
| 74 | # define _LIBCPP_HAS_NO_LONG_LONG |
| 75 | # endif // __LONG_LONG_SUPPORTED |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 76 | #endif // __FreeBSD__ |
David Chisnall | 93008f0 | 2010-08-11 16:27:20 +0000 | [diff] [blame] | 77 | |
Joerg Sonnenberger | 153e416 | 2013-05-17 21:17:34 +0000 | [diff] [blame] | 78 | #ifdef __NetBSD__ |
| 79 | # include <sys/endian.h> |
| 80 | # if _BYTE_ORDER == _LITTLE_ENDIAN |
| 81 | # define _LIBCPP_LITTLE_ENDIAN 1 |
| 82 | # define _LIBCPP_BIG_ENDIAN 0 |
| 83 | # else // _BYTE_ORDER == _LITTLE_ENDIAN |
| 84 | # define _LIBCPP_LITTLE_ENDIAN 0 |
| 85 | # define _LIBCPP_BIG_ENDIAN 1 |
| 86 | # endif // _BYTE_ORDER == _LITTLE_ENDIAN |
| 87 | # define _LIBCPP_HAS_QUICK_EXIT |
| 88 | #endif // __NetBSD__ |
| 89 | |
Howard Hinnant | 34bad2a | 2011-05-13 17:16:06 +0000 | [diff] [blame] | 90 | #ifdef _WIN32 |
| 91 | # define _LIBCPP_LITTLE_ENDIAN 1 |
| 92 | # define _LIBCPP_BIG_ENDIAN 0 |
Eric Fiselier | f739430 | 2015-06-13 07:08:02 +0000 | [diff] [blame] | 93 | // Compiler intrinsics (MSVC) |
| 94 | #if defined(_MSC_VER) && _MSC_VER >= 1400 |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 95 | # define _LIBCPP_HAS_IS_BASE_OF |
Howard Hinnant | dd0d702 | 2011-09-22 19:10:18 +0000 | [diff] [blame] | 96 | # endif |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 97 | # if defined(_MSC_VER) && !defined(__clang__) |
| 98 | # define _LIBCPP_MSVC // Using Microsoft Visual C++ compiler |
Howard Hinnant | 408927e | 2013-10-04 21:14:44 +0000 | [diff] [blame] | 99 | # define _LIBCPP_TOSTRING2(x) #x |
| 100 | # define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x) |
| 101 | # define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x)) |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 102 | # endif |
Howard Hinnant | 8ad7091 | 2013-09-17 01:34:47 +0000 | [diff] [blame] | 103 | # // If mingw not explicitly detected, assume using MS C runtime only. |
| 104 | # ifndef __MINGW32__ |
| 105 | # define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library |
| 106 | # endif |
Howard Hinnant | 34bad2a | 2011-05-13 17:16:06 +0000 | [diff] [blame] | 107 | #endif // _WIN32 |
| 108 | |
David Chisnall | 8074c34 | 2012-02-29 13:05:08 +0000 | [diff] [blame] | 109 | #ifdef __sun__ |
| 110 | # include <sys/isa_defs.h> |
| 111 | # ifdef _LITTLE_ENDIAN |
| 112 | # define _LIBCPP_LITTLE_ENDIAN 1 |
| 113 | # define _LIBCPP_BIG_ENDIAN 0 |
| 114 | # else |
| 115 | # define _LIBCPP_LITTLE_ENDIAN 0 |
| 116 | # define _LIBCPP_BIG_ENDIAN 1 |
| 117 | # endif |
| 118 | #endif // __sun__ |
| 119 | |
Ed Schouten | dcf3740 | 2015-03-10 07:46:06 +0000 | [diff] [blame] | 120 | #if defined(__CloudABI__) |
| 121 | // Certain architectures provide arc4random(). Prefer using |
| 122 | // arc4random() over /dev/{u,}random to make it possible to obtain |
| 123 | // random data even when using sandboxing mechanisms such as chroots, |
| 124 | // Capsicum, etc. |
| 125 | # define _LIBCPP_USING_ARC4_RANDOM |
| 126 | #elif defined(__native_client__) |
JF Bastien | d483203 | 2014-12-01 19:19:55 +0000 | [diff] [blame] | 127 | // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access, |
| 128 | // including accesses to the special files under /dev. C++11's |
| 129 | // std::random_device is instead exposed through a NaCl syscall. |
| 130 | # define _LIBCPP_USING_NACL_RANDOM |
Ed Schouten | dcf3740 | 2015-03-10 07:46:06 +0000 | [diff] [blame] | 131 | #elif defined(_WIN32) |
| 132 | # define _LIBCPP_USING_WIN32_RANDOM |
| 133 | #else |
| 134 | # define _LIBCPP_USING_DEV_RANDOM |
| 135 | #endif |
JF Bastien | d483203 | 2014-12-01 19:19:55 +0000 | [diff] [blame] | 136 | |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 137 | #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) |
Howard Hinnant | 155c2af | 2010-05-24 17:49:41 +0000 | [diff] [blame] | 138 | # include <endian.h> |
| 139 | # if __BYTE_ORDER == __LITTLE_ENDIAN |
| 140 | # define _LIBCPP_LITTLE_ENDIAN 1 |
| 141 | # define _LIBCPP_BIG_ENDIAN 0 |
| 142 | # elif __BYTE_ORDER == __BIG_ENDIAN |
| 143 | # define _LIBCPP_LITTLE_ENDIAN 0 |
| 144 | # define _LIBCPP_BIG_ENDIAN 1 |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 145 | # else // __BYTE_ORDER == __BIG_ENDIAN |
Howard Hinnant | 155c2af | 2010-05-24 17:49:41 +0000 | [diff] [blame] | 146 | # error unable to determine endian |
| 147 | # endif |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 148 | #endif // !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 149 | |
Marshall Clow | 1f25732 | 2013-03-18 17:04:29 +0000 | [diff] [blame] | 150 | #ifdef _WIN32 |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 151 | |
| 152 | // only really useful for a DLL |
| 153 | #ifdef _LIBCPP_DLL // this should be a compiler builtin define ideally... |
| 154 | # ifdef cxx_EXPORTS |
| 155 | # define _LIBCPP_HIDDEN |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 156 | # define _LIBCPP_FUNC_VIS __declspec(dllexport) |
| 157 | # define _LIBCPP_TYPE_VIS __declspec(dllexport) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 158 | # else |
| 159 | # define _LIBCPP_HIDDEN |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 160 | # define _LIBCPP_FUNC_VIS __declspec(dllimport) |
| 161 | # define _LIBCPP_TYPE_VIS __declspec(dllimport) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 162 | # endif |
| 163 | #else |
| 164 | # define _LIBCPP_HIDDEN |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 165 | # define _LIBCPP_FUNC_VIS |
| 166 | # define _LIBCPP_TYPE_VIS |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 167 | #endif |
| 168 | |
Howard Hinnant | a37d3cf | 2013-08-12 18:38:34 +0000 | [diff] [blame] | 169 | #define _LIBCPP_TYPE_VIS_ONLY |
| 170 | #define _LIBCPP_FUNC_VIS_ONLY |
| 171 | |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 172 | #ifndef _LIBCPP_INLINE_VISIBILITY |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 173 | # ifdef _LIBCPP_MSVC |
Howard Hinnant | 2aa7ad4 | 2011-10-20 12:49:21 +0000 | [diff] [blame] | 174 | # define _LIBCPP_INLINE_VISIBILITY __forceinline |
| 175 | # else // MinGW GCC and Clang |
| 176 | # define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__)) |
| 177 | # endif |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 178 | #endif |
| 179 | |
| 180 | #ifndef _LIBCPP_EXCEPTION_ABI |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 181 | #define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 182 | #endif |
| 183 | |
| 184 | #ifndef _LIBCPP_ALWAYS_INLINE |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 185 | # ifdef _LIBCPP_MSVC |
Howard Hinnant | 2aa7ad4 | 2011-10-20 12:49:21 +0000 | [diff] [blame] | 186 | # define _LIBCPP_ALWAYS_INLINE __forceinline |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 187 | # endif |
| 188 | #endif |
| 189 | |
| 190 | #endif // _WIN32 |
| 191 | |
| 192 | #ifndef _LIBCPP_HIDDEN |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 193 | #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden"))) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 194 | #endif |
| 195 | |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 196 | #ifndef _LIBCPP_FUNC_VIS |
| 197 | #define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default"))) |
| 198 | #endif |
| 199 | |
| 200 | #ifndef _LIBCPP_TYPE_VIS |
Howard Hinnant | 59f7301 | 2013-11-13 00:39:22 +0000 | [diff] [blame] | 201 | # if __has_attribute(__type_visibility__) |
Howard Hinnant | 411d2c5 | 2013-03-07 19:25:03 +0000 | [diff] [blame] | 202 | # define _LIBCPP_TYPE_VIS __attribute__ ((__type_visibility__("default"))) |
| 203 | # else |
| 204 | # define _LIBCPP_TYPE_VIS __attribute__ ((__visibility__("default"))) |
| 205 | # endif |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 206 | #endif |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 207 | |
Howard Hinnant | a37d3cf | 2013-08-12 18:38:34 +0000 | [diff] [blame] | 208 | #ifndef _LIBCPP_TYPE_VIS_ONLY |
| 209 | # define _LIBCPP_TYPE_VIS_ONLY _LIBCPP_TYPE_VIS |
| 210 | #endif |
| 211 | |
| 212 | #ifndef _LIBCPP_FUNC_VIS_ONLY |
| 213 | # define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS |
| 214 | #endif |
| 215 | |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 216 | #ifndef _LIBCPP_INLINE_VISIBILITY |
| 217 | #define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__)) |
| 218 | #endif |
| 219 | |
| 220 | #ifndef _LIBCPP_EXCEPTION_ABI |
Howard Hinnant | d889383 | 2013-12-04 21:03:23 +0000 | [diff] [blame] | 221 | #define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 222 | #endif |
| 223 | |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 224 | #ifndef _LIBCPP_ALWAYS_INLINE |
Howard Hinnant | cf82332 | 2010-12-17 14:46:43 +0000 | [diff] [blame] | 225 | #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__)) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 226 | #endif |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 227 | |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 228 | #if defined(__clang__) |
| 229 | |
Tim Northover | 0528f50 | 2014-03-30 14:59:12 +0000 | [diff] [blame] | 230 | #if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ |
| 231 | !defined(__arm__) |
Tim Northover | ffc9593 | 2014-03-30 11:34:22 +0000 | [diff] [blame] | 232 | #define _LIBCPP_ALTERNATE_STRING_LAYOUT |
| 233 | #endif |
| 234 | |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 235 | #if __has_feature(cxx_alignas) |
Howard Hinnant | 62cad69 | 2012-05-31 19:31:14 +0000 | [diff] [blame] | 236 | # define _ALIGNAS_TYPE(x) alignas(x) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 237 | # define _ALIGNAS(x) alignas(x) |
| 238 | #else |
Howard Hinnant | 076b28c | 2012-05-31 20:14:00 +0000 | [diff] [blame] | 239 | # define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 240 | # define _ALIGNAS(x) __attribute__((__aligned__(x))) |
| 241 | #endif |
| 242 | |
Howard Hinnant | e13b584 | 2011-05-26 19:07:54 +0000 | [diff] [blame] | 243 | #if !__has_feature(cxx_alias_templates) |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 244 | #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES |
Howard Hinnant | e13b584 | 2011-05-26 19:07:54 +0000 | [diff] [blame] | 245 | #endif |
Howard Hinnant | 8e6a398 | 2010-09-07 20:31:18 +0000 | [diff] [blame] | 246 | |
Marshall Clow | 2b12c31 | 2014-02-22 15:13:48 +0000 | [diff] [blame] | 247 | #if __cplusplus < 201103L |
Howard Hinnant | 31cd14f | 2010-09-16 23:27:26 +0000 | [diff] [blame] | 248 | typedef __char16_t char16_t; |
| 249 | typedef __char32_t char32_t; |
Howard Hinnant | 8e6a398 | 2010-09-07 20:31:18 +0000 | [diff] [blame] | 250 | #endif |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 251 | |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 252 | #if !(__has_feature(cxx_exceptions)) |
| 253 | #define _LIBCPP_NO_EXCEPTIONS |
| 254 | #endif |
| 255 | |
Howard Hinnant | 72f7358 | 2010-08-11 17:04:31 +0000 | [diff] [blame] | 256 | #if !(__has_feature(cxx_rtti)) |
| 257 | #define _LIBCPP_NO_RTTI |
| 258 | #endif |
| 259 | |
Howard Hinnant | 09bc0c9 | 2011-12-02 19:36:40 +0000 | [diff] [blame] | 260 | #if !(__has_feature(cxx_strong_enums)) |
| 261 | #define _LIBCPP_HAS_NO_STRONG_ENUMS |
| 262 | #endif |
| 263 | |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 264 | #if !(__has_feature(cxx_decltype)) |
| 265 | #define _LIBCPP_HAS_NO_DECLTYPE |
| 266 | #endif |
| 267 | |
Howard Hinnant | 8df9629 | 2011-05-26 17:07:32 +0000 | [diff] [blame] | 268 | #if __has_feature(cxx_attributes) |
Richard Smith | cabd392 | 2012-07-26 02:04:22 +0000 | [diff] [blame] | 269 | # define _LIBCPP_NORETURN [[noreturn]] |
Howard Hinnant | 8df9629 | 2011-05-26 17:07:32 +0000 | [diff] [blame] | 270 | #else |
Richard Smith | cabd392 | 2012-07-26 02:04:22 +0000 | [diff] [blame] | 271 | # define _LIBCPP_NORETURN __attribute__ ((noreturn)) |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 272 | #endif |
| 273 | |
Dimitry Andric | 5785d60 | 2015-02-05 07:40:48 +0000 | [diff] [blame] | 274 | #define _LIBCPP_UNUSED __attribute__((__unused__)) |
| 275 | |
Howard Hinnant | 3d28422 | 2013-05-02 20:18:43 +0000 | [diff] [blame] | 276 | #if !(__has_feature(cxx_defaulted_functions)) |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 277 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS |
Howard Hinnant | 3d28422 | 2013-05-02 20:18:43 +0000 | [diff] [blame] | 278 | #endif // !(__has_feature(cxx_defaulted_functions)) |
Howard Hinnant | 642b34a | 2010-09-29 18:13:54 +0000 | [diff] [blame] | 279 | |
| 280 | #if !(__has_feature(cxx_deleted_functions)) |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 281 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS |
| 282 | #endif // !(__has_feature(cxx_deleted_functions)) |
| 283 | |
| 284 | #if !(__has_feature(cxx_lambdas)) |
| 285 | #define _LIBCPP_HAS_NO_LAMBDAS |
| 286 | #endif |
| 287 | |
| 288 | #if !(__has_feature(cxx_nullptr)) |
| 289 | #define _LIBCPP_HAS_NO_NULLPTR |
| 290 | #endif |
| 291 | |
| 292 | #if !(__has_feature(cxx_rvalue_references)) |
| 293 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES |
| 294 | #endif |
| 295 | |
| 296 | #if !(__has_feature(cxx_static_assert)) |
| 297 | #define _LIBCPP_HAS_NO_STATIC_ASSERT |
| 298 | #endif |
| 299 | |
| 300 | #if !(__has_feature(cxx_auto_type)) |
| 301 | #define _LIBCPP_HAS_NO_AUTO_TYPE |
Howard Hinnant | 986832c | 2011-07-29 21:35:53 +0000 | [diff] [blame] | 302 | #endif |
| 303 | |
Howard Hinnant | df937d0 | 2011-07-31 17:10:44 +0000 | [diff] [blame] | 304 | #if !(__has_feature(cxx_access_control_sfinae)) || !__has_feature(cxx_trailing_return) |
Howard Hinnant | 68d1339 | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 305 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 306 | #endif |
| 307 | |
| 308 | #if !(__has_feature(cxx_variadic_templates)) |
| 309 | #define _LIBCPP_HAS_NO_VARIADICS |
| 310 | #endif |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 311 | |
Howard Hinnant | 9e9eb95 | 2010-11-16 21:10:23 +0000 | [diff] [blame] | 312 | #if !(__has_feature(cxx_trailing_return)) |
| 313 | #define _LIBCPP_HAS_NO_TRAILING_RETURN |
| 314 | #endif |
| 315 | |
Howard Hinnant | 3371179 | 2011-08-12 21:56:02 +0000 | [diff] [blame] | 316 | #if !(__has_feature(cxx_generalized_initializers)) |
| 317 | #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS |
| 318 | #endif |
| 319 | |
Howard Hinnant | dd0d702 | 2011-09-22 19:10:18 +0000 | [diff] [blame] | 320 | #if __has_feature(is_base_of) |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 321 | # define _LIBCPP_HAS_IS_BASE_OF |
Howard Hinnant | dd0d702 | 2011-09-22 19:10:18 +0000 | [diff] [blame] | 322 | #endif |
| 323 | |
Eric Fiselier | f739430 | 2015-06-13 07:08:02 +0000 | [diff] [blame] | 324 | #if __has_feature(is_final) |
| 325 | # define _LIBCPP_HAS_IS_FINAL |
| 326 | #endif |
| 327 | |
Douglas Gregor | 1303444 | 2011-06-22 22:17:44 +0000 | [diff] [blame] | 328 | // Objective-C++ features (opt-in) |
| 329 | #if __has_feature(objc_arc) |
| 330 | #define _LIBCPP_HAS_OBJC_ARC |
| 331 | #endif |
| 332 | |
| 333 | #if __has_feature(objc_arc_weak) |
| 334 | #define _LIBCPP_HAS_OBJC_ARC_WEAK |
Howard Hinnant | 09bc0c9 | 2011-12-02 19:36:40 +0000 | [diff] [blame] | 335 | #define _LIBCPP_HAS_NO_STRONG_ENUMS |
Douglas Gregor | 1303444 | 2011-06-22 22:17:44 +0000 | [diff] [blame] | 336 | #endif |
| 337 | |
Howard Hinnant | 62c8c0b | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 338 | #if !(__has_feature(cxx_constexpr)) |
| 339 | #define _LIBCPP_HAS_NO_CONSTEXPR |
| 340 | #endif |
| 341 | |
Eric Fiselier | b4c0c66 | 2014-07-17 05:16:18 +0000 | [diff] [blame] | 342 | #if !(__has_feature(cxx_relaxed_constexpr)) |
| 343 | #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR |
| 344 | #endif |
| 345 | |
Marshall Clow | faae698 | 2015-03-17 15:30:22 +0000 | [diff] [blame] | 346 | #if !(__has_feature(cxx_variable_templates)) |
| 347 | #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES |
| 348 | #endif |
| 349 | |
David Blaikie | 97ab002 | 2013-05-13 21:53:44 +0000 | [diff] [blame] | 350 | #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L |
| 351 | #if defined(__FreeBSD__) |
David Chisnall | 277ad05 | 2012-03-14 14:10:37 +0000 | [diff] [blame] | 352 | #define _LIBCPP_HAS_QUICK_EXIT |
Howard Hinnant | cabc5a2 | 2012-10-13 18:03:53 +0000 | [diff] [blame] | 353 | #define _LIBCPP_HAS_C11_FEATURES |
Marshall Clow | 3477ec9 | 2014-07-10 15:20:28 +0000 | [diff] [blame] | 354 | #elif defined(__ANDROID__) |
| 355 | #define _LIBCPP_HAS_QUICK_EXIT |
David Blaikie | 97ab002 | 2013-05-13 21:53:44 +0000 | [diff] [blame] | 356 | #elif defined(__linux__) |
| 357 | #include <features.h> |
| 358 | #if __GLIBC_PREREQ(2, 15) |
| 359 | #define _LIBCPP_HAS_QUICK_EXIT |
| 360 | #endif |
| 361 | #if __GLIBC_PREREQ(2, 17) |
| 362 | #define _LIBCPP_HAS_C11_FEATURES |
| 363 | #endif |
| 364 | #endif |
David Chisnall | 277ad05 | 2012-03-14 14:10:37 +0000 | [diff] [blame] | 365 | #endif |
| 366 | |
Howard Hinnant | 68d1339 | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 367 | #if (__has_feature(cxx_noexcept)) |
| 368 | # define _NOEXCEPT noexcept |
| 369 | # define _NOEXCEPT_(x) noexcept(x) |
Marshall Clow | 0869d9f | 2014-01-03 18:21:14 +0000 | [diff] [blame] | 370 | # define _NOEXCEPT_OR_FALSE(x) noexcept(x) |
Howard Hinnant | 68d1339 | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 371 | #else |
| 372 | # define _NOEXCEPT throw() |
| 373 | # define _NOEXCEPT_(x) |
Marshall Clow | 0869d9f | 2014-01-03 18:21:14 +0000 | [diff] [blame] | 374 | # define _NOEXCEPT_OR_FALSE(x) false |
Howard Hinnant | 68d1339 | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 375 | #endif |
| 376 | |
Alexis Hunt | 43b6e8e | 2011-07-18 18:37:21 +0000 | [diff] [blame] | 377 | #if __has_feature(underlying_type) |
Marshall Clow | 2072352 | 2014-06-26 01:07:56 +0000 | [diff] [blame] | 378 | # define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) |
| 379 | #endif |
| 380 | |
| 381 | #if __has_feature(is_literal) |
| 382 | # define _LIBCPP_IS_LITERAL(T) __is_literal(T) |
Alexis Hunt | 43b6e8e | 2011-07-18 18:37:21 +0000 | [diff] [blame] | 383 | #endif |
| 384 | |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 385 | // Inline namespaces are available in Clang regardless of C++ dialect. |
| 386 | #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { |
| 387 | #define _LIBCPP_END_NAMESPACE_STD } } |
| 388 | #define _VSTD std::_LIBCPP_NAMESPACE |
| 389 | |
| 390 | namespace std { |
| 391 | inline namespace _LIBCPP_NAMESPACE { |
| 392 | } |
| 393 | } |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 394 | |
Marshall Clow | 90fc047 | 2014-04-14 15:44:57 +0000 | [diff] [blame] | 395 | #if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) |
| 396 | #define _LIBCPP_HAS_NO_ASAN |
| 397 | #endif |
| 398 | |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 399 | #elif defined(__GNUC__) |
| 400 | |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 401 | #define _ALIGNAS(x) __attribute__((__aligned__(x))) |
Howard Hinnant | 67f7517 | 2012-08-19 17:14:47 +0000 | [diff] [blame] | 402 | #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 403 | |
Richard Smith | cabd392 | 2012-07-26 02:04:22 +0000 | [diff] [blame] | 404 | #define _LIBCPP_NORETURN __attribute__((noreturn)) |
Howard Hinnant | 1e570a3 | 2011-05-31 13:13:49 +0000 | [diff] [blame] | 405 | |
Dimitry Andric | 5785d60 | 2015-02-05 07:40:48 +0000 | [diff] [blame] | 406 | #define _LIBCPP_UNUSED __attribute__((__unused__)) |
| 407 | |
Marshall Clow | 2072352 | 2014-06-26 01:07:56 +0000 | [diff] [blame] | 408 | #if _GNUC_VER >= 407 |
| 409 | #define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) |
| 410 | #define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) |
Eric Fiselier | f739430 | 2015-06-13 07:08:02 +0000 | [diff] [blame] | 411 | #define _LIBCPP_HAS_IS_FINAL |
| 412 | #endif |
| 413 | |
| 414 | #if defined(__GNUC__) && _GNUC_VER >= 403 |
| 415 | # define _LIBCPP_HAS_IS_BASE_OF |
Marshall Clow | 2072352 | 2014-06-26 01:07:56 +0000 | [diff] [blame] | 416 | #endif |
| 417 | |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 418 | #if !__EXCEPTIONS |
| 419 | #define _LIBCPP_NO_EXCEPTIONS |
| 420 | #endif |
| 421 | |
| 422 | #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES |
Nico Weber | d04e475 | 2014-06-04 15:46:56 +0000 | [diff] [blame] | 423 | |
| 424 | // constexpr was added to GCC in 4.6. |
| 425 | #if _GNUC_VER < 406 |
Howard Hinnant | 62c8c0b | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 426 | #define _LIBCPP_HAS_NO_CONSTEXPR |
Nico Weber | d04e475 | 2014-06-04 15:46:56 +0000 | [diff] [blame] | 427 | // Can only use constexpr in c++11 mode. |
| 428 | #elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L |
| 429 | #define _LIBCPP_HAS_NO_CONSTEXPR |
| 430 | #endif |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 431 | |
Eric Fiselier | b4c0c66 | 2014-07-17 05:16:18 +0000 | [diff] [blame] | 432 | // No version of GCC supports relaxed constexpr rules |
| 433 | #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR |
Marshall Clow | faae698 | 2015-03-17 15:30:22 +0000 | [diff] [blame] | 434 | // GCC 5 will support variable templates |
| 435 | #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES |
Eric Fiselier | b4c0c66 | 2014-07-17 05:16:18 +0000 | [diff] [blame] | 436 | |
Howard Hinnant | 68d1339 | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 437 | #define _NOEXCEPT throw() |
| 438 | #define _NOEXCEPT_(x) |
Marshall Clow | 0869d9f | 2014-01-03 18:21:14 +0000 | [diff] [blame] | 439 | #define _NOEXCEPT_OR_FALSE(x) false |
Howard Hinnant | 68d1339 | 2011-05-11 20:19:40 +0000 | [diff] [blame] | 440 | |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 441 | #ifndef __GXX_EXPERIMENTAL_CXX0X__ |
| 442 | |
| 443 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE |
| 444 | #define _LIBCPP_HAS_NO_DECLTYPE |
| 445 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS |
| 446 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS |
| 447 | #define _LIBCPP_HAS_NO_NULLPTR |
| 448 | #define _LIBCPP_HAS_NO_STATIC_ASSERT |
| 449 | #define _LIBCPP_HAS_NO_UNICODE_CHARS |
| 450 | #define _LIBCPP_HAS_NO_VARIADICS |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 451 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES |
Howard Hinnant | 8b24e86 | 2011-04-21 14:29:59 +0000 | [diff] [blame] | 452 | #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS |
Logan Chien | 5eb2ac4 | 2013-12-14 06:44:09 +0000 | [diff] [blame] | 453 | #define _LIBCPP_HAS_NO_STRONG_ENUMS |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 454 | |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 455 | #else // __GXX_EXPERIMENTAL_CXX0X__ |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 456 | |
Howard Hinnant | 9e9eb95 | 2010-11-16 21:10:23 +0000 | [diff] [blame] | 457 | #define _LIBCPP_HAS_NO_TRAILING_RETURN |
Howard Hinnant | 8b24e86 | 2011-04-21 14:29:59 +0000 | [diff] [blame] | 458 | #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS |
Howard Hinnant | 9e9eb95 | 2010-11-16 21:10:23 +0000 | [diff] [blame] | 459 | |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 460 | #if _GNUC_VER < 403 |
Howard Hinnant | 74279a5 | 2010-09-04 23:28:19 +0000 | [diff] [blame] | 461 | #define _LIBCPP_HAS_NO_RVALUE_REFERENCES |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 462 | #endif |
| 463 | |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 464 | #if _GNUC_VER < 403 |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 465 | #define _LIBCPP_HAS_NO_STATIC_ASSERT |
| 466 | #endif |
| 467 | |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 468 | #if _GNUC_VER < 404 |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 469 | #define _LIBCPP_HAS_NO_DECLTYPE |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 470 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS |
| 471 | #define _LIBCPP_HAS_NO_UNICODE_CHARS |
| 472 | #define _LIBCPP_HAS_NO_VARIADICS |
Howard Hinnant | 3371179 | 2011-08-12 21:56:02 +0000 | [diff] [blame] | 473 | #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 474 | #endif // _GNUC_VER < 404 |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 475 | |
Howard Hinnant | cafe717 | 2012-10-03 20:48:05 +0000 | [diff] [blame] | 476 | #if _GNUC_VER < 406 |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 477 | #define _LIBCPP_HAS_NO_NULLPTR |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 478 | #endif |
| 479 | |
Yaron Keren | 45ada6c | 2013-11-22 09:22:12 +0000 | [diff] [blame] | 480 | #if _GNUC_VER < 407 |
| 481 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE |
| 482 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS |
| 483 | #endif |
| 484 | |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 485 | #endif // __GXX_EXPERIMENTAL_CXX0X__ |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 486 | |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 487 | #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { |
| 488 | #define _LIBCPP_END_NAMESPACE_STD } } |
Howard Hinnant | b1ad5a8 | 2011-06-30 21:18:19 +0000 | [diff] [blame] | 489 | #define _VSTD std::_LIBCPP_NAMESPACE |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 490 | |
| 491 | namespace std { |
| 492 | namespace _LIBCPP_NAMESPACE { |
| 493 | } |
| 494 | using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); |
| 495 | } |
| 496 | |
Marshall Clow | 90fc047 | 2014-04-14 15:44:57 +0000 | [diff] [blame] | 497 | #if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) |
| 498 | #define _LIBCPP_HAS_NO_ASAN |
| 499 | #endif |
| 500 | |
Howard Hinnant | 13d8bc1 | 2013-08-01 18:17:34 +0000 | [diff] [blame] | 501 | #elif defined(_LIBCPP_MSVC) |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 502 | |
Howard Hinnant | bf07402 | 2011-10-22 20:59:45 +0000 | [diff] [blame] | 503 | #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 504 | #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER |
| 505 | #define _LIBCPP_HAS_NO_CONSTEXPR |
Eric Fiselier | b4c0c66 | 2014-07-17 05:16:18 +0000 | [diff] [blame] | 506 | #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR |
Marshall Clow | faae698 | 2015-03-17 15:30:22 +0000 | [diff] [blame] | 507 | #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 508 | #define _LIBCPP_HAS_NO_UNICODE_CHARS |
| 509 | #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS |
Howard Hinnant | 7908cde | 2013-08-24 21:31:37 +0000 | [diff] [blame] | 510 | #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 511 | #define __alignof__ __alignof |
Richard Smith | cabd392 | 2012-07-26 02:04:22 +0000 | [diff] [blame] | 512 | #define _LIBCPP_NORETURN __declspec(noreturn) |
Dimitry Andric | 5785d60 | 2015-02-05 07:40:48 +0000 | [diff] [blame] | 513 | #define _LIBCPP_UNUSED |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 514 | #define _ALIGNAS(x) __declspec(align(x)) |
| 515 | #define _LIBCPP_HAS_NO_VARIADICS |
| 516 | |
Yaron Keren | c40b537 | 2014-02-13 14:02:28 +0000 | [diff] [blame] | 517 | #define _NOEXCEPT throw () |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 518 | #define _NOEXCEPT_(x) |
Marshall Clow | 0869d9f | 2014-01-03 18:21:14 +0000 | [diff] [blame] | 519 | #define _NOEXCEPT_OR_FALSE(x) false |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 520 | |
| 521 | #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { |
| 522 | #define _LIBCPP_END_NAMESPACE_STD } |
| 523 | #define _VSTD std |
| 524 | |
Howard Hinnant | 33f0472 | 2013-10-04 23:56:37 +0000 | [diff] [blame] | 525 | # define _LIBCPP_WEAK |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 526 | namespace std { |
| 527 | } |
| 528 | |
Marshall Clow | 90fc047 | 2014-04-14 15:44:57 +0000 | [diff] [blame] | 529 | #define _LIBCPP_HAS_NO_ASAN |
| 530 | |
Howard Hinnant | ea38295 | 2013-08-14 18:00:20 +0000 | [diff] [blame] | 531 | #elif defined(__IBMCPP__) |
| 532 | |
| 533 | #define _ALIGNAS(x) __attribute__((__aligned__(x))) |
| 534 | #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) |
| 535 | #define _ATTRIBUTE(x) __attribute__((x)) |
| 536 | #define _LIBCPP_NORETURN __attribute__((noreturn)) |
Dimitry Andric | 5785d60 | 2015-02-05 07:40:48 +0000 | [diff] [blame] | 537 | #define _LIBCPP_UNUSED |
Howard Hinnant | ea38295 | 2013-08-14 18:00:20 +0000 | [diff] [blame] | 538 | |
| 539 | #define _NOEXCEPT throw() |
| 540 | #define _NOEXCEPT_(x) |
Marshall Clow | 0869d9f | 2014-01-03 18:21:14 +0000 | [diff] [blame] | 541 | #define _NOEXCEPT_OR_FALSE(x) false |
Howard Hinnant | ea38295 | 2013-08-14 18:00:20 +0000 | [diff] [blame] | 542 | |
| 543 | #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES |
| 544 | #define _LIBCPP_HAS_NO_ADVANCED_SFINAE |
| 545 | #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS |
| 546 | #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS |
| 547 | #define _LIBCPP_HAS_NO_NULLPTR |
| 548 | #define _LIBCPP_HAS_NO_UNICODE_CHARS |
Howard Hinnant | ea38295 | 2013-08-14 18:00:20 +0000 | [diff] [blame] | 549 | #define _LIBCPP_HAS_IS_BASE_OF |
Eric Fiselier | f739430 | 2015-06-13 07:08:02 +0000 | [diff] [blame] | 550 | #define _LIBCPP_HAS_IS_FINAL |
Marshall Clow | faae698 | 2015-03-17 15:30:22 +0000 | [diff] [blame] | 551 | #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES |
Howard Hinnant | ea38295 | 2013-08-14 18:00:20 +0000 | [diff] [blame] | 552 | |
| 553 | #if defined(_AIX) |
| 554 | #define __MULTILOCALE_API |
| 555 | #endif |
| 556 | |
| 557 | #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE { |
| 558 | #define _LIBCPP_END_NAMESPACE_STD } } |
| 559 | #define _VSTD std::_LIBCPP_NAMESPACE |
| 560 | |
| 561 | namespace std { |
| 562 | inline namespace _LIBCPP_NAMESPACE { |
| 563 | } |
| 564 | } |
| 565 | |
Marshall Clow | 90fc047 | 2014-04-14 15:44:57 +0000 | [diff] [blame] | 566 | #define _LIBCPP_HAS_NO_ASAN |
| 567 | |
Marshall Clow | 9083d64 | 2014-01-06 15:23:02 +0000 | [diff] [blame] | 568 | #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 569 | |
| 570 | #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS |
Howard Hinnant | aa87c0f | 2010-08-10 20:48:29 +0000 | [diff] [blame] | 571 | typedef unsigned short char16_t; |
| 572 | typedef unsigned int char32_t; |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 573 | #endif // _LIBCPP_HAS_NO_UNICODE_CHARS |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 574 | |
Stephan Tolksdorf | 0efeb6c | 2014-03-26 19:45:52 +0000 | [diff] [blame] | 575 | #ifndef __SIZEOF_INT128__ |
| 576 | #define _LIBCPP_HAS_NO_INT128 |
| 577 | #endif |
| 578 | |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 579 | #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT |
| 580 | |
| 581 | template <bool> struct __static_assert_test; |
| 582 | template <> struct __static_assert_test<true> {}; |
| 583 | template <unsigned> struct __static_assert_check {}; |
| 584 | #define static_assert(__b, __m) \ |
| 585 | typedef __static_assert_check<sizeof(__static_assert_test<(__b)>)> \ |
| 586 | _LIBCPP_CONCAT(__t, __LINE__) |
| 587 | |
Howard Hinnant | 3b6579a | 2010-08-22 00:02:43 +0000 | [diff] [blame] | 588 | #endif // _LIBCPP_HAS_NO_STATIC_ASSERT |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 589 | |
| 590 | #ifdef _LIBCPP_HAS_NO_DECLTYPE |
Eric Fiselier | 86fcc92 | 2015-07-10 20:26:38 +0000 | [diff] [blame] | 591 | // GCC 4.6 provides __decltype in all standard modes. |
| 592 | #if !__is_identifier(__decltype) || _GNUC_VER >= 406 |
Eric Fiselier | 1ac5484 | 2015-06-13 06:27:17 +0000 | [diff] [blame] | 593 | # define decltype(__x) __decltype(__x) |
| 594 | #else |
| 595 | # define decltype(__x) __typeof__(__x) |
| 596 | #endif |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 597 | #endif |
| 598 | |
Howard Hinnant | 62c8c0b | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 599 | #ifdef _LIBCPP_HAS_NO_CONSTEXPR |
Howard Hinnant | 664183b | 2012-04-02 00:40:41 +0000 | [diff] [blame] | 600 | #define _LIBCPP_CONSTEXPR |
| 601 | #else |
| 602 | #define _LIBCPP_CONSTEXPR constexpr |
Howard Hinnant | 62c8c0b | 2010-09-06 19:10:31 +0000 | [diff] [blame] | 603 | #endif |
| 604 | |
Howard Hinnant | 3d28422 | 2013-05-02 20:18:43 +0000 | [diff] [blame] | 605 | #ifdef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS |
| 606 | #define _LIBCPP_DEFAULT {} |
| 607 | #else |
| 608 | #define _LIBCPP_DEFAULT = default; |
| 609 | #endif |
| 610 | |
Nuno Lopes | 22df2dc | 2012-06-28 16:47:34 +0000 | [diff] [blame] | 611 | #ifdef __GNUC__ |
Joerg Sonnenberger | 4944e0b | 2013-04-29 19:52:08 +0000 | [diff] [blame] | 612 | #define _NOALIAS __attribute__((__malloc__)) |
Nuno Lopes | 22df2dc | 2012-06-28 16:47:34 +0000 | [diff] [blame] | 613 | #else |
| 614 | #define _NOALIAS |
| 615 | #endif |
| 616 | |
Marshall Clow | d03f2c8 | 2013-11-19 19:16:03 +0000 | [diff] [blame] | 617 | #if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) |
Howard Hinnant | 86a291f | 2012-02-21 21:46:43 +0000 | [diff] [blame] | 618 | # define _LIBCPP_EXPLICIT explicit |
| 619 | #else |
| 620 | # define _LIBCPP_EXPLICIT |
| 621 | #endif |
| 622 | |
Richard Smith | 1f1c147 | 2014-06-04 19:54:15 +0000 | [diff] [blame] | 623 | #if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) |
| 624 | # define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE |
| 625 | #endif |
| 626 | |
Howard Hinnant | 09bc0c9 | 2011-12-02 19:36:40 +0000 | [diff] [blame] | 627 | #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 628 | #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx |
Howard Hinnant | 09bc0c9 | 2011-12-02 19:36:40 +0000 | [diff] [blame] | 629 | #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ |
Howard Hinnant | 49e145e | 2012-10-30 19:06:59 +0000 | [diff] [blame] | 630 | __lx __v_; \ |
| 631 | _LIBCPP_ALWAYS_INLINE x(__lx __v) : __v_(__v) {} \ |
| 632 | _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \ |
Howard Hinnant | 09bc0c9 | 2011-12-02 19:36:40 +0000 | [diff] [blame] | 633 | _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ |
| 634 | }; |
| 635 | #else // _LIBCPP_HAS_NO_STRONG_ENUMS |
Howard Hinnant | 8331b76 | 2013-03-06 23:30:19 +0000 | [diff] [blame] | 636 | #define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_TYPE_VIS x |
Howard Hinnant | 09bc0c9 | 2011-12-02 19:36:40 +0000 | [diff] [blame] | 637 | #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) |
| 638 | #endif // _LIBCPP_HAS_NO_STRONG_ENUMS |
| 639 | |
Howard Hinnant | 6148a9b | 2013-08-23 20:10:18 +0000 | [diff] [blame] | 640 | #ifdef _LIBCPP_DEBUG |
| 641 | # if _LIBCPP_DEBUG == 0 |
Howard Hinnant | 8ea9824 | 2013-08-23 17:37:05 +0000 | [diff] [blame] | 642 | # define _LIBCPP_DEBUG_LEVEL 1 |
Howard Hinnant | 6148a9b | 2013-08-23 20:10:18 +0000 | [diff] [blame] | 643 | # elif _LIBCPP_DEBUG == 1 |
Howard Hinnant | 8ea9824 | 2013-08-23 17:37:05 +0000 | [diff] [blame] | 644 | # define _LIBCPP_DEBUG_LEVEL 2 |
| 645 | # else |
Howard Hinnant | 6148a9b | 2013-08-23 20:10:18 +0000 | [diff] [blame] | 646 | # error Supported values for _LIBCPP_DEBUG are 0 and 1 |
Howard Hinnant | 8ea9824 | 2013-08-23 17:37:05 +0000 | [diff] [blame] | 647 | # endif |
| 648 | # define _LIBCPP_EXTERN_TEMPLATE(...) |
| 649 | #endif |
| 650 | |
Howard Hinnant | 862ca99 | 2012-11-06 21:08:48 +0000 | [diff] [blame] | 651 | #ifndef _LIBCPP_EXTERN_TEMPLATE |
Justin Bogner | 67105aa | 2014-08-15 17:58:56 +0000 | [diff] [blame] | 652 | #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; |
Howard Hinnant | 862ca99 | 2012-11-06 21:08:48 +0000 | [diff] [blame] | 653 | #endif |
| 654 | |
Howard Hinnant | 8ea9824 | 2013-08-23 17:37:05 +0000 | [diff] [blame] | 655 | #ifndef _LIBCPP_EXTERN_TEMPLATE2 |
| 656 | #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; |
| 657 | #endif |
| 658 | |
Tim Northover | 0528f50 | 2014-03-30 14:59:12 +0000 | [diff] [blame] | 659 | #if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) |
Tim Northover | a4fb462 | 2014-03-30 11:34:26 +0000 | [diff] [blame] | 660 | #define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63) |
| 661 | #endif |
| 662 | |
Ed Schouten | 13eb7dc | 2015-03-10 09:26:38 +0000 | [diff] [blame] | 663 | #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || \ |
| 664 | defined(__sun__) || defined(__NetBSD__) || defined(__CloudABI__) |
Alexis Hunt | 1adf2aa | 2011-07-15 05:40:33 +0000 | [diff] [blame] | 665 | #define _LIBCPP_LOCALE__L_EXTENSIONS 1 |
| 666 | #endif |
Yaron Keren | 804da95 | 2013-12-20 13:19:45 +0000 | [diff] [blame] | 667 | |
Ed Schouten | 118b603 | 2015-03-11 16:39:36 +0000 | [diff] [blame] | 668 | #if !defined(_WIN32) && !defined(__ANDROID__) && !defined(_NEWLIB_VERSION) && \ |
| 669 | !defined(__CloudABI__) |
| 670 | #define _LIBCPP_HAS_CATOPEN 1 |
| 671 | #endif |
| 672 | |
Marshall Clow | 82378c0 | 2013-03-18 19:34:07 +0000 | [diff] [blame] | 673 | #ifdef __FreeBSD__ |
David Chisnall | 6ae8f35 | 2011-11-13 17:15:33 +0000 | [diff] [blame] | 674 | #define _DECLARE_C99_LDBL_MATH 1 |
| 675 | #endif |
Alexis Hunt | 1adf2aa | 2011-07-15 05:40:33 +0000 | [diff] [blame] | 676 | |
Marshall Clow | 82378c0 | 2013-03-18 19:34:07 +0000 | [diff] [blame] | 677 | #if defined(__APPLE__) || defined(__FreeBSD__) |
Howard Hinnant | f312e3e | 2011-09-28 23:39:33 +0000 | [diff] [blame] | 678 | #define _LIBCPP_HAS_DEFAULTRUNELOCALE |
Alexis Hunt | 5a4dd56 | 2011-07-09 01:09:31 +0000 | [diff] [blame] | 679 | #endif |
| 680 | |
Marshall Clow | 82378c0 | 2013-03-18 19:34:07 +0000 | [diff] [blame] | 681 | #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__) |
Alexis Hunt | c2017f1 | 2011-07-09 03:40:04 +0000 | [diff] [blame] | 682 | #define _LIBCPP_WCTYPE_IS_MASK |
| 683 | #endif |
| 684 | |
Howard Hinnant | a5a4cb6 | 2013-11-14 22:52:25 +0000 | [diff] [blame] | 685 | #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR |
| 686 | # define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 |
| 687 | #endif |
| 688 | |
Howard Hinnant | df7d11e | 2013-05-07 20:16:13 +0000 | [diff] [blame] | 689 | #ifndef _LIBCPP_STD_VER |
| 690 | # if __cplusplus <= 201103L |
| 691 | # define _LIBCPP_STD_VER 11 |
Marshall Clow | 348694e | 2014-06-06 22:31:09 +0000 | [diff] [blame] | 692 | # elif __cplusplus <= 201402L |
| 693 | # define _LIBCPP_STD_VER 14 |
Howard Hinnant | df7d11e | 2013-05-07 20:16:13 +0000 | [diff] [blame] | 694 | # else |
Marshall Clow | 348694e | 2014-06-06 22:31:09 +0000 | [diff] [blame] | 695 | # define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification |
Howard Hinnant | df7d11e | 2013-05-07 20:16:13 +0000 | [diff] [blame] | 696 | # endif |
| 697 | #endif // _LIBCPP_STD_VER |
| 698 | |
Marshall Clow | a2cbe0d | 2013-09-28 18:35:31 +0000 | [diff] [blame] | 699 | #if _LIBCPP_STD_VER > 11 |
| 700 | #define _LIBCPP_DEPRECATED [[deprecated]] |
| 701 | #else |
| 702 | #define _LIBCPP_DEPRECATED |
| 703 | #endif |
| 704 | |
Marshall Clow | 1045cee | 2013-07-15 14:57:19 +0000 | [diff] [blame] | 705 | #if _LIBCPP_STD_VER <= 11 |
Marshall Clow | ccaa0fb | 2013-08-27 20:18:59 +0000 | [diff] [blame] | 706 | #define _LIBCPP_EXPLICIT_AFTER_CXX11 |
Marshall Clow | a2cbe0d | 2013-09-28 18:35:31 +0000 | [diff] [blame] | 707 | #define _LIBCPP_DEPRECATED_AFTER_CXX11 |
Marshall Clow | 1045cee | 2013-07-15 14:57:19 +0000 | [diff] [blame] | 708 | #else |
Marshall Clow | ccaa0fb | 2013-08-27 20:18:59 +0000 | [diff] [blame] | 709 | #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit |
Marshall Clow | a2cbe0d | 2013-09-28 18:35:31 +0000 | [diff] [blame] | 710 | #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] |
Marshall Clow | 1045cee | 2013-07-15 14:57:19 +0000 | [diff] [blame] | 711 | #endif |
| 712 | |
Eric Fiselier | b4c0c66 | 2014-07-17 05:16:18 +0000 | [diff] [blame] | 713 | #if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) |
| 714 | #define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr |
| 715 | #else |
| 716 | #define _LIBCPP_CONSTEXPR_AFTER_CXX11 |
| 717 | #endif |
| 718 | |
Dimitry Andric | 830fb60 | 2015-08-19 06:43:33 +0000 | [diff] [blame^] | 719 | #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES |
| 720 | # define _LIBCPP_EXPLICIT_MOVE(x) _VSTD::move(x) |
| 721 | #else |
| 722 | # define _LIBCPP_EXPLICIT_MOVE(x) (x) |
| 723 | #endif |
| 724 | |
Marshall Clow | 2cd9d37 | 2014-05-08 14:14:06 +0000 | [diff] [blame] | 725 | #ifndef _LIBCPP_HAS_NO_ASAN |
| 726 | extern "C" void __sanitizer_annotate_contiguous_container( |
| 727 | const void *, const void *, const void *, const void *); |
| 728 | #endif |
| 729 | |
Howard Hinnant | 1308788 | 2013-10-04 21:24:21 +0000 | [diff] [blame] | 730 | // Try to find out if RTTI is disabled. |
| 731 | // g++ and cl.exe have RTTI on by default and define a macro when it is. |
| 732 | // g++ only defines the macro in 4.3.2 and onwards. |
| 733 | #if !defined(_LIBCPP_NO_RTTI) |
Alexey Volkov | 51353fd | 2014-09-03 14:30:39 +0000 | [diff] [blame] | 734 | # if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \ |
| 735 | (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI) |
Howard Hinnant | 1308788 | 2013-10-04 21:24:21 +0000 | [diff] [blame] | 736 | # define _LIBCPP_NO_RTTI |
| 737 | # elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI) |
| 738 | # define _LIBCPP_NO_RTTI |
| 739 | # endif |
| 740 | #endif |
| 741 | |
Howard Hinnant | 33f0472 | 2013-10-04 23:56:37 +0000 | [diff] [blame] | 742 | #ifndef _LIBCPP_WEAK |
| 743 | # define _LIBCPP_WEAK __attribute__((__weak__)) |
| 744 | #endif |
| 745 | |
Eric Fiselier | 715b416 | 2014-12-06 20:09:11 +0000 | [diff] [blame] | 746 | #if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS) |
| 747 | # error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \ |
| 748 | _LIBCPP_HAS_NO_THREADS is defined. |
| 749 | #endif |
| 750 | |
Ed Schouten | 7009f4e | 2015-03-12 15:44:39 +0000 | [diff] [blame] | 751 | // Systems that use capability-based security (FreeBSD with Capsicum, |
| 752 | // Nuxi CloudABI) may only provide local filesystem access (using *at()). |
| 753 | // Functions like open(), rename(), unlink() and stat() should not be |
| 754 | // used, as they attempt to access the global filesystem namespace. |
| 755 | #ifdef __CloudABI__ |
| 756 | #define _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE |
| 757 | #endif |
| 758 | |
Ed Schouten | 3a75c0b | 2015-03-26 14:35:46 +0000 | [diff] [blame] | 759 | // CloudABI is intended for running networked services. Processes do not |
| 760 | // have standard input and output channels. |
| 761 | #ifdef __CloudABI__ |
| 762 | #define _LIBCPP_HAS_NO_STDIN |
| 763 | #define _LIBCPP_HAS_NO_STDOUT |
| 764 | #endif |
| 765 | |
Ed Schouten | 8451ac0 | 2015-03-12 15:48:06 +0000 | [diff] [blame] | 766 | #if defined(__ANDROID__) || defined(__CloudABI__) |
Dan Albert | ebdf28b | 2015-03-11 00:51:06 +0000 | [diff] [blame] | 767 | #define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE |
| 768 | #endif |
| 769 | |
Ed Schouten | 137c863 | 2015-06-24 08:44:38 +0000 | [diff] [blame] | 770 | // Thread-unsafe functions such as strtok(), mbtowc() and localtime() |
| 771 | // are not available. |
| 772 | #ifdef __CloudABI__ |
| 773 | #define _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS |
| 774 | #endif |
| 775 | |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 776 | #endif // _LIBCPP_CONFIG |