diff options
author | ake <ake@13f79535-47bb-0310-9956-ffa450edef68> | 2004-09-20 19:20:12 +0000 |
---|---|---|
committer | ake <ake@13f79535-47bb-0310-9956-ffa450edef68> | 2004-09-20 19:20:12 +0000 |
commit | 3b6f1940b320afa6cc75a5e4d92fdf93e4d17230 (patch) | |
tree | fb159b42ecf45a664b8838c7a05366543efde011 /atomic | |
parent | a8a3bd30d79225e6a431a9edae71ae1ce7356405 (diff) | |
download | libapr-3b6f1940b320afa6cc75a5e4d92fdf93e4d17230.tar.gz |
WIN64: avoid unresolved external error with 64 bit build
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65336 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'atomic')
-rw-r--r-- | atomic/win32/apr_atomic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/atomic/win32/apr_atomic.c b/atomic/win32/apr_atomic.c index d83d60c89..b42a2028e 100644 --- a/atomic/win32/apr_atomic.c +++ b/atomic/win32/apr_atomic.c @@ -40,7 +40,11 @@ typedef WINBASEAPI void * (WINAPI * apr_atomic_win32_ptr_ptr_ptr_fn) APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val) { +#if (defined(_M_IA64) || defined(_M_AMD64)) + return InterlockedExchangeAdd(mem, val); +#else return ((apr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, val); +#endif } /* Of course we want the 2's compliment of the unsigned value, val */ @@ -48,7 +52,11 @@ APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint3 APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val) { +#if (defined(_M_IA64) || defined(_M_AMD64)) + InterlockedExchangeAdd(mem, -val); +#else ((apr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, -val); +#endif } APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem) |