[unixODBC-dev] Conditionalizing code for the recent 64-bit API changes?

Nick Gorham nick at lurcher.org
Tue Feb 17 08:16:09 GMT 2009

Tom Lane wrote:
> Assuming that one needs to write some C code that will work with both
> pre-2.2.14 and current versions of unixODBC, what's the best way to
> #if the places where you need to change variable declarations?
> It's not clear to me whether unixODBC exports any symbols that can
> conveniently be tested for this.
> 			regards, tom lane
> _______________________________________________
> unixODBC-dev mailing list
> unixODBC-dev at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Just use the correct definitions SQLLEN as needed, and use the unixODBC 
header files, they should bring in the odbc-config.h and build to what 
you have. At the moment there is no way to check a older version as to 
how its build in terms of 64 bit SQLLEN. If its just a issue of code 
that will work with bost, its not a problem, the problem is prebuilt 

The problem is its  not just a unixODBC and app issue, it also needs the 
driver to be build in the same way. Its a mess, and I am hoping that by 
trying to move towards only sizeof( SQLLEN ) = 8 in future it will 
eventually sort itself out. The only major app that is not thatway at 
the moment AFAIK is PHP, that needs its odbc code updating to use SQLLEN


More information about the unixODBC-dev mailing list