limits.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright 2016 Andrey Semashev
  3. *
  4. * Distributed under the Boost Software License, Version 1.0.
  5. * See http://www.boost.org/LICENSE_1_0.txt
  6. */
  7. #ifndef BOOST_WINAPI_LIMITS_HPP_INCLUDED_
  8. #define BOOST_WINAPI_LIMITS_HPP_INCLUDED_
  9. #include <boost/winapi/basic_types.hpp>
  10. #include <boost/winapi/detail/header.hpp>
  11. #ifdef BOOST_HAS_PRAGMA_ONCE
  12. #pragma once
  13. #endif
  14. namespace boost {
  15. namespace winapi {
  16. #if defined( BOOST_USE_WINDOWS_H )
  17. BOOST_CONSTEXPR_OR_CONST DWORD_ MAX_PATH_ = MAX_PATH;
  18. #else
  19. BOOST_CONSTEXPR_OR_CONST DWORD_ MAX_PATH_ = 260;
  20. #endif
  21. #if defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW )
  22. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_BYTES_ = UNICODE_STRING_MAX_BYTES;
  23. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_CHARS_ = UNICODE_STRING_MAX_CHARS;
  24. #else
  25. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_BYTES_ = 65534;
  26. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_CHARS_ = 32767;
  27. #endif
  28. BOOST_CONSTEXPR_OR_CONST DWORD_ max_path = MAX_PATH_;
  29. BOOST_CONSTEXPR_OR_CONST DWORD_ unicode_string_max_bytes = UNICODE_STRING_MAX_BYTES_;
  30. BOOST_CONSTEXPR_OR_CONST DWORD_ unicode_string_max_chars = UNICODE_STRING_MAX_CHARS_;
  31. }
  32. }
  33. #include <boost/winapi/detail/footer.hpp>
  34. #endif // BOOST_WINAPI_LIMITS_HPP_INCLUDED_