OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   16-Oct-2002 18:14:52
  Branch: HEAD                             Handle: 2002101617145100

  Added files:
    openpkg-src/imapd       imapd-db4.patch

  Log:
    Repair build to comply with the new Berkley db 4.1.24 API.

  Summary:
    Revision    Changes     Path
    1.1         +39 -0      openpkg-src/imapd/imapd-db4.patch
  ____________________________________________________________________________

  Index: openpkg-src/imapd/imapd-db4.patch
  ============================================================
  $ cvs update -p -r1.1 imapd-db4.patch
  diff -Naur cyrus-imapd-2.1.9.orig/lib/cyrusdb_db3.c 
cyrus-imapd-2.1.9/lib/cyrusdb_db3.c
  --- cyrus-imapd-2.1.9.orig/lib/cyrusdb_db3.c  Tue Aug  6 18:55:03 2002
  +++ cyrus-imapd-2.1.9/lib/cyrusdb_db3.c       Wed Oct 16 18:11:24 2002
  @@ -228,10 +228,15 @@
   
   static int mysync(void)
   {
  +#if (DB_VERSION_MAJOR <= 4 && DB_VERSION_MINOR < 1)
       int r;
  +#endif
   
       assert(dbinit);
   
  +#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1)
  +     txn_checkpoint(dbenv, 0, 0, 0);
  +#else
       do {
   #if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0))
        r = txn_checkpoint(dbenv, 0, 0, 0);
  @@ -244,6 +249,7 @@
               db_strerror(r));
        return CYRUSDB_IOERROR;
       }
  +#endif
   
       return 0;
   }
  @@ -347,7 +353,11 @@
       }
       /* xxx set comparator! */
   
  +#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1)
  +    r = db->open(db, NULL, fname, NULL, DB_BTREE, DB_CREATE, 0664);
  +#else
       r = db->open(db, fname, NULL, DB_BTREE, DB_CREATE, 0664);
  +#endif
       if (r != 0) {
        syslog(LOG_ERR, "DBERROR: opening %s: %s", fname, db_strerror(r));
        return CYRUSDB_IOERROR;
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to