|
||||
File indexing completed on 2025-01-18 09:30:07
0001 // (C) Copyright John Maddock 2001 - 2003. 0002 // Use, modification and distribution are subject to the 0003 // Boost Software License, Version 1.0. (See accompanying file 0004 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 0005 0006 0007 // See http://www.boost.org for most recent version. 0008 0009 // All POSIX feature tests go in this file, 0010 // Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well 0011 // _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's 0012 // may be present but none-functional unless _POSIX_C_SOURCE and 0013 // _XOPEN_SOURCE have been defined to the right value (it's up 0014 // to the user to do this *before* including any header, although 0015 // in most cases the compiler will do this for you). 0016 0017 # if defined(BOOST_HAS_UNISTD_H) 0018 # include <unistd.h> 0019 0020 // XOpen has <nl_types.h>, but is this the correct version check? 0021 # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) 0022 # define BOOST_HAS_NL_TYPES_H 0023 # endif 0024 0025 // POSIX version 6 requires <stdint.h> 0026 # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) 0027 # define BOOST_HAS_STDINT_H 0028 # endif 0029 0030 // POSIX version 2 requires <dirent.h> 0031 # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) 0032 # define BOOST_HAS_DIRENT_H 0033 # endif 0034 0035 // POSIX version 3 requires <signal.h> to have sigaction: 0036 # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) 0037 # define BOOST_HAS_SIGACTION 0038 # endif 0039 // POSIX defines _POSIX_THREADS > 0 for pthread support, 0040 // however some platforms define _POSIX_THREADS without 0041 // a value, hence the (_POSIX_THREADS+0 >= 0) check. 0042 // Strictly speaking this may catch platforms with a 0043 // non-functioning stub <pthreads.h>, but such occurrences should 0044 // occur very rarely if at all. 0045 # if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) 0046 # define BOOST_HAS_PTHREADS 0047 # endif 0048 0049 // BOOST_HAS_NANOSLEEP: 0050 // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: 0051 # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ 0052 || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) 0053 # define BOOST_HAS_NANOSLEEP 0054 # endif 0055 0056 // BOOST_HAS_CLOCK_GETTIME: 0057 // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME 0058 // but at least one platform - linux - defines that flag without 0059 // defining clock_gettime): 0060 # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) 0061 # define BOOST_HAS_CLOCK_GETTIME 0062 # endif 0063 0064 // BOOST_HAS_SCHED_YIELD: 0065 // This is predicated on _POSIX_PRIORITY_SCHEDULING or 0066 // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. 0067 # if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ 0068 || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ 0069 || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) 0070 # define BOOST_HAS_SCHED_YIELD 0071 # endif 0072 0073 // BOOST_HAS_GETTIMEOFDAY: 0074 // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: 0075 // These are predicated on _XOPEN_VERSION, and appears to be first released 0076 // in issue 4, version 2 (_XOPEN_VERSION > 500). 0077 // Likewise for the functions log1p and expm1. 0078 # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) 0079 # define BOOST_HAS_GETTIMEOFDAY 0080 # if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) 0081 # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 0082 # endif 0083 # ifndef BOOST_HAS_LOG1P 0084 # define BOOST_HAS_LOG1P 0085 # endif 0086 # ifndef BOOST_HAS_EXPM1 0087 # define BOOST_HAS_EXPM1 0088 # endif 0089 # endif 0090 0091 # endif 0092 0093 0094 0095
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |