I would like to have support for APR-0.9.x for log4cxx. The reason is there are standard rpms for them for RedHat Enterprise Linux 3 and RedHat Enterprise Linux 4, which we are using, but not for APR-1. I found that I could make it work with APR-0 by adding the definitions below. (Also, need to change the format to
apr_snprintf(result+2, (sizeof result) - 2, "%pt", &threadId);
since that's not supported in APR-0.)
Is there a reason APR-0 cannot be supported?
Thanks,
Wayne Liu
---------------------------------------
#include "apr_atomic.h"
#define apr_socket_create apr_socket_create_ex
inline apr_uint32_t apr_atomic_read32(volatile apr_uint32_t*a)
{ return apr_atomic_read(a); }
inline void apr_atomic_set32(volatile apr_uint32_t*a, apr_uint32_t b)
{ apr_atomic_set(a,b); }
inline apr_uint32_t apr_atomic_inc32( volatile apr_uint32_t*a )
{ apr_uint32_t b = *a; apr_atomic_inc(a); return b; }
inline apr_uint32_t apr_atomic_dec32( volatile apr_uint32_t*a )
{ apr_uint32_t b = *a; apr_atomic_dec(a); return b; }
inline apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
apr_uint32_t prev;
do {
prev = *mem;
} while (apr_atomic_cas(mem, val, prev) != prev);
return prev;
}
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.
