annotate DEPENDENCIES/generic/include/boost/config/posix_features.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // (C) Copyright John Maddock 2001 - 2003.
Chris@16 2 // Use, modification and distribution are subject to the
Chris@16 3 // Boost Software License, Version 1.0. (See accompanying file
Chris@16 4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5
Chris@16 6
Chris@16 7 // See http://www.boost.org for most recent version.
Chris@16 8
Chris@16 9 // All POSIX feature tests go in this file,
Chris@16 10 // Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
Chris@16 11 // _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
Chris@16 12 // may be present but none-functional unless _POSIX_C_SOURCE and
Chris@16 13 // _XOPEN_SOURCE have been defined to the right value (it's up
Chris@16 14 // to the user to do this *before* including any header, although
Chris@16 15 // in most cases the compiler will do this for you).
Chris@16 16
Chris@16 17 # if defined(BOOST_HAS_UNISTD_H)
Chris@16 18 # include <unistd.h>
Chris@16 19
Chris@16 20 // XOpen has <nl_types.h>, but is this the correct version check?
Chris@16 21 # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
Chris@16 22 # define BOOST_HAS_NL_TYPES_H
Chris@16 23 # endif
Chris@16 24
Chris@16 25 // POSIX version 6 requires <stdint.h>
Chris@16 26 # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
Chris@16 27 # define BOOST_HAS_STDINT_H
Chris@16 28 # endif
Chris@16 29
Chris@16 30 // POSIX version 2 requires <dirent.h>
Chris@16 31 # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
Chris@16 32 # define BOOST_HAS_DIRENT_H
Chris@16 33 # endif
Chris@16 34
Chris@16 35 // POSIX version 3 requires <signal.h> to have sigaction:
Chris@16 36 # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
Chris@16 37 # define BOOST_HAS_SIGACTION
Chris@16 38 # endif
Chris@16 39 // POSIX defines _POSIX_THREADS > 0 for pthread support,
Chris@16 40 // however some platforms define _POSIX_THREADS without
Chris@16 41 // a value, hence the (_POSIX_THREADS+0 >= 0) check.
Chris@16 42 // Strictly speaking this may catch platforms with a
Chris@16 43 // non-functioning stub <pthreads.h>, but such occurrences should
Chris@16 44 // occur very rarely if at all.
Chris@16 45 # if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
Chris@16 46 # define BOOST_HAS_PTHREADS
Chris@16 47 # endif
Chris@16 48
Chris@16 49 // BOOST_HAS_NANOSLEEP:
Chris@16 50 // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
Chris@16 51 # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
Chris@16 52 || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
Chris@16 53 # define BOOST_HAS_NANOSLEEP
Chris@16 54 # endif
Chris@16 55
Chris@16 56 // BOOST_HAS_CLOCK_GETTIME:
Chris@16 57 // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
Chris@16 58 // but at least one platform - linux - defines that flag without
Chris@16 59 // defining clock_gettime):
Chris@16 60 # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
Chris@16 61 # define BOOST_HAS_CLOCK_GETTIME
Chris@16 62 # endif
Chris@16 63
Chris@16 64 // BOOST_HAS_SCHED_YIELD:
Chris@16 65 // This is predicated on _POSIX_PRIORITY_SCHEDULING or
Chris@16 66 // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
Chris@16 67 # if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
Chris@16 68 || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
Chris@16 69 || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
Chris@16 70 # define BOOST_HAS_SCHED_YIELD
Chris@16 71 # endif
Chris@16 72
Chris@16 73 // BOOST_HAS_GETTIMEOFDAY:
Chris@16 74 // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
Chris@16 75 // These are predicated on _XOPEN_VERSION, and appears to be first released
Chris@16 76 // in issue 4, version 2 (_XOPEN_VERSION > 500).
Chris@16 77 // Likewise for the functions log1p and expm1.
Chris@16 78 # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
Chris@16 79 # define BOOST_HAS_GETTIMEOFDAY
Chris@16 80 # if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
Chris@16 81 # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
Chris@16 82 # endif
Chris@16 83 # ifndef BOOST_HAS_LOG1P
Chris@16 84 # define BOOST_HAS_LOG1P
Chris@16 85 # endif
Chris@16 86 # ifndef BOOST_HAS_EXPM1
Chris@16 87 # define BOOST_HAS_EXPM1
Chris@16 88 # endif
Chris@16 89 # endif
Chris@16 90
Chris@16 91 # endif
Chris@16 92
Chris@16 93
Chris@16 94
Chris@16 95