From 6b24b25454df77b62b01fc1511aec8a16f42f95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nirgal=20Vourg=C3=A8re?= Date: Sun, 30 Jun 2013 15:29:16 +0200 Subject: [PATCH] include odbcinstext.h in connectparams.c This is possible since unixodbc version 2.2.10 as they fixed the including of local files from public headers. --- INSTALL | 3 ++- src/odbc/connectparams.c | 41 +--------------------------------------- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/INSTALL b/INSTALL index ec176a2..24d38d9 100644 --- a/INSTALL +++ b/INSTALL @@ -50,7 +50,8 @@ mutually exclusive. --enable-sql will cause the SQL engine to be built, you must have flex and bison (or yacc) installed for this option. --with-unixodbc specifies the location of the unixODBC driver manager and - causes the unixODBC driver to be built. + causes the unixODBC driver to be built. You need version + 2.2.10 or above. --with-iodbc specifies the location of the iODBC driver manager and causes the iODBC driver to be built. diff --git a/src/odbc/connectparams.c b/src/odbc/connectparams.c index 04dd0d5..3b4e478 100644 --- a/src/odbc/connectparams.c +++ b/src/odbc/connectparams.c @@ -528,46 +528,7 @@ static gboolean cleanup (gpointer key, gpointer value, gpointer user_data) #ifdef UNIXODBC - -/* - * Begin BIG Hack. - * - * We need these from odbcinstext.h but it wants to - * include and , which are not in the - * standard include path. XXX smurph - * confirmed by unixODBC stuff, odbcinstext.h shouldn't be installed. freddy77 - */ -#define INI_MAX_LINE 1000 -#define INI_MAX_OBJECT_NAME INI_MAX_LINE -#define INI_MAX_PROPERTY_NAME INI_MAX_LINE -#define INI_MAX_PROPERTY_VALUE INI_MAX_LINE - -#define ODBCINST_PROMPTTYPE_LABEL 0 /* readonly */ -#define ODBCINST_PROMPTTYPE_TEXTEDIT 1 -#define ODBCINST_PROMPTTYPE_LISTBOX 2 -#define ODBCINST_PROMPTTYPE_COMBOBOX 3 -#define ODBCINST_PROMPTTYPE_FILENAME 4 -#define ODBCINST_PROMPTTYPE_HIDDEN 5 -#define ODBCINST_PROMPTTYPE_TEXTEDIT_PASSWORD 6 - -typedef struct tODBCINSTPROPERTY -{ - struct tODBCINSTPROPERTY *pNext; /* pointer to next property, NULL if last property */ - - char szName[INI_MAX_PROPERTY_NAME + 1]; /* property name */ - char szValue[INI_MAX_PROPERTY_VALUE + 1]; /* property value */ - int nPromptType; /* PROMPTTYPE_TEXTEDIT, PROMPTTYPE_LISTBOX, PROMPTTYPE_COMBOBOX, PROMPTTYPE_FILENAME */ - char **aPromptData; /* array of pointers terminated with a NULL value in array. */ - char *pszHelp; /* help on this property (driver setups should keep it short) */ - void *pWidget; /* CALLER CAN STORE A POINTER TO ? HERE */ - int bRefresh; /* app should refresh widget ie Driver Setup has changed aPromptData or szValue */ - void *hDLL; /* for odbcinst internal use... only first property has valid one */ -} -ODBCINSTPROPERTY, *HODBCINSTPROPERTY; - -/* - * End BIG Hack. - */ +#include int ODBCINSTGetProperties(HODBCINSTPROPERTY hLastProperty)