os/ossrv/ossrv_pub/boost_apis/boost/config/posix_features.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/config/posix_features.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,95 @@
     1.4 +//  (C) Copyright John Maddock 2001 - 2003. 
     1.5 +//  Use, modification and distribution are subject to the 
     1.6 +//  Boost Software License, Version 1.0. (See accompanying file 
     1.7 +//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     1.8 +
     1.9 +
    1.10 +//  See http://www.boost.org for most recent version.
    1.11 +
    1.12 +// All POSIX feature tests go in this file,
    1.13 +// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
    1.14 +// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
    1.15 +// may be present but none-functional unless _POSIX_C_SOURCE and
    1.16 +// _XOPEN_SOURCE have been defined to the right value (it's up
    1.17 +// to the user to do this *before* including any header, although
    1.18 +// in most cases the compiler will do this for you).
    1.19 +
    1.20 +#  if defined(BOOST_HAS_UNISTD_H)
    1.21 +#     include <unistd.h>
    1.22 +
    1.23 +      // XOpen has <nl_types.h>, but is this the correct version check?
    1.24 +#     if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
    1.25 +#        define BOOST_HAS_NL_TYPES_H
    1.26 +#     endif
    1.27 +
    1.28 +      // POSIX version 6 requires <stdint.h>
    1.29 +#     if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
    1.30 +#        define BOOST_HAS_STDINT_H
    1.31 +#     endif
    1.32 +
    1.33 +      // POSIX version 2 requires <dirent.h>
    1.34 +#     if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
    1.35 +#        define BOOST_HAS_DIRENT_H
    1.36 +#     endif
    1.37 +
    1.38 +      // POSIX version 3 requires <signal.h> to have sigaction:
    1.39 +#     if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
    1.40 +#        define BOOST_HAS_SIGACTION
    1.41 +#     endif
    1.42 +      // POSIX defines _POSIX_THREADS > 0 for pthread support,
    1.43 +      // however some platforms define _POSIX_THREADS without
    1.44 +      // a value, hence the (_POSIX_THREADS+0 >= 0) check.
    1.45 +      // Strictly speaking this may catch platforms with a
    1.46 +      // non-functioning stub <pthreads.h>, but such occurrences should
    1.47 +      // occur very rarely if at all.
    1.48 +#     if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
    1.49 +#        define BOOST_HAS_PTHREADS
    1.50 +#     endif
    1.51 +
    1.52 +      // BOOST_HAS_NANOSLEEP:
    1.53 +      // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
    1.54 +#     if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
    1.55 +             || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
    1.56 +#        define BOOST_HAS_NANOSLEEP
    1.57 +#     endif
    1.58 +
    1.59 +      // BOOST_HAS_CLOCK_GETTIME:
    1.60 +      // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
    1.61 +      // but at least one platform - linux - defines that flag without
    1.62 +      // defining clock_gettime):
    1.63 +#     if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
    1.64 +#        define BOOST_HAS_CLOCK_GETTIME
    1.65 +#     endif
    1.66 +
    1.67 +      // BOOST_HAS_SCHED_YIELD:
    1.68 +      // This is predicated on _POSIX_PRIORITY_SCHEDULING or
    1.69 +      // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
    1.70 +#     if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
    1.71 +            || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
    1.72 +            || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
    1.73 +#        define BOOST_HAS_SCHED_YIELD
    1.74 +#     endif
    1.75 +
    1.76 +      // BOOST_HAS_GETTIMEOFDAY:
    1.77 +      // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
    1.78 +      // These are predicated on _XOPEN_VERSION, and appears to be first released
    1.79 +      // in issue 4, version 2 (_XOPEN_VERSION > 500).
    1.80 +      // Likewise for the functions log1p and expm1.
    1.81 +#     if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
    1.82 +#        define BOOST_HAS_GETTIMEOFDAY
    1.83 +#        if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
    1.84 +#           define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
    1.85 +#        endif
    1.86 +#        ifndef BOOST_HAS_LOG1P
    1.87 +#           define BOOST_HAS_LOG1P
    1.88 +#        endif
    1.89 +#        ifndef BOOST_HAS_EXPM1
    1.90 +#           define BOOST_HAS_EXPM1
    1.91 +#        endif
    1.92 +#     endif
    1.93 +
    1.94 +#  endif
    1.95 +
    1.96 +
    1.97 +
    1.98 +