Ignore:
Timestamp:
28/12/2005 11:38:04 (6 years ago)
Author:
martin
Message:

Now supports Berkeley DB versions >= 4.1 in addition to 1.x. The versions inbetween are not supported because they require code changes and I don't have them available to test against.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbackupd/BackupClientInodeToIDMap.cpp

    r217 r288  
    1515        #include <fcntl.h> 
    1616        #include <limits.h> 
    17         #include DB_HEADER 
     17        #include <db.h> 
    1818        #include <sys/stat.h> 
    1919#endif 
     
    6666        if(dbp != 0) 
    6767        { 
    68 #ifdef BERKELY_V4 
     68#if BDB_VERSION_MAJOR >= 3 
    6969                dbp->close(0); 
    7070#else 
     
    9595         
    9696        // Open the database file 
    97 #ifdef BERKELY_V4 
     97#if BDB_VERSION_MAJOR >= 3 
    9898        dbp = new Db(0,0); 
    9999        dbp->set_pagesize(1024);                /* Page size: 1K. */ 
     
    147147        if(dbp != 0) 
    148148        { 
    149 #ifdef BERKELY_V4 
     149#if BDB_VERSION_MAJOR >= 3 
    150150                if(dbp->close(0) != 0) 
    151151#else 
     
    189189        rec.mInDirectory = InDirectory; 
    190190 
    191 #ifdef BERKELY_V4 
     191#if BDB_VERSION_MAJOR >= 3 
    192192        Dbt key(&InodeRef, sizeof(InodeRef)); 
    193193        Dbt data(&rec, sizeof(rec)); 
     
    251251        } 
    252252 
    253 #ifdef BERKELY_V4 
     253#if BDB_VERSION_MAJOR >= 3 
    254254        Dbt key(&InodeRef, sizeof(InodeRef)); 
    255255        Dbt data(0, 0); 
     
    281281 
    282282        // Check for sensible return 
    283 #ifdef BERKELY_V4 
     283#if BDB_VERSION_MAJOR >= 3 
    284284        if(key.get_data() == 0 || data.get_size() != sizeof(IDBRecord)) 
    285285        { 
Note: See TracChangeset for help on using the changeset viewer.