Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBC driver fails to compile on 64-bit MacOS X with Gentoo Prefix and unixODBC 2.3 #2625

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working Client interfaces duplicate This issue or pull request already exists normal

Comments

@monetdb-team
Copy link

Date: 2010-07-18 09:10:45 +0200
From: @drstmane
To: clients devs <>
Version: 1.38.1 (Jun2010) [obsolete]

Duplicates: #2558
Last updated: 2010-07-18 19:08:04 +0200

Comment 14454

Date: 2010-07-18 09:10:45 +0200
From: @drstmane

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9
Build Identifier:

On 64-bit MacOS X with Gentoo Prefix and unixODBC 2.3, compilation of our ODBC driver fails with

.../clients/src/odbc/driver/ODBCStmt.h:83: error: expected specifier-qualifier-list before 'SQLROWOFFSET'
cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Stable/clients/.GNU.64.64.d.1-Darwin9.8.0/make.out.html

It seems that in this case, sqltypes.h does not define type SQLROWOFFSET.

In fact, sqltypes.h of both unixOBDC 2.3 provided by the Gentoo Prefix on MacOS X and unixODBC 2.2.14 on Fedora 12 says:
"
/*

  • These are not supprted on 64bit ODBC according to MS, removed, so use at your peril

typedef SQLULEN SQLTRANSID;
typedef SQLULEN SQLROWCOUNT;
typedef SQLUINTEGER SQLROWSETSIZE;
typedef SQLLEN SQLROWOFFSET;
*/
"

However, in the Fedora 12 case, it then defines these types after all; here's a diff of the relevant section of sqltypes.h:
"
--- /tmp/ODBC-2.3-GentooPrefix 2010-07-18 08:55:11.000000000 +0200
+++ /tmp/ODBC-2.2.14-Fedora12 2010-07-18 08:55:59.000000000 +0200
@@ -1,51 +1,55 @@
/*

  • can't use a long it fails on 64 platforms
    */

/*

  • Hopefully by now it should be safe to assume most drivers know about SQLLEN now
  • and the defaukt is now sizeof( SQLLEN ) = 8 on 64 bit platforms

*/

if (SIZEOF_LONG_INT == 8)
ifdef BUILD_LEGACY_64_BIT_MODE
typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER;
define SQLLEN SQLINTEGER
define SQLULEN SQLUINTEGER
define SQLSETPOSIROW SQLUSMALLINT
/*

  • These are not supprted on 64bit ODBC according to MS, removed, so use at your peril

typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE;
typedef SQLULEN SQLTRANSID;
typedef SQLLEN SQLROWOFFSET;
/
else
typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER;
typedef long SQLLEN;
typedef unsigned long SQLULEN;
typedef unsigned long SQLSETPOSIROW;
/

  • These are not supprted on 64bit ODBC according to MS, removed, so use at your peril

typedef SQLULEN SQLTRANSID;
typedef SQLULEN SQLROWCOUNT;
typedef SQLUINTEGER SQLROWSETSIZE;
typedef SQLLEN SQLROWOFFSET;
*/
+typedef SQLULEN SQLROWCOUNT;
+typedef SQLULEN SQLROWSETSIZE;
+typedef SQLULEN SQLTRANSID;
+typedef SQLLEN SQLROWOFFSET;
endif
else
typedef long SQLINTEGER;
typedef unsigned long SQLUINTEGER;
define SQLLEN SQLINTEGER
define SQLULEN SQLUINTEGER
define SQLSETPOSIROW SQLUSMALLINT
typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE;
typedef SQLULEN SQLTRANSID;
typedef SQLLEN SQLROWOFFSET;
endif
"

Reproducible: Always

Comment 14474

Date: 2010-07-18 19:08:04 +0200
From: @drstmane

*** This bug has been marked as a duplicate of bug #2558 ***

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Client interfaces duplicate This issue or pull request already exists normal
Projects
None yet
Development

No branches or pull requests

1 participant