[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesdk/kbabel/kbabeldict/modules/dbsearchengine
From:       Than Ngo <than () redhat ! de>
Date:       2004-11-22 22:40:27
Message-ID: 20041122224027.EACBB1714C () office ! kde ! org
[Download RAW message or body]

CVS commit by thanngo: 

fix build problem with db-4.3


  M +9 -0      database.cpp   1.49


--- kdesdk/kbabel/kbabeldict/modules/dbsearchengine/database.cpp  #1.48:1.49
@@ -729,5 +729,9 @@ DataBaseManager::count ()
 {
     DB_BTREE_STAT *dstat = 0;
+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
+    db->stat (db, NULL, &dstat, DB_FAST_STAT);
+#else
     db->stat (db, &dstat, DB_FAST_STAT);
+#endif
     int ret = dstat->bt_nkeys;
     free (dstat);
@@ -964,6 +968,11 @@ DataBaseManager::loadInfo ()
     DB_BTREE_STAT *stat;
 // memset(&stat,0,sizeof(DB_BTREE_STAT));
+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
+    if (infoDb->stat (infoDb, NULL, &stat, DB_FAST_STAT))
+        fprintf (stderr, "Cannot stat\n");
+#else
     if (infoDb->stat (infoDb, &stat, DB_FAST_STAT))
         fprintf (stderr, "Cannot stat\n");
+#endif
     nrec = stat->bt_nkeys;
     free (stat);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic