cygwin.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. // See http://www.boost.org for most recent version.
  6. // cygwin specific config options:
  7. #define BOOST_PLATFORM "Cygwin"
  8. #define BOOST_HAS_DIRENT_H
  9. #define BOOST_HAS_LOG1P
  10. #define BOOST_HAS_EXPM1
  11. //
  12. // Threading API:
  13. // See if we have POSIX threads, if we do use them, otherwise
  14. // revert to native Win threads.
  15. #define BOOST_HAS_UNISTD_H
  16. #include <unistd.h>
  17. #if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
  18. # define BOOST_HAS_PTHREADS
  19. # define BOOST_HAS_SCHED_YIELD
  20. # define BOOST_HAS_GETTIMEOFDAY
  21. # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
  22. # define BOOST_HAS_SIGACTION
  23. #else
  24. # if !defined(BOOST_HAS_WINTHREADS)
  25. # define BOOST_HAS_WINTHREADS
  26. # endif
  27. # define BOOST_HAS_FTIME
  28. #endif
  29. //
  30. // find out if we have a stdint.h, there should be a better way to do this:
  31. //
  32. #include <sys/types.h>
  33. #ifdef _STDINT_H
  34. #define BOOST_HAS_STDINT_H
  35. #endif
  36. /// Cygwin has no fenv.h
  37. #define BOOST_NO_FENV_H
  38. // boilerplate code:
  39. #include <boost/config/posix_features.hpp>
  40. //
  41. // Cygwin lies about XSI conformance, there is no nl_types.h:
  42. //
  43. #ifdef BOOST_HAS_NL_TYPES_H
  44. # undef BOOST_HAS_NL_TYPES_H
  45. #endif