]> git.saurik.com Git - wxWidgets.git/commitdiff
wxStrnicmp() function is not defined under windows, so I've provided a workaround...
authorGeorge Tasker <gtasker@allenbrook.com>
Mon, 8 Nov 1999 01:17:24 +0000 (01:17 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Mon, 8 Nov 1999 01:17:24 +0000 (01:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/db.cpp

index 3842b2cb11929ab98d2061faeda900fb82a0cab0..c356007e1f537cdf2b98332b45c86c73dbc3b03d 100644 (file)
@@ -63,6 +63,7 @@
                 #include "wx/msgdlg.h"
        #endif
        #include "wx/filefn.h"
+       #include "wx/wxchar.h"
 #endif
 
 #if wxMAJOR_VERSION == 1
@@ -1706,7 +1707,12 @@ bool wxDB::WriteSqlLog(char *logMsg)
  */
 DBMS wxDB::Dbms(void)
 {
-       if (!wxStrnicmp(dbInf.dbmsName,"Oracle",6))
+       wxChar baseName[20];
+
+       wxStrncpy(baseName,dbInf.dbmsName,6);
+       baseName[6] = 0;
+//     if (!wxStrnicmp(dbInf.dbmsName,"Oracle",6))
+       if (!wxStricmp(baseName,"Oracle"))
                return(dbmsORACLE);
        if (!wxStricmp(dbInf.dbmsName,"Adaptive Server Anywhere"))
                return(dbmsSYBASE_ASA);
@@ -1720,7 +1726,10 @@ DBMS wxDB::Dbms(void)
                return(dbmsPOSTGRES);
        if (!wxStricmp(dbInf.dbmsName,"ACCESS"))
                return(dbmsACCESS);
-       if (!wxStrnicmp(dbInf.dbmsName,"DBASE",5))
+       wxStrncpy(baseName,dbInf.dbmsName,5);
+       baseName[5] = 0;
+//     if (!wxStrnicmp(dbInf.dbmsName,"DBASE",5))
+       if (!wxStricmp(baseName,"DBASE"))
                return(dbmsDBASE);
        return(dbmsUNIDENTIFIED);