limits.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifdef BOOST_HAS_PRAGMA_ONCE
  11. #pragma once
  12. #endif
  13. namespace boost {
  14. namespace winapi {
  15. #if defined( BOOST_USE_WINDOWS_H )
  16. BOOST_CONSTEXPR_OR_CONST DWORD_ MAX_PATH_ = MAX_PATH;
  17. #else
  18. BOOST_CONSTEXPR_OR_CONST DWORD_ MAX_PATH_ = 260;
  19. #endif
  20. #if defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW )
  21. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_BYTES_ = UNICODE_STRING_MAX_BYTES;
  22. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_CHARS_ = UNICODE_STRING_MAX_CHARS;
  23. #else
  24. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_BYTES_ = 65534;
  25. BOOST_CONSTEXPR_OR_CONST DWORD_ UNICODE_STRING_MAX_CHARS_ = 32767;
  26. #endif
  27. BOOST_CONSTEXPR_OR_CONST DWORD_ max_path = MAX_PATH_;
  28. BOOST_CONSTEXPR_OR_CONST DWORD_ unicode_string_max_bytes = UNICODE_STRING_MAX_BYTES_;
  29. BOOST_CONSTEXPR_OR_CONST DWORD_ unicode_string_max_chars = UNICODE_STRING_MAX_CHARS_;
  30. }
  31. }
  32. #endif // BOOST_WINAPI_LIMITS_HPP_INCLUDED_