[unixODBC-dev] ODBC on 64 bit linux - test64

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Tue Jan 22 14:05:35 GMT 2008


> 
> ZIGLIO, Frediano, VF-IT wrote:
> 
> >Yes, but you should rebuild packaged unixODBC of your distro and all
> >dependencies. I hope to have it fixed without all that work.
> >
> >  
> >
> Sorry, I am missing something, what are you suggesting I _should_ do?
> 
> >Also I noted that in sqltypes.h you have (from CVS version)
> >
> >...
> >#if (SIZEOF_LONG_INT == 8)
> >#ifdef BUILD_LEGACY_64_BIT_MODE
> >typedef int             SQLINTEGER;
> >typedef unsigned int    SQLUINTEGER;
> >...
> >
> >It's not correct 100% but only on LP64. The test should be something
> >like
> >
> >...
> >#if (SIZEOF_VOID_P == 8)
> >#ifdef BUILD_LEGACY_64_BIT_MODE
> >typedef int             SQLINTEGER;
> >typedef unsigned int    SQLUINTEGER;
> >...
> >
> >and define a 64 bit integer.
> >  
> >
> Why? the type in issue is the integer, I don't see why the size of a 
> pointer has anything to do with it. What about a platform 
> with a 64bit 
> accumulator and a 48 bit address bus?
> 

The header you use is not fully compatible with Windows. Under win64
sizeof(long) == 4 but sizeof(SQLULEN) == 8. Perhaps a more compatible
way is defining SQLULEN as a size_t type.

> >  
> >
> >>I am not looking forward to all the reports of all the broken 
> >>apps when 
> >>2.2.13 is released :-(.
> >>
> >>    
> >>
> >
> >IMO (note, there's no H) if customers want 64bit they have to move to
> >64bit or stay on 32bit !!
> >
> >  
> >
> Well, thats your opinion (lacking the H), which you are 
> welcome to, but 
> back in the real word, I find it doesn't work like that.
> 

Yes and not cause when customers wants to move to win64 code is not
compatible. Currently some Linux x64 distro use sizeof(SQLULEN) == 4
while others use sizeof(SQLULEN) == 8. Personally I don't like this ABI
incompatibility. It cause closed source drivers to have 2 compiled
shared libraries.

Frediano Ziglio



More information about the unixODBC-dev mailing list