free.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
  26. # define BOOST_OS_BSD_AVAILABLE
  27. # endif
  28. # undef BOOST_OS_BSD_FREE
  29. # include <sys/param.h>
  30. # if defined(__FreeBSD_version)
  31. # if __FreeBSD_version == 491000
  32. # define BOOST_OS_BSD_FREE \
  33. BOOST_VERSION_NUMBER(4, 10, 0)
  34. # elif __FreeBSD_version == 492000
  35. # define BOOST_OS_BSD_FREE \
  36. BOOST_VERSION_NUMBER(4, 11, 0)
  37. # elif __FreeBSD_version < 500000
  38. # define BOOST_OS_BSD_FREE \
  39. BOOST_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version)
  40. # else
  41. # define BOOST_OS_BSD_FREE \
  42. BOOST_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version)
  43. # endif
  44. # else
  45. # define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE
  46. # endif
  47. #endif
  48. #if BOOST_OS_BSD_FREE
  49. # define BOOST_OS_BSD_FREE_AVAILABLE
  50. # include <boost/predef/detail/os_detected.h>
  51. #endif
  52. #define BOOST_OS_BSD_FREE_NAME "Free BSD"
  53. #endif
  54. #include <boost/predef/detail/test.h>
  55. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME)