> -----Original Message----- > From: Brian Pane > > Changes not yet made: > - Removal of the old API (I saw two comments in favor > of this, including my own; I'll wait for an official > 3 +1s and no -1s before I start deleting stuff) > - Return values for the add, subtract, and inc functions > (I haven't figured out a way to implement these > efficiently) > > Brian > >
I have a patch (send It back in April) that enable to use the atomic from C++ on WIN32. The problem is the fact that C++ distinguishes unsigned int and LONG mixage as an error. Unlike the other platforms for WIN32 the apr_atomic_t is 'typedefed' so later in the header it is reverted from LONG to apr_uint32_t, so the IntelockedXX functions gets apr_uint32_t as a param, and C++ reports that as an error. The patch simply #defines the apr_atomic_t as LONG. MT.
RCS file: /home/cvspublic/apr/include/apr_atomic.h,v retrieving revision 1.52 diff -u -r1.52 apr_atomic.h --- apr_atomic.h 14 Sep 2003 02:56:52 -0000 1.52 +++ apr_atomic.h 19 Sep 2003 06:18:08 -0000 @@ -164,7 +164,7 @@ #if defined(WIN32) -typedef LONG apr_atomic_t; +#define apr_atomic_t LONG; #define apr_atomic_add(mem, val) InterlockedExchangeAdd(mem,val) #define apr_atomic_dec(mem) InterlockedDecrement(mem)
