apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: apr/atomic/win32 apr_atomic.c
Date Mon, 20 Sep 2004 19:20:13 GMT
ake         2004/09/20 12:20:12

  Modified:    atomic/win32 apr_atomic.c
  Log:
  WIN64: avoid unresolved external error with 64 bit build
  
  Revision  Changes    Path
  1.5       +8 -0      apr/atomic/win32/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/win32/apr_atomic.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_atomic.c	16 Apr 2004 13:54:19 -0000	1.4
  +++ apr_atomic.c	20 Sep 2004 19:20:12 -0000	1.5
  @@ -40,7 +40,11 @@
   
   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(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)
  
  
  

Mime
View raw message