Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/asio/detail/config.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
1 // | 1 // |
2 // detail/config.hpp | 2 // detail/config.hpp |
3 // ~~~~~~~~~~~~~~~~~ | 3 // ~~~~~~~~~~~~~~~~~ |
4 // | 4 // |
5 // Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) | 5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) |
6 // | 6 // |
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying | 7 // Distributed under the Boost Software License, Version 1.0. (See accompanying |
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | 8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
9 // | 9 // |
10 | 10 |
182 # endif // defined(BOOST_ASIO_HAS_CONSTEXPR) | 182 # endif // defined(BOOST_ASIO_HAS_CONSTEXPR) |
183 #endif // !defined(BOOST_ASIO_CONSTEXPR) | 183 #endif // !defined(BOOST_ASIO_CONSTEXPR) |
184 | 184 |
185 // Standard library support for system errors. | 185 // Standard library support for system errors. |
186 # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) | 186 # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR) |
187 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 187 # if defined(__clang__) |
188 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 | 188 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
189 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 189 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 |
190 # elif (__cplusplus >= 201103) | |
191 # if __has_include(<system_error>) | |
192 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 | |
193 # endif // __has_include(<system_error>) | |
194 # endif // (__cplusplus >= 201103) | |
195 # endif // defined(__clang__) | |
190 # if defined(__GNUC__) | 196 # if defined(__GNUC__) |
191 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) | 197 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) |
192 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 198 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
193 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 | 199 # define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1 |
194 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 200 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
214 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 220 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
215 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) | 221 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) |
216 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 222 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
217 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) | 223 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) |
218 # endif // defined(__GNUC__) | 224 # endif // defined(__GNUC__) |
225 # if defined(BOOST_ASIO_MSVC) | |
226 # if (_MSC_VER >= 1900) | |
227 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true) | |
228 # endif // (_MSC_VER >= 1900) | |
229 # endif // defined(BOOST_ASIO_MSVC) | |
219 # if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) | 230 # if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) |
220 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT | 231 # define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT |
221 # endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) | 232 # endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) |
222 #endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) | 233 #endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT) |
223 | 234 |
224 // Standard library support for arrays. | 235 // Standard library support for arrays. |
225 #if !defined(BOOST_ASIO_HAS_STD_ARRAY) | 236 #if !defined(BOOST_ASIO_HAS_STD_ARRAY) |
226 # if !defined(BOOST_ASIO_DISABLE_STD_ARRAY) | 237 # if !defined(BOOST_ASIO_DISABLE_STD_ARRAY) |
227 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 238 # if defined(__clang__) |
228 # define BOOST_ASIO_HAS_STD_ARRAY 1 | 239 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
229 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 240 # define BOOST_ASIO_HAS_STD_ARRAY 1 |
241 # elif (__cplusplus >= 201103) | |
242 # if __has_include(<array>) | |
243 # define BOOST_ASIO_HAS_STD_ARRAY 1 | |
244 # endif // __has_include(<array>) | |
245 # endif // (__cplusplus >= 201103) | |
246 # endif // defined(__clang__) | |
230 # if defined(__GNUC__) | 247 # if defined(__GNUC__) |
231 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) | 248 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) |
232 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 249 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
233 # define BOOST_ASIO_HAS_STD_ARRAY 1 | 250 # define BOOST_ASIO_HAS_STD_ARRAY 1 |
234 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 251 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
243 #endif // !defined(BOOST_ASIO_HAS_STD_ARRAY) | 260 #endif // !defined(BOOST_ASIO_HAS_STD_ARRAY) |
244 | 261 |
245 // Standard library support for shared_ptr and weak_ptr. | 262 // Standard library support for shared_ptr and weak_ptr. |
246 #if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) | 263 #if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) |
247 # if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) | 264 # if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) |
248 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 265 # if defined(__clang__) |
249 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 | 266 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
250 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 267 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 |
268 # elif (__cplusplus >= 201103) | |
269 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 | |
270 # endif // (__cplusplus >= 201103) | |
271 # endif // defined(__clang__) | |
251 # if defined(__GNUC__) | 272 # if defined(__GNUC__) |
252 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) | 273 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) |
253 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 274 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
254 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 | 275 # define BOOST_ASIO_HAS_STD_SHARED_PTR 1 |
255 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 276 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
264 #endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) | 285 #endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR) |
265 | 286 |
266 // Standard library support for atomic operations. | 287 // Standard library support for atomic operations. |
267 #if !defined(BOOST_ASIO_HAS_STD_ATOMIC) | 288 #if !defined(BOOST_ASIO_HAS_STD_ATOMIC) |
268 # if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC) | 289 # if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC) |
269 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 290 # if defined(__clang__) |
270 # define BOOST_ASIO_HAS_STD_ATOMIC 1 | 291 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
271 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 292 # define BOOST_ASIO_HAS_STD_ATOMIC 1 |
293 # elif (__cplusplus >= 201103) | |
294 # if __has_include(<atomic>) | |
295 # define BOOST_ASIO_HAS_STD_ATOMIC 1 | |
296 # endif // __has_include(<atomic>) | |
297 # endif // (__cplusplus >= 201103) | |
298 # endif // defined(__clang__) | |
272 # if defined(__GNUC__) | 299 # if defined(__GNUC__) |
273 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) | 300 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) |
274 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 301 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
275 # define BOOST_ASIO_HAS_STD_ATOMIC 1 | 302 # define BOOST_ASIO_HAS_STD_ATOMIC 1 |
276 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 303 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
287 // Standard library support for chrono. Some standard libraries (such as the | 314 // Standard library support for chrono. Some standard libraries (such as the |
288 // libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x | 315 // libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x |
289 // drafts, rather than the eventually standardised name of steady_clock. | 316 // drafts, rather than the eventually standardised name of steady_clock. |
290 #if !defined(BOOST_ASIO_HAS_STD_CHRONO) | 317 #if !defined(BOOST_ASIO_HAS_STD_CHRONO) |
291 # if !defined(BOOST_ASIO_DISABLE_STD_CHRONO) | 318 # if !defined(BOOST_ASIO_DISABLE_STD_CHRONO) |
292 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 319 # if defined(__clang__) |
293 # define BOOST_ASIO_HAS_STD_CHRONO 1 | 320 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
294 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 321 # define BOOST_ASIO_HAS_STD_CHRONO 1 |
322 # elif (__cplusplus >= 201103) | |
323 # if __has_include(<chrono>) | |
324 # define BOOST_ASIO_HAS_STD_CHRONO 1 | |
325 # endif // __has_include(<chrono>) | |
326 # endif // (__cplusplus >= 201103) | |
327 # endif // defined(__clang__) | |
295 # if defined(__GNUC__) | 328 # if defined(__GNUC__) |
296 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) | 329 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) |
297 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 330 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
298 # define BOOST_ASIO_HAS_STD_CHRONO 1 | 331 # define BOOST_ASIO_HAS_STD_CHRONO 1 |
299 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6)) | 332 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6)) |
327 #endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) | 360 #endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) |
328 | 361 |
329 // Standard library support for addressof. | 362 // Standard library support for addressof. |
330 #if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) | 363 #if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) |
331 # if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF) | 364 # if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF) |
332 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 365 # if defined(__clang__) |
333 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 | 366 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
334 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 367 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 |
335 # if defined(__GNUC__) | 368 # elif (__cplusplus >= 201103) |
336 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) | 369 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 |
370 # endif // (__cplusplus >= 201103) | |
371 # endif // defined(__clang__) | |
372 # if defined(__GNUC__) | |
373 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) | |
337 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 374 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
338 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 | 375 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 |
339 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 376 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
340 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) | 377 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) |
341 # endif // defined(__GNUC__) | 378 # endif // defined(__GNUC__) |
342 # if defined(BOOST_ASIO_MSVC) | 379 # if defined(BOOST_ASIO_MSVC) |
343 # if (_MSC_VER >= 1700) | 380 # if (_MSC_VER >= 1700) |
344 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 | 381 # define BOOST_ASIO_HAS_STD_ADDRESSOF 1 |
345 # endif // (_MSC_VER >= 1700) | 382 # endif // (_MSC_VER >= 1700) |
348 #endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) | 385 #endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF) |
349 | 386 |
350 // Standard library support for the function class. | 387 // Standard library support for the function class. |
351 #if !defined(BOOST_ASIO_HAS_STD_FUNCTION) | 388 #if !defined(BOOST_ASIO_HAS_STD_FUNCTION) |
352 # if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION) | 389 # if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION) |
353 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 390 # if defined(__clang__) |
354 # define BOOST_ASIO_HAS_STD_FUNCTION 1 | 391 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
355 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 392 # define BOOST_ASIO_HAS_STD_FUNCTION 1 |
393 # elif (__cplusplus >= 201103) | |
394 # define BOOST_ASIO_HAS_STD_FUNCTION 1 | |
395 # endif // (__cplusplus >= 201103) | |
396 # endif // defined(__clang__) | |
356 # if defined(__GNUC__) | 397 # if defined(__GNUC__) |
357 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) | 398 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) |
358 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 399 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
359 # define BOOST_ASIO_HAS_STD_FUNCTION 1 | 400 # define BOOST_ASIO_HAS_STD_FUNCTION 1 |
360 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 401 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
369 #endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION) | 410 #endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION) |
370 | 411 |
371 // Standard library support for type traits. | 412 // Standard library support for type traits. |
372 #if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) | 413 #if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) |
373 # if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) | 414 # if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS) |
374 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 415 # if defined(__clang__) |
375 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 | 416 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
376 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 417 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 |
418 # elif (__cplusplus >= 201103) | |
419 # if __has_include(<type_traits>) | |
420 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 | |
421 # endif // __has_include(<type_traits>) | |
422 # endif // (__cplusplus >= 201103) | |
423 # endif // defined(__clang__) | |
377 # if defined(__GNUC__) | 424 # if defined(__GNUC__) |
378 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) | 425 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) |
379 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 426 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
380 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 | 427 # define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1 |
381 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 428 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
390 #endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) | 437 #endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS) |
391 | 438 |
392 // Standard library support for the cstdint header. | 439 // Standard library support for the cstdint header. |
393 #if !defined(BOOST_ASIO_HAS_CSTDINT) | 440 #if !defined(BOOST_ASIO_HAS_CSTDINT) |
394 # if !defined(BOOST_ASIO_DISABLE_CSTDINT) | 441 # if !defined(BOOST_ASIO_DISABLE_CSTDINT) |
395 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 442 # if defined(__clang__) |
396 # define BOOST_ASIO_HAS_CSTDINT 1 | 443 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
397 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 444 # define BOOST_ASIO_HAS_CSTDINT 1 |
445 # elif (__cplusplus >= 201103) | |
446 # define BOOST_ASIO_HAS_CSTDINT 1 | |
447 # endif // (__cplusplus >= 201103) | |
448 # endif // defined(__clang__) | |
398 # if defined(__GNUC__) | 449 # if defined(__GNUC__) |
399 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) | 450 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) |
400 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 451 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
401 # define BOOST_ASIO_HAS_CSTDINT 1 | 452 # define BOOST_ASIO_HAS_CSTDINT 1 |
402 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 453 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
411 #endif // !defined(BOOST_ASIO_HAS_CSTDINT) | 462 #endif // !defined(BOOST_ASIO_HAS_CSTDINT) |
412 | 463 |
413 // Standard library support for the thread class. | 464 // Standard library support for the thread class. |
414 #if !defined(BOOST_ASIO_HAS_STD_THREAD) | 465 #if !defined(BOOST_ASIO_HAS_STD_THREAD) |
415 # if !defined(BOOST_ASIO_DISABLE_STD_THREAD) | 466 # if !defined(BOOST_ASIO_DISABLE_STD_THREAD) |
416 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 467 # if defined(__clang__) |
417 # define BOOST_ASIO_HAS_STD_THREAD 1 | 468 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
418 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 469 # define BOOST_ASIO_HAS_STD_THREAD 1 |
470 # elif (__cplusplus >= 201103) | |
471 # if __has_include(<thread>) | |
472 # define BOOST_ASIO_HAS_STD_THREAD 1 | |
473 # endif // __has_include(<thread>) | |
474 # endif // (__cplusplus >= 201103) | |
475 # endif // defined(__clang__) | |
419 # if defined(__GNUC__) | 476 # if defined(__GNUC__) |
420 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) | 477 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) |
421 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 478 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
422 # define BOOST_ASIO_HAS_STD_THREAD 1 | 479 # define BOOST_ASIO_HAS_STD_THREAD 1 |
423 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 480 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
432 #endif // !defined(BOOST_ASIO_HAS_STD_THREAD) | 489 #endif // !defined(BOOST_ASIO_HAS_STD_THREAD) |
433 | 490 |
434 // Standard library support for the mutex and condition variable classes. | 491 // Standard library support for the mutex and condition variable classes. |
435 #if !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR) | 492 #if !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR) |
436 # if !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR) | 493 # if !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR) |
437 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 494 # if defined(__clang__) |
438 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 | 495 # if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) |
439 # endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX) | 496 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 |
497 # elif (__cplusplus >= 201103) | |
498 # if __has_include(<mutex>) | |
499 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 | |
500 # endif // __has_include(<mutex>) | |
501 # endif // (__cplusplus >= 201103) | |
502 # endif // defined(__clang__) | |
440 # if defined(__GNUC__) | 503 # if defined(__GNUC__) |
441 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) | 504 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) |
442 # if defined(__GXX_EXPERIMENTAL_CXX0X__) | 505 # if defined(__GXX_EXPERIMENTAL_CXX0X__) |
443 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 | 506 # define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1 |
444 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) | 507 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) |
454 | 517 |
455 // WinRT target. | 518 // WinRT target. |
456 #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) | 519 #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) |
457 # if defined(__cplusplus_winrt) | 520 # if defined(__cplusplus_winrt) |
458 # include <winapifamily.h> | 521 # include <winapifamily.h> |
459 # if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) | 522 # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ |
523 && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) | |
460 # define BOOST_ASIO_WINDOWS_RUNTIME 1 | 524 # define BOOST_ASIO_WINDOWS_RUNTIME 1 |
461 # endif // WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) | 525 # endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
526 // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) | |
462 # endif // defined(__cplusplus_winrt) | 527 # endif // defined(__cplusplus_winrt) |
463 #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) | 528 #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) |
464 | 529 |
465 // Windows target. Excludes WinRT. | 530 // Windows target. Excludes WinRT. |
466 #if !defined(BOOST_ASIO_WINDOWS) | 531 #if !defined(BOOST_ASIO_WINDOWS) |
543 # endif // !defined(UNDER_CE) | 608 # endif // !defined(UNDER_CE) |
544 # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400) | 609 # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400) |
545 # endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) | 610 # endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) |
546 #endif // !defined(BOOST_ASIO_HAS_IOCP) | 611 #endif // !defined(BOOST_ASIO_HAS_IOCP) |
547 | 612 |
613 // On POSIX (and POSIX-like) platforms we need to include unistd.h in order to | |
614 // get access to the various platform feature macros, e.g. to be able to test | |
615 // for threads support. | |
616 #if !defined(BOOST_ASIO_HAS_UNISTD_H) | |
617 # if !defined(BOOST_ASIO_HAS_BOOST_CONFIG) | |
618 # if defined(unix) \ | |
619 || defined(__unix) \ | |
620 || defined(_XOPEN_SOURCE) \ | |
621 || defined(_POSIX_SOURCE) \ | |
622 || (defined(__MACH__) && defined(__APPLE__)) \ | |
623 || defined(__FreeBSD__) \ | |
624 || defined(__NetBSD__) \ | |
625 || defined(__OpenBSD__) \ | |
626 || defined(__linux__) | |
627 # define BOOST_ASIO_HAS_UNISTD_H 1 | |
628 # endif | |
629 # endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG) | |
630 #endif // !defined(BOOST_ASIO_HAS_UNISTD_H) | |
631 #if defined(BOOST_ASIO_HAS_UNISTD_H) | |
632 # include <unistd.h> | |
633 #endif // defined(BOOST_ASIO_HAS_UNISTD_H) | |
634 | |
548 // Linux: epoll, eventfd and timerfd. | 635 // Linux: epoll, eventfd and timerfd. |
549 #if defined(__linux__) | 636 #if defined(__linux__) |
550 # include <linux/version.h> | 637 # include <linux/version.h> |
551 # if !defined(BOOST_ASIO_HAS_EPOLL) | 638 # if !defined(BOOST_ASIO_HAS_EPOLL) |
552 # if !defined(BOOST_ASIO_DISABLE_EPOLL) | 639 # if !defined(BOOST_ASIO_DISABLE_EPOLL) |
696 # define BOOST_ASIO_HAS_SIGNAL 1 | 783 # define BOOST_ASIO_HAS_SIGNAL 1 |
697 # endif // !defined(UNDER_CE) | 784 # endif // !defined(UNDER_CE) |
698 # endif // !defined(BOOST_ASIO_DISABLE_SIGNAL) | 785 # endif // !defined(BOOST_ASIO_DISABLE_SIGNAL) |
699 #endif // !defined(BOOST_ASIO_HAS_SIGNAL) | 786 #endif // !defined(BOOST_ASIO_HAS_SIGNAL) |
700 | 787 |
788 // Can use getaddrinfo() and getnameinfo(). | |
789 #if !defined(BOOST_ASIO_HAS_GETADDRINFO) | |
790 # if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) | |
791 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) | |
792 # define BOOST_ASIO_HAS_GETADDRINFO 1 | |
793 # elif defined(UNDER_CE) | |
794 # define BOOST_ASIO_HAS_GETADDRINFO 1 | |
795 # endif // defined(UNDER_CE) | |
796 # elif !(defined(__MACH__) && defined(__APPLE__)) | |
797 # define BOOST_ASIO_HAS_GETADDRINFO 1 | |
798 # endif // !(defined(__MACH__) && defined(__APPLE__)) | |
799 #endif // !defined(BOOST_ASIO_HAS_GETADDRINFO) | |
800 | |
701 // Whether standard iostreams are disabled. | 801 // Whether standard iostreams are disabled. |
702 #if !defined(BOOST_ASIO_NO_IOSTREAM) | 802 #if !defined(BOOST_ASIO_NO_IOSTREAM) |
703 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM) | 803 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM) |
704 # define BOOST_ASIO_NO_IOSTREAM 1 | 804 # define BOOST_ASIO_NO_IOSTREAM 1 |
705 # endif // !defined(BOOST_NO_IOSTREAM) | 805 # endif // !defined(BOOST_NO_IOSTREAM) |
716 #if !defined(BOOST_ASIO_NO_TYPEID) | 816 #if !defined(BOOST_ASIO_NO_TYPEID) |
717 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID) | 817 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID) |
718 # define BOOST_ASIO_NO_TYPEID 1 | 818 # define BOOST_ASIO_NO_TYPEID 1 |
719 # endif // !defined(BOOST_NO_TYPEID) | 819 # endif // !defined(BOOST_NO_TYPEID) |
720 #endif // !defined(BOOST_ASIO_NO_TYPEID) | 820 #endif // !defined(BOOST_ASIO_NO_TYPEID) |
721 | |
722 // On POSIX (and POSIX-like) platforms we need to include unistd.h in order to | |
723 // get access to the various platform feature macros, e.g. to be able to test | |
724 // for threads support. | |
725 #if !defined(BOOST_ASIO_HAS_UNISTD_H) | |
726 # if !defined(BOOST_ASIO_HAS_BOOST_CONFIG) | |
727 # if defined(unix) \ | |
728 || defined(__unix) \ | |
729 || defined(_XOPEN_SOURCE) \ | |
730 || defined(_POSIX_SOURCE) \ | |
731 || (defined(__MACH__) && defined(__APPLE__)) \ | |
732 || defined(__FreeBSD__) \ | |
733 || defined(__NetBSD__) \ | |
734 || defined(__OpenBSD__) \ | |
735 || defined(__linux__) | |
736 # define BOOST_ASIO_HAS_UNISTD_H 1 | |
737 # endif | |
738 # endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG) | |
739 #endif // !defined(BOOST_ASIO_HAS_UNISTD_H) | |
740 #if defined(BOOST_ASIO_HAS_UNISTD_H) | |
741 # include <unistd.h> | |
742 #endif // defined(BOOST_ASIO_HAS_UNISTD_H) | |
743 | 821 |
744 // Threads. | 822 // Threads. |
745 #if !defined(BOOST_ASIO_HAS_THREADS) | 823 #if !defined(BOOST_ASIO_HAS_THREADS) |
746 # if !defined(BOOST_ASIO_DISABLE_THREADS) | 824 # if !defined(BOOST_ASIO_DISABLE_THREADS) |
747 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS) | 825 # if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS) |