From 28fe6a6e8b14e780bd79dbe68f6010524cf2e90b Mon Sep 17 00:00:00 2001 From: "mostang.com!davidm" Date: Thu, 27 Mar 2003 04:29:07 +0000 Subject: [PATCH] Work around ECC v7.0 bug by manually definining __sync_val_compare_and_swap() if it isn't defined yet. (Logical change 1.68) --- include/internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/internal.h b/include/internal.h index c4a90a6c..470bbfb8 100644 --- a/include/internal.h +++ b/include/internal.h @@ -93,6 +93,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_IA64INTRIN_H # define HAVE_CMPXCHG # include + /* + * ecc v7.0 is broken: it's missing __sync_val_compare_and_swap() + * even though the ia64 ABI requires it. Work around it: + */ +# ifndef __sync_val_compare_and_swap +# define __sync_val_compare_and_swap(x,y,z) \ + _InterlockedCompareExchange64_rel(x,y,z) +# endif + # define cmpxchg_ptr(_ptr,_o,_n) \ ((void *) __sync_val_compare_and_swap((long *) (_ptr), \ (long) (_o), (long) (_n)))