free.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. /* tag::reference[]
  11. = `BOOST_OS_BSD_FREE`
  12. http://en.wikipedia.org/wiki/Freebsd[FreeBSD] operating system.
  13. [options="header"]
  14. |===
  15. | {predef_symbol} | {predef_version}
  16. | `+__FreeBSD__+` | {predef_detection}
  17. | `+__FreeBSD_version+` | V.R.P
  18. |===
  19. */ // end::reference[]
  20. #define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE
  21. #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
  22. defined(__FreeBSD__) \
  23. )
  24. # ifndef BOOST_OS_BSD_AVAILABLE
  25. # undef BOOST_OS_BSD
  26. # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
  27. # define BOOST_OS_BSD_AVAILABLE
  28. # endif
  29. # undef BOOST_OS_BSD_FREE
  30. # include <sys/param.h>
  31. # if defined(__FreeBSD_version)
  32. # if __FreeBSD_version == 491000
  33. # define BOOST_OS_BSD_FREE \
  34. BOOST_VERSION_NUMBER(4, 10, 0)
  35. # elif __FreeBSD_version == 492000
  36. # define BOOST_OS_BSD_FREE \
  37. BOOST_VERSION_NUMBER(4, 11, 0)
  38. # elif __FreeBSD_version < 500000
  39. # define BOOST_OS_BSD_FREE \
  40. BOOST_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version)
  41. # else
  42. # define BOOST_OS_BSD_FREE \
  43. BOOST_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version)
  44. # endif
  45. # else
  46. # define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE
  47. # endif
  48. #endif
  49. #if BOOST_OS_BSD_FREE
  50. # define BOOST_OS_BSD_FREE_AVAILABLE
  51. # include <boost/predef/detail/os_detected.h>
  52. #endif
  53. #define BOOST_OS_BSD_FREE_NAME "Free BSD"
  54. #endif
  55. #include <boost/predef/detail/test.h>
  56. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME)