[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#645302: libatomic-ops-dev: firebird2.5 FTBFS: atomic_ops/sysdeps/gcc/m68k.h:46: error: invalid conversion from 'unsigned char' to 'AO_BYTE_TS_val'



tags 645302 + patch
thanks

Dixi quod…

>The current firebird2.5 fails, apparently due to an error in
>some atomic_ops header.

Indeed. This is related to the same sparc issue; fix attached.
With this fix, firebird2.5 gets further in its build. Upstream
and packager, please apply. I’ve fudged it into the build, for
now, so it is not an urgent issue ARM but ought to be fixed at
the next upload and before the freeze.

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
From db1df5506b0810546b6ccb18ba3f6c53a4ed63a9 Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <tg@debian.org>
Date: Fri, 14 Oct 2011 19:36:36 +0000
Subject: [PATCH] Fix AO_test_and_set_full on m68k in a C++ environment.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Firebird 2.5 (a database) uses atomic_ops in C++ code,
and FTBFS due to an “invalid conversion from 'unsigned
char' to 'AO_BYTE_TS_val'” (Debian #645302). This is a
related issue to Debian #566976 and can be fixed by an
explicit cast here due to the size of the types invol‐
ved and the AO_TS_SET/AO_TS_CLEAR values.

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
---
 src/atomic_ops/sysdeps/gcc/m68k.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/atomic_ops/sysdeps/gcc/m68k.h b/src/atomic_ops/sysdeps/gcc/m68k.h
index ffa38d7..e7d435e 100644
--- a/src/atomic_ops/sysdeps/gcc/m68k.h
+++ b/src/atomic_ops/sysdeps/gcc/m68k.h
@@ -43,7 +43,8 @@ AO_test_and_set_full(volatile AO_TS_t *addr) {
                 : "=d" (oldval), "=m" (*addr)
                 : "m" (*addr)
                 : "memory");
-   return oldval;
+  /* This cast works due to the above.  */
+  return (AO_TS_VAL_t)oldval;
 }
 #define AO_HAVE_test_and_set_full
 
-- 
1.6.3.1


Reply to: