From 780d8dcb959ac71d7d0b1265761a9e2e3bdebb29 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 18 Oct 2001 10:18:37 +0000 Subject: [PATCH] Updated BOOST_HAS_NANOSLEEP tests. [SVN r11398] --- include/boost/config/platform/linux.hpp | 4 ++++ include/boost/config/posix_features.hpp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/config/platform/linux.hpp b/include/boost/config/platform/linux.hpp index 1e2cc1f7..218cefbc 100644 --- a/include/boost/config/platform/linux.hpp +++ b/include/boost/config/platform/linux.hpp @@ -33,6 +33,10 @@ # define BOOST_HAS_GETTIMEOFDAY #endif +#ifdef __USE_POSIX199309 +# define BOOST_HAS_NANOSLEEP +#endif + #if defined(__GLIBC__) && defined(__GLIBC_PREREQ) // __GLIBC_PREREQ is available since 2.1.2 diff --git a/include/boost/config/posix_features.hpp b/include/boost/config/posix_features.hpp index fc4271b4..8bd39e58 100644 --- a/include/boost/config/posix_features.hpp +++ b/include/boost/config/posix_features.hpp @@ -31,9 +31,12 @@ # endif // BOOST_HAS_NANOSLEEP: - // This is predicated on _POSIX_TIMERS: + // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: # if defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0) # define BOOST_HAS_NANOSLEEP +# endif +# if defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0) && !defined(BOOST_HAS_NANOSLEEP) +# define BOOST_HAS_NANOSLEEP # endif // BOOST_HAS_SCHED_YIELD: