aligned_alloc.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. Copyright 2014-2015 Glen Joseph Fernandes
  3. (glenjofe@gmail.com)
  4. Distributed under the Boost Software License, Version 1.0.
  5. (http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_ALIGN_ALIGNED_ALLOC_HPP
  8. #define BOOST_ALIGN_ALIGNED_ALLOC_HPP
  9. #include <boost/config.hpp>
  10. #if defined(BOOST_HAS_UNISTD_H)
  11. #include <unistd.h>
  12. #endif
  13. #if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh)
  14. #include <AvailabilityMacros.h>
  15. #endif
  16. #if defined(BOOST_ALIGN_USE_ALLOCATE)
  17. #include <boost/align/detail/aligned_alloc.hpp>
  18. #elif defined(_MSC_VER) && !defined(UNDER_CE)
  19. #include <boost/align/detail/aligned_alloc_msvc.hpp>
  20. #elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700)
  21. #include <boost/align/detail/aligned_alloc_msvc.hpp>
  22. #elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
  23. #include <boost/align/detail/aligned_alloc_posix.hpp>
  24. #elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
  25. #include <boost/align/detail/aligned_alloc_macos.hpp>
  26. #elif defined(__ANDROID__)
  27. #include <boost/align/detail/aligned_alloc_android.hpp>
  28. #elif defined(__SunOS_5_11) || defined(__SunOS_5_12)
  29. #include <boost/align/detail/aligned_alloc_posix.hpp>
  30. #elif defined(sun) || defined(__sun)
  31. #include <boost/align/detail/aligned_alloc_sunos.hpp>
  32. #elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
  33. #include <boost/align/detail/aligned_alloc_posix.hpp>
  34. #else
  35. #include <boost/align/detail/aligned_alloc.hpp>
  36. #endif
  37. #endif