From f6c4b0917e1233d70627d24805c6e1a6d845cf3b Mon Sep 17 00:00:00 2001 From: alnsn Date: Sat, 19 Nov 2011 21:16:22 +0000 Subject: Add patches from upstream bug #51851. https://issues.apache.org/bugzilla/show_bug.cgi?id=51851 --- devel/apr/distinfo | 4 +++- devel/apr/patches/patch-atomic_unix_ia32.c | 14 ++++++++++++++ devel/apr/patches/patch-test_testatomic.c | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 devel/apr/patches/patch-atomic_unix_ia32.c create mode 100644 devel/apr/patches/patch-test_testatomic.c (limited to 'devel/apr') diff --git a/devel/apr/distinfo b/devel/apr/distinfo index 06418ed7e2e..cc01c1b8434 100644 --- a/devel/apr/distinfo +++ b/devel/apr/distinfo @@ -1,5 +1,7 @@ -$NetBSD: distinfo,v 1.32 2011/05/22 22:41:00 tron Exp $ +$NetBSD: distinfo,v 1.33 2011/11/19 21:16:22 alnsn Exp $ SHA1 (apr-1.4.5.tar.bz2) = 517de5e3cc1e3be810d9bc95508ab66bb8ebe7cb RMD160 (apr-1.4.5.tar.bz2) = d2a966c1b143416cd3655cf849cb5d3cb1ca2c5f Size (apr-1.4.5.tar.bz2) = 754763 bytes +SHA1 (patch-atomic_unix_ia32.c) = c51d5810ceb8438b04d7945a476fef96ea57a76a +SHA1 (patch-test_testatomic.c) = 0905b0001e0d06b9c96beb1c32ee9ce9382f233f diff --git a/devel/apr/patches/patch-atomic_unix_ia32.c b/devel/apr/patches/patch-atomic_unix_ia32.c new file mode 100644 index 00000000000..e19af42b4a3 --- /dev/null +++ b/devel/apr/patches/patch-atomic_unix_ia32.c @@ -0,0 +1,14 @@ +$NetBSD: patch-atomic_unix_ia32.c,v 1.1 2011/11/19 21:16:22 alnsn Exp $ +https://issues.apache.org/bugzilla/show_bug.cgi?id=51851 + +--- atomic/unix/ia32.c.orig 2007-08-26 19:50:26.000000000 +0000 ++++ atomic/unix/ia32.c +@@ -117,7 +117,7 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo + #elif APR_SIZEOF_VOIDP == 8 + asm volatile ("xchgq %q2, %1" + : "=a" (prev), "+m" (*mem) +- : "r" ((unsigned long)with)); ++ : "0" ((unsigned long)with)); + #else + #error APR_SIZEOF_VOIDP value not supported + #endif diff --git a/devel/apr/patches/patch-test_testatomic.c b/devel/apr/patches/patch-test_testatomic.c new file mode 100644 index 00000000000..32c9af2ba8e --- /dev/null +++ b/devel/apr/patches/patch-test_testatomic.c @@ -0,0 +1,20 @@ +$NetBSD: patch-test_testatomic.c,v 1.1 2011/11/19 21:16:22 alnsn Exp $ +https://issues.apache.org/bugzilla/show_bug.cgi?id=51851 + +--- test/testatomic.c.orig 2007-11-18 00:35:57.000000000 +0000 ++++ test/testatomic.c +@@ -84,11 +84,12 @@ static void test_xchg32(abts_case *tc, v + static void test_xchgptr(abts_case *tc, void *data) + { + int a; +- volatile void *target_ptr = NULL; ++ void *ref = "little piggy"; ++ volatile void *target_ptr = ref; + void *old_ptr; + + old_ptr = apr_atomic_xchgptr(&target_ptr, &a); +- ABTS_PTR_EQUAL(tc, NULL, old_ptr); ++ ABTS_PTR_EQUAL(tc, ref, old_ptr); + ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr); + } + -- cgit v1.2.3