free.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. Copyright Rene Rivera 2012-2015
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_PREDEF_OS_BSD_FREE_H
  8. #define BOOST_PREDEF_OS_BSD_FREE_H
  9. #include <boost/predef/os/bsd.h>
  10. /*`
  11. [heading `BOOST_OS_BSD_FREE`]
  12. [@http://en.wikipedia.org/wiki/Freebsd FreeBSD] operating system.
  13. [table
  14. [[__predef_symbol__] [__predef_version__]]
  15. [[`__FreeBSD__`] [__predef_detection__]]
  16. [[`__FreeBSD_version`] [V.R.P]]
  17. ]
  18. */
  19. #define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE
  20. #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
  21. defined(__FreeBSD__) \
  22. )
  23. # ifndef BOOST_OS_BSD_AVAILABLE
  24. # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
  25. # define BOOST_OS_BSD_AVAILABLE
  26. # endif
  27. # undef BOOST_OS_BSD_FREE
  28. # include <sys/param.h>
  29. # if defined(__FreeBSD_version)
  30. # if __FreeBSD_version == 491000
  31. # define BOOST_OS_BSD_FREE \
  32. BOOST_VERSION_NUMBER(4, 10, 0)
  33. # elif __FreeBSD_version == 492000
  34. # define BOOST_OS_BSD_FREE \
  35. BOOST_VERSION_NUMBER(4, 11, 0)
  36. # elif __FreeBSD_version < 500000
  37. # define BOOST_OS_BSD_FREE \
  38. BOOST_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version)
  39. # else
  40. # define BOOST_OS_BSD_FREE \
  41. BOOST_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version)
  42. # endif
  43. # else
  44. # define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE
  45. # endif
  46. #endif
  47. #if BOOST_OS_BSD_FREE
  48. # define BOOST_OS_BSD_FREE_AVAILABLE
  49. # include <boost/predef/detail/os_detected.h>
  50. #endif
  51. #define BOOST_OS_BSD_FREE_NAME "Free BSD"
  52. #endif
  53. #include <boost/predef/detail/test.h>
  54. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME)