subversion.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- apr-util/dbm/apr_dbm_berkeleydb.c.orig 2002-12-04 21:53:07.000000000 +0100
  2. +++ apr-util/dbm/apr_dbm_berkeleydb.c 2002-12-05 20:35:36.000000000 +0100
  3. @@ -73,9 +73,7 @@
  4. */
  5. #if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
  6. -/* At this time, there are no differences from our perspective between
  7. - * DB3 and DB4. */
  8. -#define DB_VER 3
  9. +#define DB_VER 4
  10. #elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 3)
  11. #define DB_VER 3
  12. #elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 2)
  13. @@ -193,7 +191,17 @@
  14. {
  15. int dberr;
  16. -#if DB_VER == 3
  17. +#if DB_VER == 4 && DB_VERSION_MINOR >= 1
  18. + if ((dberr = db_create(&file.bdb, NULL, 0)) == 0) {
  19. + if ((dberr = (*file.bdb->open)(file.bdb, NULL, pathname, NULL,
  20. + DB_HASH, dbmode,
  21. + apr_posix_perms2mode(perm))) != 0) {
  22. + /* close the DB handler */
  23. + (void) (*file.bdb->close)(file.bdb, 0);
  24. + }
  25. + }
  26. + file.curs = NULL;
  27. +#elif DB_VER == 3
  28. if ((dberr = db_create(&file.bdb, NULL, 0)) == 0) {
  29. if ((dberr = (*file.bdb->open)(file.bdb, pathname, NULL,
  30. DB_HASH, dbmode,
  31. @@ -339,7 +347,7 @@
  32. dberr = (*f->bdb->seq)(f->bdb, &first, &data, R_FIRST);
  33. #else
  34. if ((dberr = (*f->bdb->cursor)(f->bdb, NULL, &f->curs
  35. -#if DB_VER == 3
  36. +#if (DB_VER == 3 || DB_VER == 4)
  37. , 0
  38. #elif (DB_VERSION_MAJOR == 2) && (DB_VERSION_MINOR > 5)
  39. , 0