X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2115c88f381b95cf6d423a5d3128ccbe20c4fa1..7beba2fc73283f5b750227459da57e66bcd475f5:/src/common/db.cpp diff --git a/src/common/db.cpp b/src/common/db.cpp index 6f9c399bff..91f822b736 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -57,6 +57,7 @@ #ifndef WX_PRECOMP #include "wx/string.h" #endif //WX_PRECOMP + #include "wx/filefn.h" #endif #if wxMAJOR_VERSION == 1 @@ -83,12 +84,22 @@ #include "wx/db.h" #endif -DbList* WXDLLEXPORT PtrBegDbList = 0; +DbList WXDLLEXPORT *PtrBegDbList = 0; #if __WXDEBUG__ > 0 + #if wxMAJOR_VERSION == 2 + #include "wx/object.h" + #include "wx/list.h" + #include "wx/utils.h" + #include "wx/msgdlg.h" + #endif extern wxList TablesInUse; #endif +#ifdef __MWERKS__ +#define stricmp _stricmp +#define strnicmp _strnicmp +#endif // SQL Log defaults to be used by GetDbConnection enum sqlLog SQLLOGstate = sqlLogOFF; @@ -767,8 +778,8 @@ void wxDB::Close(void) tiu = (CstructTablesInUse *)pNode->Data(); if (tiu->pDb == this) { - sprintf(s, "(%-20s) tableID:[%6lu] pDb:[%lu]", tiu->tableName,tiu->tableID,tiu->pDb); - sprintf(s2,"Orphaned found using pDb:[%lu]",this); + sprintf(s, "(%-20s) tableID:[%6lu] pDb:[%p]", tiu->tableName,tiu->tableID,tiu->pDb); + sprintf(s2,"Orphaned found using pDb:[%p]",this); wxMessageBox (s,s2); } pNode = pNode->Next(); @@ -776,7 +787,8 @@ void wxDB::Close(void) #endif // Copy the error messages to a global variable - for (int i = 0; i < DB_MAX_ERROR_HISTORY; i++) + int i; + for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) strcpy(DBerrorList[i],errorList[i]); } // wxDB::Close() @@ -1709,7 +1721,7 @@ DBMS wxDB::Dbms(void) return(dbmsMS_SQL_SERVER); if (!stricmp(dbInf.dbmsName,"MySQL")) return(dbmsMY_SQL); - if (!stricmp(dbInf.dbmsName,"PostgresSQL")) // v6.5.0 + if (!stricmp(dbInf.dbmsName,"PostgreSQL")) // v6.5.0 return(dbmsPOSTGRES); if (!stricmp(dbInf.dbmsName,"ACCESS")) return(dbmsACCESS); @@ -1721,7 +1733,7 @@ DBMS wxDB::Dbms(void) /********** GetDbConnection() **********/ -wxDB* WXDLLEXPORT GetDbConnection(DbStuff *pDbStuff) +wxDB WXDLLEXPORT *GetDbConnection(DbStuff *pDbStuff) { DbList *pList;