]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/config/posix_features.hpp
update boost to pre-1.30.0
[lyx.git] / boost / boost / config / posix_features.hpp
index 2d9ec29fdb5f258e3a3356cb9a775e2336cbbb41..81979c3ff987a3f79a6076e857da8d1b6e000672 100644 (file)
@@ -5,9 +5,15 @@
 
 //  See http://www.boost.org for most recent version.
 
-// All POSIX feature tests go in this file:
+// All POSIX feature tests go in this file,
+// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
+// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
+// may be present but none-functional unless _POSIX_C_SOURCE and
+// _XOPEN_SOURCE have been defined to the right value (it's up
+// to the user to do this *before* including any header, although
+// in most cases the compiler will do this for you).
 
-#  ifdef BOOST_HAS_UNISTD_H
+#  if defined(BOOST_HAS_UNISTD_H)
 #     include <unistd.h>
 
       // XOpen has <nl_types.h>, but is this the correct version check?
 #        define BOOST_HAS_DIRENT_H
 #     endif
 
+      // POSIX version 3 requires <signal.h> to have sigaction:
+#     if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
+#        define BOOST_HAS_SIGACTION
+#     endif
       // POSIX defines _POSIX_THREADS > 0 for pthread support,
       // however some platforms define _POSIX_THREADS without
       // a value, hence the (_POSIX_THREADS+0 >= 0) check.
       // Strictly speaking this may catch platforms with a
       // non-functioning stub <pthreads.h>, but such occurrences should
       // occur very rarely if at all.
-#     if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
+#     if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
 #        define BOOST_HAS_PTHREADS
 #     endif
 
       // in issue 4, version 2 (_XOPEN_VERSION > 500).
 #     if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
 #        define BOOST_HAS_GETTIMEOFDAY
-#        define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#        if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#           define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#        endif
 #     endif
 
 #  endif
+
+