]> git.pld-linux.org Git - packages/dirmngr.git/blob - dirmngr-db4.patch
- new, patched for db 4.1 and standard info directory
[packages/dirmngr.git] / dirmngr-db4.patch
1 --- dirmngr-0.4.5/configure.ac.orig     2003-05-12 23:33:58.000000000 +0200
2 +++ dirmngr-0.4.5/configure.ac  2003-07-26 11:07:11.000000000 +0200
3 @@ -271,11 +271,11 @@
4  # Checks for header files.
5  AC_HEADER_STDC
6  AC_CHECK_HEADERS([string.h])
7 -AC_CHECK_HEADERS(db2/db.h,,[echo -e "You need Berkeley DB2 to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
8 -AC_HAVE_LIBRARY(db2,,[echo -e "You need Berkeley DB2 to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
9 +AC_CHECK_HEADERS(db.h,,[echo -e "You need Berkeley DB to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
10 +AC_HAVE_LIBRARY(db,,[echo -e "You need Berkeley DB to build DirMngr.\nGet a copy from http://www.sleepycat.com/download.html"; exit 1;])
11  
12  # db2 seems to come in two variants with 3 and 4 parameters to cursor(), better check:
13 -AC_TRY_COMPILE([#include <db2/db.h>],[  
14 +AC_TRY_COMPILE([#include <db.h>],[  
15      DB* dbf; 
16      DBC *cursorp; 
17      dbf->cursor( dbf, NULL, &cursorp, 0 )
18 --- dirmngr-0.4.5/src/crlcache.h.orig   2003-02-23 01:28:26.000000000 +0100
19 +++ dirmngr-0.4.5/src/crlcache.h        2003-07-26 11:09:55.000000000 +0200
20 @@ -23,9 +23,9 @@
21  
22  #include <config.h>
23  #include "../jnlib/types.h"
24 -#ifdef HAVE_DB2_DB_H
25 +#ifdef HAVE_DB_H
26  #include <limits.h>
27 -#include <db2/db.h>
28 +#include <db.h>
29  #else
30  /* Error */
31  #endif
32 --- dirmngr-0.4.5/src/crlcache.c.orig   2003-02-23 01:27:49.000000000 +0100
33 +++ dirmngr-0.4.5/src/crlcache.c        2003-07-26 11:17:00.000000000 +0200
34 @@ -55,7 +55,18 @@
35  
36  static int mydbopen( const char* file, DB** dbpp )
37  {
38 +#if (DB_VERSION_MAJOR >= 3)
39 +  int ret;
40 +  if ((ret = db_create(dbpp, NULL, 0)) != 0)
41 +    return ret;
42 +#  if (DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)
43 +  return (*dbpp)->open(*dbpp, NULL, file, NULL, DB_HASH, DB_CREATE, S_IRUSR|S_IWUSR);
44 +#  else /* db 3.0 .. 4.0 */
45 +  return (*dbpp)->open(*dbpp, file, NULL, DB_HASH, DB_CREATE, S_IRUSR|S_IWUSR);
46 +#  endif
47 +#else
48    return db_open( file, DB_HASH, DB_CREATE, S_IRUSR|S_IWUSR, NULL, NULL, dbpp );
49 +#endif
50  }
51  
52  static int mydbclose( DB* dbp )
This page took 0.06726 seconds and 4 git commands to generate.