bk commit - MyODBC 3.51 (1.495)

bk commit - MyODBC 3.51 (1.495)

am 22.08.2005 11:28:16 von pharvey

Below is the list of changes that have just been commited into a local
MyODBC 3.51 repository of 'pharvey'. When 'pharvey' does a push, they will
be propogaged to the main repository and within 2 hours after the push
into the public repository.

For more information on how to access the public repository see:
http://www.mysql.com/products/myodbc/faq_2.html#Development_ source

You can also browse the changes from public repository:
Complete repository: http://mysql.bkbits.net:8080/myodbc3/
This changeset : http://mysql.bkbits.net:8080/myodbc3/cset@1.495

ChangeSet
1.495 05/08/22 02:28:16 pharvey@pluto.codebydesign.com +15 -0
- tweaking qmake based build for linux
- some code cleanup

util/MYODBCUtil.h
1.14 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +3 -8
- tweaking qmake based build for linux
- some code cleanup

setup/setup.pro
1.25 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +2 -2
- tweaking qmake based build for linux
- some code cleanup

setup/MYODBCSetupDataSourceConfig.cpp
1.18 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +12 -10
- tweaking qmake based build for linux
- some code cleanup

scripts/myodbc3.spec.sh
1.15 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +4 -4
- tweaking qmake based build for linux
- some code cleanup

root.vpj
1.4 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +1 -0
- tweaking qmake based build for linux
- some code cleanup

mysql.qmake
1.3 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +2 -2
- tweaking qmake based build for linux
- some code cleanup

myodbcinst/myodbcinst.c
1.37 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +0 -4
- tweaking qmake based build for linux
- some code cleanup

imyodbc/imyodbc.h
1.6 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +2 -0
- tweaking qmake based build for linux
- some code cleanup

driver/setup.c
1.44 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +0 -8
- tweaking qmake based build for linux
- some code cleanup

driver/myodbc3.h
1.48 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +9 -23
- tweaking qmake based build for linux
- some code cleanup

driver/misc.c
1.22 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +2 -28
- tweaking qmake based build for linux
- some code cleanup

driver/driver.pro
1.3 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +3 -3
- tweaking qmake based build for linux
- some code cleanup

driver/connect.c
1.75 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +0 -466
- tweaking qmake based build for linux
- some code cleanup

defines.qmake
1.3 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +4 -1
- tweaking qmake based build for linux
- some code cleanup

MYODBCConfig/MYODBCConfig.pro
1.15 05/08/22 02:27:52 pharvey@pluto.codebydesign.com +1 -1
- tweaking qmake based build for linux
- some code cleanup

# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: pharvey
# Host: pluto.codebydesign.com
# Root: /home/pharvey/SandBox/MySQL/myodbc-3.51

--- 1.74/driver/connect.c 2005-07-28 02:23:20 -07:00
+++ 1.75/driver/connect.c 2005-08-22 02:27:52 -07:00
@@ -46,12 +46,6 @@

#include "../util/MYODBCUtil.h"

-#ifdef PORTABLE_GUI
-/* #include "../util/MYODBCUtil.h" */
-#elif defined(__WIN__)
-#include "dialogs.h"
-#endif
-
#ifndef CLIENT_NO_SCHEMA
#define CLIENT_NO_SCHEMA 16
#endif
@@ -372,7 +366,6 @@
SQLSMALLINT FAR * pcbConnStrOut,
SQLUSMALLINT fDriverCompletion )
{
-#ifdef PORTABLE_GUI
MYODBCUTIL_DATASOURCE * pDataSource = MYODBCUtilAllocDataSource( MYODBCUTIL_DATASOURCE_MODE_DRIVER_CONNECT );
MYODBCUTIL_DRIVER * pDriver = MYODBCUtilAllocDriver(); /* we have to read in driver info to get setup lib */
SQLRETURN nReturn = SQL_SUCCESS;
@@ -673,465 +666,6 @@
MYODBCUtilFreeDataSource( pDataSource );

DBUG_RETURN_STATUS( nReturn );
-
-#elif defined(_UNIX_)
- char *connstrin= NULL;
- char *KEY_DSN= NULL;
- char *KEY_DESC= NULL;
- char *KEY_SERVER= NULL;
- char *KEY_USER= NULL;
- char *KEY_PASSWORD= NULL;
- char *KEY_PORT= NULL;
- char *KEY_OPTION= NULL;
- char *KEY_DB= NULL;
- char *KEY_SOCKET= NULL;
- char *KEY_STMT= 0;
- char *tok[10];
- char *tok2= NULL;
- char *tok3= NULL;
- int i;
- uint client_flag= 0;
- char host[64],user[64],passwd[64],database[NAME_LEN+1],
- port[10],socket[256],init_stmt[256],option[64], desc[256];
- my_bool fPrompt= FALSE, fDriver= FALSE, fOption= FALSE;
- DBC FAR *dbc= (DBC FAR*) hdbc;
-
- if ((szConnStrIn == NULL) || (!cbConnStrIn) ||
- ((cbConnStrIn == SQL_NTS) && (!szConnStrIn[0])))
- fPrompt= TRUE;
- else
- {
- char *strtok_save;
- /* Check connection string for completeness. */
- /* Prompt if not all params */
-
- connstrin= my_strdup((char*) szConnStrIn,MYF(MY_WME));
-
- tok[0]= my_strtok(connstrin,';', &strtok_save);
- for (i= 1 ; i <= 8 ; i++)
- tok[i]= my_strtok(NULL,';',&strtok_save);
- tok[i]= NULL;
-
- for (i= 0 ; tok[i] ; i++)
- {
- if ((tok2= my_strtok(tok[i], '=', &strtok_save)))
- {
- if (myodbc_strcasecmp("DSN", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0,&strtok_save)) && tok3[0])
- KEY_DSN= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_DSN);
- KEY_DSN= NULL;
- }
- }
-
- if (myodbc_strcasecmp("DRIVER", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- fDriver= TRUE;
- }
-
- if (myodbc_strcasecmp("DESC", tok2) == 0 ||
- myodbc_strcasecmp("DESCRIPTION", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_DESC= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_DESC);
- KEY_DESC= NULL;
- }
- }
-
- if (myodbc_strcasecmp("DB", tok2) == 0 ||
- myodbc_strcasecmp("DATABASE", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_DB= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_DB);
- KEY_DB= NULL;
- }
- }
-
- if (myodbc_strcasecmp("UID", tok2) == 0 ||
- myodbc_strcasecmp("USER", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_USER= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_USER);
- KEY_USER= NULL;
- }
- }
-
- if (myodbc_strcasecmp("PWD", tok2) == 0 ||
- myodbc_strcasecmp("PASSWORD", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_PASSWORD= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_PASSWORD);
- KEY_PASSWORD= NULL;
- }
- }
-
- if (myodbc_strcasecmp("SERVER", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_SERVER= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_SERVER);
- KEY_SERVER= NULL;
- }
- }
-
- if (myodbc_strcasecmp("PORT", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_PORT= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_PORT);
- KEY_PORT= NULL;
- }
- }
-
- if (myodbc_strcasecmp("SOCKET", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_SOCKET= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_SOCKET);
- KEY_SOCKET= NULL;
- }
- }
-
- if (myodbc_strcasecmp("OPTION", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_OPTION= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_OPTION);
- KEY_OPTION= NULL;
- }
- fOption= TRUE;
- }
-
- if (myodbc_strcasecmp("STMT", tok2) == 0)
- {
- if ((tok3= my_strtok(NULL, 0, &strtok_save)) && tok3[0])
- KEY_STMT= (char*) my_strdup(tok3, MYF(MY_WME));
- else
- {
- x_free(KEY_STMT);
- KEY_STMT= NULL;
- }
- }
-
- }
- }
-
- if (KEY_DSN)
- {
- SQLGetPrivateProfileString(KEY_DSN,"description",
- "", desc, sizeof(desc),"ODBC.INI");
- if (!KEY_DESC) KEY_DESC= (char*) my_strdup(desc, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"server",
- "localhost", host, sizeof(host),"ODBC.INI");
- if (!KEY_SERVER) KEY_SERVER= (char*) my_strdup(host, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"database",
- KEY_DSN, database, sizeof(database),
- "ODBC.INI");
- if (!KEY_DB) KEY_DB= (char*) my_strdup(database, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"option",
- "0", option, sizeof(option),"ODBC.INI");
- if (!KEY_OPTION) KEY_OPTION= (char*) my_strdup(option, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"port",
- "3306", port, sizeof(port),"ODBC.INI");
- if (!KEY_PORT) KEY_PORT= (char*) my_strdup(port, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"stmt",
- "", init_stmt, sizeof(init_stmt),"ODBC.INI");
- if (!KEY_STMT) KEY_STMT= (char*) my_strdup(init_stmt, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"user",
- "dummy", user, sizeof(user),"ODBC.INI");
- if (!KEY_USER) KEY_USER= (char*) my_strdup(user, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"password",
- "", passwd, sizeof(passwd),"ODBC.INI");
- if (!KEY_PASSWORD) KEY_PASSWORD= (char*) my_strdup(passwd, MYF(MY_WME));
-
- SQLGetPrivateProfileString(KEY_DSN,"socket",
- "", socket, sizeof(socket),"ODBC.INI");
- if (!KEY_SOCKET) KEY_SOCKET= (char*) my_strdup(socket, MYF(MY_WME));
- }
-
- if (!KEY_DB)
- KEY_DB= (char*) my_strdup(KEY_DSN ? KEY_DSN : "", MYF(MY_WME));
-
- if (!KEY_DESC)
- KEY_DESC= (char*) my_strdup("", MYF(MY_WME));
-
- if (!KEY_SERVER)
- KEY_SERVER= (char*) my_strdup("localhost", MYF(MY_WME));
-
- if (!KEY_PORT)
- KEY_PORT= (char*) my_strdup("3306", MYF(MY_WME));
-
- if (!KEY_SOCKET)
- KEY_SOCKET= (char*) my_strdup("", MYF(MY_WME));
-
- if (!KEY_USER)
- KEY_USER= (char*) my_strdup("dummy", MYF(MY_WME));
-
- if (!KEY_PASSWORD)
- KEY_PASSWORD= (char*) my_strdup("", MYF(MY_WME));
-
- if (!KEY_OPTION)
- KEY_OPTION= (char*) my_strdup(fOption ? "0" : "3", MYF(MY_WME));
-
- if (!KEY_STMT)
- KEY_STMT= (char*) my_strdup("", MYF(MY_WME));
-
- if (fDriverCompletion == SQL_DRIVER_PROMPT ||
- ((fDriverCompletion == SQL_DRIVER_COMPLETE ||
- fDriverCompletion == SQL_DRIVER_COMPLETE_REQUIRED) &&
- (!KEY_DSN && !fDriver)))
- fPrompt= TRUE;
- }
- if (fPrompt)
- DBUG_RETURN(set_conn_error(hdbc,MYERR_S1000,"No DSN entered",0));
-
- dbc->flag= (uint) atol(KEY_OPTION);
- dbc->port= atoi(KEY_PORT);
- #ifndef DBUG_OFF
- if (dbc->flag & FLAG_DEBUG && ! _db_on_)
- init_dbug_log();
- DBUG_PRINT("enter",("fDriverCompletion: %d",fDriverCompletion));
- #endif
-
- if (szConnStrOut)
- {
- char *pos,buff[1024],driver_dsn[255];
- long length;
- ulong tmp= ~0L;
-
- if (KEY_DSN)
- strxmov(driver_dsn,"DSN=",KEY_DSN,NullS);
- else
- strxmov(driver_dsn,"DRIVER={",DRIVER_NAME,"}",NullS);
-
- pos= strxmov((char*) buff,
- driver_dsn,
- ";DESC=",KEY_DESC,
- ";DB=",KEY_DB,
- ";SERVER=",KEY_SERVER,
- ";UID=",KEY_USER,
- ";PASSWORD=",KEY_PASSWORD,
- ";PORT=",KEY_PORT,
- ";SOCKET=",KEY_SOCKET,
- ";OPTION=",KEY_OPTION,
- ";STMT=",KEY_STMT,
- ";",NullS);
- (void) copy_lresult(SQL_HANDLE_DBC,(DBC FAR*)dbc, szConnStrOut,
- cbConnStrOutMax, &length,buff, (int) (pos-buff),
- 0L,0L,&tmp,0);
- if (pcbConnStrOut)
- *pcbConnStrOut= (SQLSMALLINT) length;
- DBUG_PRINT("info",("Connect string out: %s",szConnStrOut));
- }
- client_flag= get_client_flag(&dbc->mysql,dbc->flag,(uint) dbc->login_timeout,
- KEY_STMT);
-
- if (!mysql_real_connect(&dbc->mysql,
- KEY_SERVER,
- KEY_USER,
- KEY_PASSWORD[0] ? KEY_PASSWORD : NullS,
- KEY_DB,
- dbc->port,
- KEY_SOCKET[0] ? KEY_SOCKET : NullS,
- (uint) client_flag))
- {
- x_free(KEY_DSN);
- x_free(KEY_DESC);
- x_free(KEY_DB);
- x_free(KEY_SERVER);
- x_free(KEY_USER);
- x_free(KEY_PASSWORD);
- x_free(KEY_PORT);
- x_free(KEY_SOCKET);
- x_free(KEY_OPTION);
- x_free(KEY_STMT);
- x_free(connstrin);
- DBUG_RETURN_STATUS(set_conn_error(hdbc,MYERR_S1000,
- mysql_error(&dbc->mysql),
- mysql_errno(&dbc->mysql)));
- }
- dbc->dsn= my_strdup(KEY_DSN ? KEY_DSN:"",MYF(MY_WME));
- dbc->database= my_strdup(KEY_DB,MYF(MY_WME));
- dbc->server= my_strdup(KEY_SERVER,MYF(MY_WME));
- dbc->user= my_strdup(KEY_USER,MYF(MY_WME));
- dbc->password= my_strdup(KEY_PASSWORD,MYF(MY_WME));
-
- x_free(KEY_DSN);
- x_free(KEY_DESC);
- x_free(KEY_DB);
- x_free(KEY_SERVER);
- x_free(KEY_USER);
- x_free(KEY_PASSWORD);
- x_free(KEY_PORT);
- x_free(KEY_SOCKET);
- x_free(KEY_OPTION);
- x_free(KEY_STMT);
- x_free(connstrin);
- DBUG_RETURN_STATUS(set_connect_defaults(dbc));
-#elif defined(__WIN__)
- short iRet;
- my_bool fPrompt= FALSE,maybe_prompt;
- DBC FAR * dbc= (DBC FAR*) hdbc;
- GLOBALHANDLE hglbAttr;
- LPSETUPDLG lpsetupdlg;
- ulong client_flag;
-
- DBUG_ENTER("SQLDriverConnect");
-
- hglbAttr= GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, sizeof(SETUPDLG));
- if (!hglbAttr)
- DBUG_RETURN(FALSE);
- lpsetupdlg= (LPSETUPDLG)GlobalLock(hglbAttr);
-
- maybe_prompt= (fDriverCompletion == SQL_DRIVER_COMPLETE ||
- fDriverCompletion == SQL_DRIVER_COMPLETE_REQUIRED);
- if ((szConnStrIn == NULL) || (!cbConnStrIn) ||
- ((cbConnStrIn == SQL_NTS) && (!szConnStrIn[0])))
- {
- DBUG_PRINT("info",("No connection arguments"));
- fPrompt= TRUE;
- }
- else
- {
- ulong flag;
- /* Check connection string for completeness. Prompt if not all params */
- ParseAttributes(szConnStrIn, lpsetupdlg);
- set_attributes(lpsetupdlg);
- flag= (ulong) atol(lpsetupdlg->aAttr[KEY_FLAG].szAttr);
- if (fDriverCompletion == SQL_DRIVER_PROMPT && ! (flag & FLAG_NO_PROMPT) ||
- (maybe_prompt &&
- (!lpsetupdlg->aAttr[KEY_SERVER].szAttr[0] ||
- !lpsetupdlg->aAttr[KEY_USER].szAttr[0])))
- {
- DBUG_PRINT("info",("flag: %d dsn: '%s' server: '%s' user: '%s'",
- flag,
- lpsetupdlg->aAttr[KEY_DSN].szAttr,
- lpsetupdlg->aAttr[KEY_SERVER].szAttr,
- lpsetupdlg->aAttr[KEY_USER].szAttr));
- fPrompt= TRUE;
- }
- }
-retry:
-
- if (fPrompt)
- {
- iRet= DialogBoxParam(s_hModule, MAKEINTRESOURCE(MYODBCDLG), hwnd,
- (DLGPROC) DriverConnectProc,
- (LONG)(LPSTR) lpsetupdlg);
- if ((!iRet) || (iRet == -1))
- {
- GlobalUnlock(hglbAttr);
- GlobalFree(hglbAttr);
- DBUG_RETURN_STATUS(SQL_NO_DATA_FOUND);
- }
- }
- dbc->flag= (uint) atol(lpsetupdlg->aAttr[KEY_FLAG].szAttr);
- dbc->port= atoi(lpsetupdlg->aAttr[KEY_PORT].szAttr);
-
- if (szConnStrOut)
- {
- char *pos,buff[1024],driver_dsn[255];
- long length;
- ulong tmp= ~0L;
-
- if (lpsetupdlg->aAttr[KEY_DSN].szAttr[0])
- strxmov(driver_dsn,"DSN=", lpsetupdlg->aAttr[KEY_DSN].szAttr,NullS);
- else
- strxmov(driver_dsn,"DRIVER={",DRIVER_NAME,"}",NullS);
-
- pos= strxmov(buff, driver_dsn,
- ";DESC=",lpsetupdlg->aAttr[KEY_DESC].szAttr,
- ";DATABASE=",lpsetupdlg->aAttr[KEY_DB].szAttr,
- ";SERVER=",lpsetupdlg->aAttr[KEY_SERVER].szAttr,
- ";UID=",lpsetupdlg->aAttr[KEY_USER].szAttr,
- ";PWD=",lpsetupdlg->aAttr[KEY_PASSWORD].szAttr,
- ";PORT=",lpsetupdlg->aAttr[KEY_PORT].szAttr,
- ";SOCKET=",lpsetupdlg->aAttr[KEY_SOCKET].szAttr,
- ";OPTION=",lpsetupdlg->aAttr[KEY_FLAG].szAttr,
- ";STMT=",lpsetupdlg->aAttr[KEY_STMT].szAttr,
- ";",NullS);
- (void) copy_lresult(SQL_HANDLE_DBC,(DBC FAR*)dbc, szConnStrOut,
- cbConnStrOutMax, &length,buff, (int) (pos-buff),
- 0L,0L,&tmp,0);
- if (pcbConnStrOut)
- *pcbConnStrOut= (SQLSMALLINT) length;
-
- DBUG_PRINT("info",("Connect string out: %s",szConnStrOut));
- }
- client_flag= get_client_flag(&dbc->mysql,
- dbc->flag,
- (uint) dbc->login_timeout,
- lpsetupdlg->aAttr[KEY_STMT].szAttr);
-
- /* If no DB, use DSN as database name */
- if (!lpsetupdlg->aAttr[KEY_DB].szAttr[0])
- {
- strmov(lpsetupdlg->aAttr[KEY_DB].szAttr,
- lpsetupdlg->aAttr[KEY_DSN].szAttr);
- }
- if (!mysql_real_connect(&dbc->mysql,
- lpsetupdlg->aAttr[KEY_SERVER].szAttr,
- lpsetupdlg->aAttr[KEY_USER].szAttr,
- (lpsetupdlg->aAttr[KEY_PASSWORD].szAttr[0] ? lpsetupdlg->aAttr[KEY_PASSWORD].szAttr : NullS),
- lpsetupdlg->aAttr[KEY_DB].szAttr,
- dbc->port,
- lpsetupdlg->aAttr[KEY_SOCKET].szAttr,
- (uint)client_flag))
- {
- if (maybe_prompt && !fPrompt)
- {
- char message[256];
- fPrompt= TRUE;
- strxmov(message,MYODBC3_ERROR_PREFIX,mysql_error(&dbc->mysql ),NullS);
- MessageBox(hwnd,message,"MySQL-ODBC Connection",MB_ICONERROR | MB_OK);
- goto retry;
- }
- set_conn_error(hdbc,MYERR_S1000,mysql_error(&dbc->mysql),
- mysql_errno(&dbc->mysql));
- GlobalUnlock(hglbAttr);
- GlobalFree(hglbAttr);
- DBUG_RETURN_STATUS(SQL_ERROR);
- }
- dbc->dsn= my_strdup(lpsetupdlg->aAttr[KEY_DSN].szAttr,MYF(MY_WME));
- dbc->database= my_strdup(lpsetupdlg->aAttr[KEY_DB].szAttr,MYF(MY_WME));
- dbc->server= my_strdup(lpsetupdlg->aAttr[KEY_SERVER].szAttr,MYF(MY_WME));
- dbc->user= my_strdup(lpsetupdlg->aAttr[KEY_USER].szAttr,MYF(MY_WME));
- dbc->password= my_strdup(lpsetupdlg->aAttr[KEY_PASSWORD].szAttr,MYF(MY_WME) );
- GlobalUnlock(hglbAttr);
- GlobalFree(hglbAttr);
- DBUG_RETURN_STATUS(set_connect_defaults(dbc));
-#endif /* _UNIX_ and _WIN_ */
}



--- 1.21/driver/misc.c 2005-01-28 11:33:50 -08:00
+++ 1.22/driver/misc.c 2005-08-22 02:27:52 -07:00
@@ -31,7 +31,7 @@

#include "myodbc3.h"

-#if defined(_UNIX_) && !defined(HAVE_SQLGETPRIVATEPROFILESTRING)
+#if defined(_UNIX_)

#include

@@ -203,30 +203,4 @@
return ret;
}

-
-
-int _myodbc_SQLGetPrivateProfileString(char *section, char *entry, char *def_value,
- char *buf, int buf_len,
- char *filename)
-{
- char *value, *src;
- int length= -1;
-
- if (buf == NULL || buf_len <= 1 || section == NULL || entry== NULL)
- return -1; /* no need to bother */
-
- if (!strcmp(filename,"ODBC.INI"))
- {
- value= find_key_by_dsn(section,entry);
- src= value ? value : def_value;
-
- length= 0;
- buf[0]= 0;
- if (src)
- length= (int) (strmake(buf, src, buf_len-1) - buf);
- my_free(value, MYF(MY_ALLOW_ZERO_PTR));
- }
- return length;
-}
-
-#endif /* defined(_UNIX_) && !defined(HAVE_SQLGETPRIVATEPROFILESTRING) */
+#endif /* defined(_UNIX_) */

--- 1.43/driver/setup.c 2005-05-19 13:06:02 -07:00
+++ 1.44/driver/setup.c 2005-08-22 02:27:52 -07:00
@@ -33,16 +33,8 @@
#undef VOID /* Becasue of ctl3d.h */
#define VOID void

-#ifndef PORTABLE_GUI
-#include
-#endif
-
#include "odbcinst.h"
#include
-
-#ifndef PORTABLE_GUI
-#include "dialogs.h"
-#endif

#include


--- 1.14/MYODBCConfig/MYODBCConfig.pro 2005-08-21 22:02:03 -07:00
+++ 1.15/MYODBCConfig/MYODBCConfig.pro 2005-08-22 02:27:52 -07:00
@@ -38,7 +38,7 @@
# #########################################################
unix {
INCLUDEPATH += ../util ../setup /usr/include
- LIBS += -L../util/.libs -lmyodbcutil -L/usr/lib -L/usr/local/lib -lodbc -lodbcinst
+ LIBS += -L../util -lmyodbcutil -L/usr/lib -L/usr/local/lib -lodbc -lodbcinst
}

# #########################################################

--- 1.36/myodbcinst/myodbcinst.c 2005-02-16 11:37:47 -08:00
+++ 1.37/myodbcinst/myodbcinst.c 2005-08-22 02:27:52 -07:00
@@ -56,11 +56,7 @@
#include
#endif

-#ifdef HAVE_IODBCINST_H
-#include
-#else
#include
-#endif

#include "../util/MYODBCUtil.h"


--- 1.17/setup/MYODBCSetupDataSourceConfig.cpp 2005-08-21 22:02:03 -07:00
+++ 1.18/setup/MYODBCSetupDataSourceConfig.cpp 2005-08-22 02:27:52 -07:00
@@ -52,29 +52,31 @@

FYI: Just instantiating a QApplication can cause the problem so perhaps QApplication
messes up the environment or is otherwise confused by our use.
+
+ Linux
+
+ Problem with conflicting QApplication between libmyodbc3S and ODBCConfig. myodbc3c (edit)
+ and even myodbc3i (create/edit) seem to work fine.
*/
if ( !qApp )
{
int argc = 1;
char * argv[] = { pszAppName, NULL };
-
static QApplication app( argc, argv );
-// static QApplication app( argc, _environ );

- MYODBCSetupDataSourceDialog *pdialogDataSource = new MYODBCSetupDataSourceDialog( 0, pDataSource );
+// MYODBCSetupDataSourceDialog *pdialogDataSource = new MYODBCSetupDataSourceDialog( 0, pDataSource );
+//
+// if ( pdialogDataSource->exec() == QDialog::Accepted )
+// bReturn = TRUE;

- if ( pdialogDataSource->exec() == QDialog::Accepted )
- bReturn = TRUE;
-/*
MYODBCSetupDataSourceDialog dialogDataSource( NULL, pDataSource );

if ( dialogDataSource.exec() == QDialog::Accepted )
bReturn = TRUE;

- dialogDataSource.show();
-*/
- app.exec();
- delete pdialogDataSource;
+// dialogDataSource.show();
+// app.exec();
+// delete pdialogDataSource;
}
else
{

--- 1.24/setup/setup.pro 2005-08-21 22:02:04 -07:00
+++ 1.25/setup/setup.pro 2005-08-22 02:27:52 -07:00
@@ -35,7 +35,7 @@
# LANGUAGE = C++
# CPP_ALWAYS_CREATE_SOURCE = TRUE
include( ../config.qmake )
-CONFIG += qt dll
+CONFIG += qt plugin
include( ../defines.qmake )

# #########################################################
@@ -58,7 +58,7 @@
unix {
# DEFINES += HAVE_CONFIG_H
INCLUDEPATH += /usr/include
- LIBS += -L../util/.libs -lmyodbcutil -L/usr/lib -lodbc -lodbcinst
+ LIBS += -L../util -lmyodbcutil -L/usr/lib -lodbc -lodbcinst
libraries.path = /usr/lib
libraries.files = libmyodbc*
}

--- 1.13/util/MYODBCUtil.h 2005-08-19 02:28:46 -07:00
+++ 1.14/util/MYODBCUtil.h 2005-08-22 02:27:52 -07:00
@@ -35,17 +35,12 @@
#ifdef WIN32
#include
#define strcasecmp( a, b ) stricmp( a, b )
-#endif
-
#include
+#else
+#include
+#endif

-# if defined(HAVE_IODBCINST_H)
-#include
-#elif defined(HAVE_ODBCINST_H)
#include
-# endif
-
-/* #include */

/*
Handle case on OSX where we want to use GetPrivateProfileString (because it

--- 1.2/defines.qmake 2005-08-19 02:28:47 -07:00
+++ 1.3/defines.qmake 2005-08-22 02:27:52 -07:00
@@ -10,7 +10,7 @@
#
# #########################################################

-DEFINES += HAVE_SQLGETPRIVATEPROFILESTRING HAVE_ODBCINST_H
+# DEFINES += HAVE_SQLGETPRIVATEPROFILESTRING HAVE_ODBCINST_H
DEFINES += PORTABLE_GUI

win32 {
@@ -18,4 +18,7 @@
# DEFINES += WIN32
}

+unix {
+ DEFINES += _UNIX_
+}


--- 1.2/driver/driver.pro 2005-08-19 02:28:48 -07:00
+++ 1.3/driver/driver.pro 2005-08-22 02:27:52 -07:00
@@ -30,7 +30,7 @@
!win32:VERSION = 3.51.12
OBJECTS_DIR = .tmp
include( ../config.qmake )
-CONFIG += plugin dll
+CONFIG += plugin
include( ../defines.qmake )
include( ../mysql.qmake )

@@ -75,9 +75,9 @@
# on unix - but this will do as alternative.
# #########################################################
unix {
- DEFINES += HAVE_CONFIG_H
+# DEFINES += HAVE_CONFIG_H
INCLUDEPATH += /usr/include
- LIBS += -L../util/.libs -lmyodbcutil -L/usr/lib -lodbc -lodbcinst
+ LIBS += -L../util -lmyodbcutil -L/usr/lib -lodbc -lodbcinst
libraries.path = /usr/lib
libraries.files = libmyodbc*
}

--- 1.2/mysql.qmake 2005-08-19 02:28:48 -07:00
+++ 1.3/mysql.qmake 2005-08-22 02:27:52 -07:00
@@ -29,8 +29,8 @@
# UNIX
# #########################################################
unix {
- INCLUDEPATH += /usr/local/mysql/include
- LIBS += -L/usr/local/mysql/lib -lmysqlclient
+ INCLUDEPATH += /usr/include/mysql
+ LIBS += -L/usr/lib/mysql -lmysqlclient
}



--- 1.3/root.vpj 2005-08-19 02:28:45 -07:00
+++ 1.4/root.vpj 2005-08-22 02:27:52 -07:00
@@ -64,6 +64,7 @@
Name="Other Files"
Filters="">
+




--- 1.5/imyodbc/imyodbc.h 2005-03-17 12:48:19 -08:00
+++ 1.6/imyodbc/imyodbc.h 2005-08-22 02:27:52 -07:00
@@ -7,6 +7,8 @@

#ifdef WIN32
#include
+#else
+ #include
#endif

#include

--- 1.14/scripts/myodbc3.spec.sh 2005-02-16 11:37:47 -08:00
+++ 1.15/scripts/myodbc3.spec.sh 2005-08-22 02:27:52 -07:00
@@ -5,18 +5,18 @@
#

%define myodbc_version @VERSION@
-%define release 2
+%define release 1

Name: MyODBC
Summary: An ODBC 3.51 driver for MySQL
Group: Applications/Databases
Version: %{myodbc_version}
-Release: 2
+Release: %{release}
Copyright: Public Domain, GPL
Source0: %{name}-%{version}.tar.gz
URL: http://www.mysql.com/
Vendor: MySQL AB
-Packager: Peter Harvey
+Packager: Peter Harvey

%define prefix /usr

@@ -28,7 +28,7 @@
%description
MyODBC is an ODBC (3.50) level 0 (with level 1 and level 2 features)
driver for connecting an ODBC-aware application to MySQL. MyODBC works on
-Windows 9x/Me/NT/2000/XP, and most Unix platforms (incl. OSX and Linux).
+Windows NT/2000/XP, and most Unix platforms (incl. OSX and Linux).

MyODBC 3.51 is an enhanced version of MyODBC 2.50 to meet ODBC 3.5
specification. The driver is commonly referred to as 'MySQL ODBC 3.51 Driver'.

--- 1.47/driver/myodbc3.h 2005-08-08 11:11:02 -07:00
+++ 1.48/driver/myodbc3.h 2005-08-22 02:27:52 -07:00
@@ -91,6 +91,7 @@
#pragma pack(1)
#endif

+#include
#include
#include
#include
@@ -98,30 +99,15 @@

#ifdef _UNIX_

-/*
- If iODBC/unixODBC exits include their headers
-*/
-#if defined(HAVE_ISQL_H) && defined(HAVE_ISQLEXT_H)
-# include
-# include
-#elif defined(HAVE_SQL_H) && defined(HAVE_SQLEXT_H)
-# include
-# include
-#endif
-
-#if defined(HAVE_SQLGETPRIVATEPROFILESTRING)
-# if defined(HAVE_IODBCINST_H)
-# include
-# elif defined(HAVE_ODBCINST_H)
-# include
-# endif
-#else
+#include
+#include
+#include

-int _myodbc_SQLGetPrivateProfileString(char *section, char *entry, char *def_value,
- char *buf, int buf_len,
- char *filename);
-#define SQLGetPrivateProfileString _myodbc_SQLGetPrivateProfileString
-#endif /* HAVE_IODBCINST */
+#ifndef SYSTEM_ODBC_INI
+#define BOTH_ODBC_INI ODBC_BOTH_DSN
+#define USER_ODBC_INI ODBC_USER_DSN
+#define SYSTEM_ODBC_INI ODBC_SYSTEM_DSN
+#endif

/*
If SQL_API is not defined, define it, unixODBC doesn't have this

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org