« Return to Thread: AMD64 and Qt 4.2.2 issue

Re: AMD64 and Qt 4.2.2 issue

by Michal Kubecek :: Rate this Message:

Reply to Author | View in Thread

On Sun, Dec 31, 2006 at 08:08:13PM -0200, Gianni Rossi wrote:
>
> which fails because it was expecting "d->stmt" to be a pointer.  To me, it
> seems that changing isc_stmt_handle from a pointer to a 'simple' uint
> depending on the architecture is a problem, this should be consistant.

I agree, it caused problems in Firebird code as well, some casts had to
be changed from C++ safe casts to traditional ones to compile with gcc4.
But I'm not sure it would be easy to change this because FB_API_HANDLE
is exported outside of Firebird.

>  I'm not very fluent in C++, but it seems that the declaration should
>  be:
>
> #if defined(_LP64) || defined(__LP64__) || defined(__arch64__)
> typedef unsigned int*    FB_API_HANDLE;
> #else
> typedef void*           FB_API_HANDLE;
> #endif
>
> ??  Is this right or am I missing something here?

This is surely not right. The reason for different definition is that
FB_API_HANDLE has to be 32-bit on all platforms. Therefore on 64-bit
platforms (with 64-bit pointers) it is defined as (32-bit) unsigned int.
For a consistent definition, uint32_t (or some unsigned 32-bit integer
type where stdint.h isn't available) should be used.

                                                          Michal Kubecek


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

 « Return to Thread: AMD64 and Qt 4.2.2 issue