From 4b994e2dc90c4d4c0d37a3cdc259e2030aee4a67 Mon Sep 17 00:00:00 2001 From: Luiz Rafael Culik Date: Mon, 29 Oct 2001 00:32:41 +0000 Subject: [PATCH] See changelog 2001-10-28 22:40 GMT -3 --- harbour/ChangeLog | 7 +++++++ harbour/contrib/mysql/mysql.c | 14 +++++++++----- harbour/utils/hbmake/hbmutils.prg | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bbebd69d3d..1d286bad6b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,10 @@ +2001-10-27 22:40 GMT -3 Luiz Rafael Culik + * contrib/mysql/mysql.c + * Fixed an small bug on SQLCONNECT + *utils/hbmake/hbmutils.prg + * Fixed an small bug, on GetSourceFiles() and GetMacrosDir() with was not returning + the valid files names/directory names under linux + 2001-10-27 20:15 GMT+3 Alexander Kresin * source/rdd/dbfntx1.c * logical index support added ( code posted by Matteo Baccan ) diff --git a/harbour/contrib/mysql/mysql.c b/harbour/contrib/mysql/mysql.c index d1cb88e84b..ab5f720568 100644 --- a/harbour/contrib/mysql/mysql.c +++ b/harbour/contrib/mysql/mysql.c @@ -71,13 +71,16 @@ HB_FUNC(SQLCONNECT) // MYSQL *mysql_real_connect(MYSQL*, char * host, char * user, char * password, char * db, uint port, char *, uint flags) { MYSQL * mysql; - + const char *szHost=hb_parc(1); + const char *szUser=hb_parc(2); + const char *szPass=hb_parc(3); #if MYSQL_VERSION_ID > 32200 /* from 3.22.x of MySQL there is a new parameter in mysql_real_connect() call, that is char * db which is not used here */ - if ( (mysql = mysql_init((MYSQL*) 0)) ) + if ( (mysql = mysql_init((MYSQL*) 0)) ) + { - if( mysql_real_connect( mysql, _parc(1), _parc(2), _parc(3), NULL, 0, NULL, 0) ) + if( mysql_real_connect( mysql, szHost, szUser, szPass, 0, MYSQL_PORT, NULL, 0) ) _retnl((long) mysql); else { @@ -103,7 +106,8 @@ HB_FUNC(SQLCLOSE) // void mysql_close(MYSQL *mysql) HB_FUNC(SQLSELECTD) // int mysql_select_db(MYSQL *, char *) { - _retnl((long) mysql_select_db((MYSQL *)_parnl(1), _parc(2))); + const char *db=hb_parc(2); + _retnl((long) mysql_select_db((MYSQL *)_parnl(1), db)); } @@ -322,4 +326,4 @@ HB_FUNC(SQLHOSTINFO) HB_FUNC(SQLSRVINFO) { _retc( mysql_get_server_info( (MYSQL *)_parnl(1) ) ); -} \ No newline at end of file +} diff --git a/harbour/utils/hbmake/hbmutils.prg b/harbour/utils/hbmake/hbmutils.prg index 4bb37f15c8..b60f9310d6 100644 --- a/harbour/utils/hbmake/hbmutils.prg +++ b/harbour/utils/hbmake/hbmutils.prg @@ -17,7 +17,7 @@ Function GetSourceFiles( lSubdir ) Local adirs AS ARRAY Local aRet AS ARRAY := {} - Local lLinux := At( 'linux', Os() ) > 0 + Local lLinux := At( 'linux', lower(Os()) ) > 0 Local cdir as String := If( !llinux, '\' + Curdir() + '\', '/' + Curdir() + '/' ) Local aStru := { cDir } Local aData AS ARRAY @@ -200,7 +200,7 @@ Return cPath Function GetSourceDirMacros() Local adirs AS ARRAY - Local lLinux := At( 'linux', Os() ) > 0 + Local lLinux := At( 'linux', lower(Os()) ) > 0 Local cdir as String := If( llinux, '/' + Curdir() + '/', '\' + Curdir() + '\' ) Local aStru := { cDir }