diff options
author | James E. Housley <jeh@FreeBSD.org> | 2003-11-05 22:42:43 +0000 |
---|---|---|
committer | James E. Housley <jeh@FreeBSD.org> | 2003-11-05 22:42:43 +0000 |
commit | fee29a8683f163cd8c30198a491484c85d4b5738 (patch) | |
tree | 2ded1fe76edf26bdc415dff3e6dbcebe1f3caaed /devel/apr1/files/patch-apr_atomic.h | |
parent | - Add pkg-message (diff) |
Add thread support to APR port.
Bump PORTREVISION
PR: 58834
Submitted By: MAINTAINER
Notes
Notes:
svn path=/head/; revision=93196
Diffstat (limited to 'devel/apr1/files/patch-apr_atomic.h')
-rw-r--r-- | devel/apr1/files/patch-apr_atomic.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devel/apr1/files/patch-apr_atomic.h b/devel/apr1/files/patch-apr_atomic.h new file mode 100644 index 000000000000..c4e031f3ffd5 --- /dev/null +++ b/devel/apr1/files/patch-apr_atomic.h @@ -0,0 +1,20 @@ +--- apr-0.9.4/include/apr_atomic.h.orig Sun Nov 2 01:57:08 2003 ++++ apr-0.9.4/include/apr_atomic.h Sun Nov 2 02:20:37 2003 +@@ -206,10 +206,16 @@ + + #define apr_atomic_t apr_uint32_t + #define apr_atomic_add(mem, val) atomic_add_int(mem,val) +-#define apr_atomic_dec(mem) atomic_subtract_int(mem,1) + #define apr_atomic_inc(mem) atomic_add_int(mem,1) + #define apr_atomic_set(mem, val) atomic_set_int(mem, val) + #define apr_atomic_read(mem) (*mem) ++ ++#define apr_atomic_dec(mem) \ ++({ \ ++ atomic_subtract_int(mem,1); \ ++ *(int *)mem; \ ++ }) ++ + + #elif (defined(__linux__) || defined(__EMX__)) && defined(__i386__) && !APR_FORCE_ATOMIC_GENERIC + |