cpp: fixes problem that InterlockedIncrement/Decrement are not found on _WIN32 platform

This commit is contained in:
FURUHASHI Sadayuki 2011-02-24 00:21:54 +09:00
parent 67ab510b5d
commit 0d5708a01d
4 changed files with 9 additions and 4 deletions

View file

@ -38,6 +38,7 @@ typedef unsigned __int64 uint64_t;
#ifdef _WIN32
#define _msgpack_atomic_counter_header <windows.h>
typedef long _msgpack_atomic_counter_t;
#define _msgpack_sync_decr_and_fetch(ptr) InterlockedDecrement(ptr)
#define _msgpack_sync_incr_and_fetch(ptr) InterlockedIncrement(ptr)