posix_time_types_wrk.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
  4. // Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/interprocess for documentation.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #ifndef BOOST_INTERPROCESS_POSIX_TIMES_WRK_HPP
  11. #define BOOST_INTERPROCESS_POSIX_TIMES_WRK_HPP
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #
  16. #if defined(BOOST_HAS_PRAGMA_ONCE)
  17. # pragma once
  18. #endif
  19. //workaround to avoid winsock redefines when using date-time
  20. #ifdef _WIN32
  21. #ifndef WIN32_LEAN_AND_MEAN
  22. #define WIN32_LEAN_AND_MEAN
  23. #define BOOST_INTERPROCESS_WIN32_LEAN_AND_MEAN
  24. #endif //#ifndef WIN32_LEAN_AND_MEAN
  25. #endif //#ifdef _WIN32
  26. #include <boost/date_time/microsec_time_clock.hpp>
  27. #include <boost/date_time/posix_time/ptime.hpp>
  28. #include <boost/date_time/posix_time/posix_time_duration.hpp>
  29. namespace boost {
  30. namespace interprocess {
  31. typedef boost::date_time::microsec_clock<boost::posix_time::ptime> microsec_clock;
  32. }
  33. }
  34. #ifdef _WIN32
  35. #ifdef BOOST_INTERPROCESS_WIN32_LEAN_AND_MEAN
  36. #undef WIN32_LEAN_AND_MEAN
  37. #undef BOOST_INTERPROCESS_WIN32_LEAN_AND_MEAN
  38. #endif //#ifdef BOOST_INTERPROCESS_WIN32_LEAN_AND_MEAN
  39. #endif //#ifdef _WIN32
  40. #endif //#ifndef BOOST_INTERPROCESS_POSIX_TIMES_WRK_HPP