Fix 'WinSock.h has already been included' compiler error.

Fix compiler error if Boost.Asio & msgpack are used together on Windows
Platform
This commit is contained in:
Vasily Titskiy 2017-03-29 11:43:28 -04:00
parent bfc6e45a2f
commit 2cbaa3a7db

View File

@ -45,6 +45,9 @@
#ifdef _WIN32
# define _msgpack_atomic_counter_header <windows.h>
# if !defined(WIN32_LEAN_AND_MEAN)
# define WIN32_LEAN_AND_MEAN
# endif /* WIN32_LEAN_AND_MEAN */
typedef long _msgpack_atomic_counter_t;
# define _msgpack_sync_decr_and_fetch(ptr) InterlockedDecrement(ptr)
# define _msgpack_sync_incr_and_fetch(ptr) InterlockedIncrement(ptr)