linamh/x11-libs/qt-core/files/qt-4.6.2-alpha.patch
2010-12-12 15:10:45 +00:00

62 lines
2.8 KiB
Diff

Author: Modestas Vainius <modax@debian.org>
Description: fix FTBFS on alpha due to invalid type conversions
../../include/QtCore/../../src/corelib/arch/qatomic_alpha.h: In member function 'T* QBasicAtomicPointer<T>::fetchAndStoreAcquire(T*) [with T = QMutexPool]':
kernel/qobject.cpp:123: instantiated from here
../../include/QtCore/../../src/corelib/arch/qatomic_alpha.h:401: error: invalid conversion from 'void*' to 'QMutexPool*'
--- a/src/corelib/arch/qatomic_alpha.h
+++ b/src/corelib/arch/qatomic_alpha.h
@@ -367,7 +367,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPoint
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -385,7 +385,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -404,7 +404,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
@@ -423,7 +423,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -441,7 +441,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -460,7 +460,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register void *old, *tmp;
+ register T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */