aligned_alloc.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_ALIGN)
  17. #include <boost/align/detail/aligned_alloc.hpp>
  18. #elif defined(BOOST_ALIGN_USE_NEW)
  19. #include <boost/align/detail/aligned_alloc_new.hpp>
  20. #elif defined(_MSC_VER) && !defined(UNDER_CE)
  21. #include <boost/align/detail/aligned_alloc_msvc.hpp>
  22. #elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700)
  23. #include <boost/align/detail/aligned_alloc_msvc.hpp>
  24. #elif defined(__MINGW32__)
  25. #include <boost/align/detail/aligned_alloc_mingw.hpp>
  26. #elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
  27. #include <boost/align/detail/aligned_alloc_posix.hpp>
  28. #elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
  29. #include <boost/align/detail/aligned_alloc_macos.hpp>
  30. #elif defined(__ANDROID__)
  31. #include <boost/align/detail/aligned_alloc_android.hpp>
  32. #elif defined(__SunOS_5_11) || defined(__SunOS_5_12)
  33. #include <boost/align/detail/aligned_alloc_posix.hpp>
  34. #elif defined(sun) || defined(__sun)
  35. #include <boost/align/detail/aligned_alloc_sunos.hpp>
  36. #elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
  37. #include <boost/align/detail/aligned_alloc_posix.hpp>
  38. #else
  39. #include <boost/align/detail/aligned_alloc.hpp>
  40. #endif
  41. #endif