Merge pull request #582 from qehgt/fix-winsock-already-included

Fix 'WinSock.h has already been included' compiler error.
This commit is contained in:
Takatoshi Kondo
2017-04-12 20:44:56 +09:00
committed by GitHub

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)