Brian Silverman | 9d8fa39 | 2018-08-04 17:09:24 -0700 | [diff] [blame^] | 1 | // (C) Copyright John Maddock 2001 - 2003. |
| 2 | // Use, modification and distribution are subject to the |
| 3 | // Boost Software License, Version 1.0. (See accompanying file |
| 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 | |
| 6 | // See http://www.boost.org for most recent version. |
| 7 | |
| 8 | // cygwin specific config options: |
| 9 | |
| 10 | #define BOOST_PLATFORM "Cygwin" |
| 11 | #define BOOST_HAS_DIRENT_H |
| 12 | #define BOOST_HAS_LOG1P |
| 13 | #define BOOST_HAS_EXPM1 |
| 14 | |
| 15 | // |
| 16 | // Threading API: |
| 17 | // See if we have POSIX threads, if we do use them, otherwise |
| 18 | // revert to native Win threads. |
| 19 | #define BOOST_HAS_UNISTD_H |
| 20 | #include <unistd.h> |
| 21 | #if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) |
| 22 | # define BOOST_HAS_PTHREADS |
| 23 | # define BOOST_HAS_SCHED_YIELD |
| 24 | # define BOOST_HAS_GETTIMEOFDAY |
| 25 | # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE |
| 26 | //# define BOOST_HAS_SIGACTION |
| 27 | #else |
| 28 | # if !defined(BOOST_HAS_WINTHREADS) |
| 29 | # define BOOST_HAS_WINTHREADS |
| 30 | # endif |
| 31 | # define BOOST_HAS_FTIME |
| 32 | #endif |
| 33 | |
| 34 | // |
| 35 | // find out if we have a stdint.h, there should be a better way to do this: |
| 36 | // |
| 37 | #include <sys/types.h> |
| 38 | #ifdef _STDINT_H |
| 39 | #define BOOST_HAS_STDINT_H |
| 40 | #endif |
| 41 | #if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H) |
| 42 | # define BOOST_HAS_STDINT_H |
| 43 | #endif |
| 44 | |
| 45 | /// Cygwin has no fenv.h |
| 46 | #define BOOST_NO_FENV_H |
| 47 | |
| 48 | // Cygwin has it's own <pthread.h> which breaks <shared_mutex> unless the correct compiler flags are used: |
| 49 | #ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX |
| 50 | #include <pthread.h> |
| 51 | #if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112) |
| 52 | # define BOOST_NO_CXX14_HDR_SHARED_MUTEX |
| 53 | #endif |
| 54 | #endif |
| 55 | |
| 56 | // boilerplate code: |
| 57 | #include <boost/config/detail/posix_features.hpp> |
| 58 | |
| 59 | // |
| 60 | // Cygwin lies about XSI conformance, there is no nl_types.h: |
| 61 | // |
| 62 | #ifdef BOOST_HAS_NL_TYPES_H |
| 63 | # undef BOOST_HAS_NL_TYPES_H |
| 64 | #endif |
| 65 | |
| 66 | |
| 67 | |
| 68 | |