diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/asio/detail/impl/win_static_mutex.ipp | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/asio/detail/impl/win_static_mutex.ipp')
-rw-r--r-- | boost/asio/detail/impl/win_static_mutex.ipp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/boost/asio/detail/impl/win_static_mutex.ipp b/boost/asio/detail/impl/win_static_mutex.ipp index 3ec104da2b..84bd45473c 100644 --- a/boost/asio/detail/impl/win_static_mutex.ipp +++ b/boost/asio/detail/impl/win_static_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/win_static_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,7 +17,7 @@ #include <boost/asio/detail/config.hpp> -#if defined(BOOST_WINDOWS) +#if defined(BOOST_ASIO_WINDOWS) #include <cstdio> #include <boost/asio/detail/throw_error.hpp> @@ -42,12 +42,12 @@ int win_static_mutex::do_init() { using namespace std; // For sprintf. wchar_t mutex_name[128]; -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) - swprintf_s(mutex_name, 128, -#else // BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) - swprintf(mutex_name, -#endif // BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) - L"asio-58CCDC44-6264-4842-90C2-F3C545CB8AA7-%u-%p", +#if defined(BOOST_ASIO_HAS_SECURE_RTL) + swprintf_s( +#else // defined(BOOST_ASIO_HAS_SECURE_RTL) + _snwprintf( +#endif // defined(BOOST_ASIO_HAS_SECURE_RTL) + mutex_name, 128, L"asio-58CCDC44-6264-4842-90C2-F3C545CB8AA7-%u-%p", static_cast<unsigned int>(::GetCurrentProcessId()), this); HANDLE mutex = ::CreateMutexW(0, TRUE, mutex_name); @@ -115,6 +115,6 @@ int win_static_mutex::do_init() #include <boost/asio/detail/pop_options.hpp> -#endif // defined(BOOST_WINDOWS) +#endif // defined(BOOST_ASIO_WINDOWS) #endif // BOOST_ASIO_DETAIL_IMPL_WIN_STATIC_MUTEX_IPP |