From 40fe3075bec3a08c5ba771d4e8420718ab9fec8d Mon Sep 17 00:00:00 2001 From: bgermann Date: Thu, 17 Aug 2017 13:29:24 +0200 Subject: [PATCH] Define unixODBC-only constants if not available This enables using linking gb.db.odbc with iodbc and possibly any other ODBC implementation for unix-like systems. The new defines originate from unixODBC's sqlext.h. [GB.DB.ODBC] * NEW: Define unixODBC-only constants if they are not available to enable other ODBC backends --- gb.db.odbc/src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gb.db.odbc/src/main.c b/gb.db.odbc/src/main.c index 204deee9d..5c7f3d943 100644 --- a/gb.db.odbc/src/main.c +++ b/gb.db.odbc/src/main.c @@ -57,6 +57,16 @@ #include "gb.db.proto.h" #include "main.h" +// define unixODBC ONLY constants if they are not available +#ifndef SQLTables_TABLE_NAME +#define SQLTables_TABLE_NAME 3 +#define SQLTables_TABLE_TYPE 4 +#define SQLTables_REMARKS 5 +#define SQLColumns_COLUMN_NAME 4 +#define SQLColumns_COLUMN_SIZE 7 +#define SQLColumns_SQL_DATA_TYPE 14 +#endif + GB_INTERFACE GB EXPORT; DB_INTERFACE DB EXPORT;