|
|
Sponsor |
bk commit - MyODBC 3.51 (1.351): msg#00020db.mysql.odbc
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@xxxxx ChangeSet 1.351 04/08/06 13:17:15 peterh@xxxxxxxxx +5 -0 tweeks from testing install stuff on OSX setup/MYODBCSetupGetAttributesParsed.c 1.5 04/08/06 13:17:14 peterh@xxxxxxxxx +9 -7 tweeks from testing install stuff on OSX setup/MYODBCSetupDataSourceConfig.cpp 1.3 04/08/06 13:17:14 peterh@xxxxxxxxx +12 -1 tweeks from testing install stuff on OSX setup/MYODBCSetupDSNExists.c 1.3 04/08/06 13:17:14 peterh@xxxxxxxxx +14 -4 tweeks from testing install stuff on OSX setup/MYODBCSetup.h 1.4 04/08/06 13:17:14 peterh@xxxxxxxxx +1 -0 tweeks from testing install stuff on OSX setup/ConfigDSN.c 1.4 04/08/06 13:17:14 peterh@xxxxxxxxx +0 -1 tweeks from testing install stuff on OSX # 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: peterh # Host: peter-harveys-computer.local # Root: /Users/pharvey/SandBox/MySQL/myodbc-3.51 --- 1.3/setup/ConfigDSN.c 2004-08-06 02:38:56 -07:00 +++ 1.4/setup/ConfigDSN.c 2004-08-06 13:17:14 -07:00 @@ -27,7 +27,6 @@ MYODBC_NAMEVALUE **aNameValues; BOOL bReturn = FALSE; -printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); aNameValues = MYODBCSetupGetAttributesParsed( pszAttributes ); /*! --- 1.3/setup/MYODBCSetup.h 2004-08-05 20:22:57 -07:00 +++ 1.4/setup/MYODBCSetup.h 2004-08-06 13:17:14 -07:00 @@ -32,6 +32,7 @@ #ifndef max #define max( a, b ) (((a) > (b)) ? (a) : (b)) +#define min( a, b ) (((a) < (b)) ? (a) : (b)) #endif #ifdef Q_WS_WIN --- 1.2/setup/MYODBCSetupDSNExists.c 2004-08-06 02:38:56 -07:00 +++ 1.3/setup/MYODBCSetupDSNExists.c 2004-08-06 13:17:14 -07:00 @@ -22,14 +22,24 @@ with a single call to SQLGetPrivateProfileString() in off-chance that the section name exists with no name/value pairs. */ -printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); + + /*! + OSX + + SQLGetPrivateProfileString is the proper call and is available - but + at this time it appears utterly broken. So we call an alternative + instead. + */ +#ifdef Q_WS_MACX + if ( GetPrivateProfileString( NULL, NULL, NULL, szSectionNames, sizeof( szSectionNames ) - 1, "ODBC.INI" ) < 1 ) +#else if ( SQLGetPrivateProfileString( NULL, NULL, NULL, szSectionNames, sizeof( szSectionNames ) - 1, "ODBC.INI" ) < 1 ) +#endif { - /*! oops - error - we take easy way out and just say we did not find it */ - return FALSE; + /*! oops - we take easy way out and just say we did not find it */ + return FALSE; } -printf( "[PAH][%s][%d]\n", __FILE__, __LINE__ ); /*! Scan result and return TRUE if we find a match. */ --- 1.2/setup/MYODBCSetupDataSourceConfig.cpp 2004-08-06 02:38:56 -07:00 +++ 1.3/setup/MYODBCSetupDataSourceConfig.cpp 2004-08-06 13:17:14 -07:00 @@ -1,5 +1,16 @@ #include "MYODBCSetupDataSourceDialog.h" +/*! + OSX + + We get an alarming warning from qt when we fail to provide + the app name with a fully qualified absolute path. And the + problem is that we do not have any real app path to give - + so we make one up. Perhaps the real app name can be found + but this seems to work. (busy busy so moveon.org) +*/ +char *pszAppName = "/myodbcinst"; + BOOL MYODBCSetupDataSourceConfig( HWND hWnd, WORD nRequest, LPCSTR pszDriver, MYODBC_NAMEVALUE **aNameValues ) { BOOL bReturn; @@ -7,7 +18,7 @@ if ( !qApp ) { int argc = 1; - char * argv[] = { "setup", NULL }; + char * argv[] = { pszAppName, NULL }; static QApplication app( argc, argv ); --- 1.4/setup/MYODBCSetupGetAttributesParsed.c 2004-08-06 02:38:56 -07:00 +++ 1.5/setup/MYODBCSetupGetAttributesParsed.c 2004-08-06 13:17:14 -07:00 @@ -9,11 +9,11 @@ */ typedef enum tMYODBC_ATTR_PARSE_STATE { - MYODBC_ATTR_PARSE_STATE_NAME_START, - MYODBC_ATTR_PARSE_STATE_NAME, - MYODBC_ATTR_PARSE_STATE_EQUAL, - MYODBC_ATTR_PARSE_STATE_VALUE_START, - MYODBC_ATTR_PARSE_STATE_VALUE + MYODBC_ATTR_PARSE_STATE_NAME_START, /* looking for start of name */ + MYODBC_ATTR_PARSE_STATE_NAME, /* looking for end of name */ + MYODBC_ATTR_PARSE_STATE_EQUAL, /* looking for equal sign */ + MYODBC_ATTR_PARSE_STATE_VALUE_START, /* looking for start of value */ + MYODBC_ATTR_PARSE_STATE_VALUE /* looking for end of value */ } MYODBC_ATTR_PARSE_STATE; @@ -26,11 +26,12 @@ if ( !s ) return 0; - nAvail = max( strlen(s) + 1, n + 1 ); + nAvail = min( strlen(s) + 1, n + 1 ); p = malloc( nAvail ); memcpy( p, s, nAvail ); - p[nAvail] = '\0'; + p[nAvail - 1] = '\0'; +/* printf( "[PAH][%s][%d] nAvail=%d p=(%s)\n", __FILE__, __LINE__, nAvail, p ); */ return p; } #endif @@ -84,6 +85,7 @@ aNameValues[nLastAttr] = (MYODBC_NAMEVALUE*)malloc( sizeof(MYODBC_NAMEVALUE) ); aNameValues[nLastAttr]->pszName = (char *)strndup( pAnchorChar, pScanChar - pAnchorChar ); aNameValues[nLastAttr]->pszValue= 0; + /* add a new null attr to array for termination */ nLastAttr++; aNameValues = (MYODBC_NAMEVALUE**)realloc( aNameValues, sizeof(MYODBC_NAMEVALUE*) * (nLastAttr + 1) ); -- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@xxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | bk commit - MyODBC 3.51 (1.348), peterh |
|---|---|
| Next by Date: | bk commit - MyODBC 3.51 (1.352), peterh |
| Previous by Thread: | bk commit - MyODBC 3.51 (1.348), peterh |
| Next by Thread: | bk commit - MyODBC 3.51 (1.352), peterh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|