Deleted Added
full compact
bdb.h (302408) bdb.h (110560)
1/*
1/*
2 * Copyright (c) 2002, 2003, 2014 Proofpoint, Inc. and its suppliers.
2 * Copyright (c) 2002 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 *
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
8 *
9 *
3 * All rights reserved.
4 *
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
8 *
9 *
10 * $Id: bdb.h,v 1.5 2013-11-22 20:51:31 ca Exp $
10 * $Id: bdb.h,v 1.1.2.3 2002/12/05 05:07:44 ca Exp $
11 */
12
13#ifndef SM_BDB_H
14#define SM_BDB_H
15
16#if NEWDB
17# include <db.h>
18# ifndef DB_VERSION_MAJOR
19# define DB_VERSION_MAJOR 1
20# endif /* ! DB_VERSION_MAJOR */
21
11 */
12
13#ifndef SM_BDB_H
14#define SM_BDB_H
15
16#if NEWDB
17# include <db.h>
18# ifndef DB_VERSION_MAJOR
19# define DB_VERSION_MAJOR 1
20# endif /* ! DB_VERSION_MAJOR */
21
22# if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5
22# if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
23
24# define DBTXN NULL ,
25
26/*
27** Always turn on DB_FCNTL_LOCKING for DB 4.1.x since its
28** "workaround" for accepting an empty (locked) file depends on
29** this flag. Notice: this requires 4.1.24 + patch (which should be
30** part of 4.1.25).
31*/
32
33# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
34
23
24# define DBTXN NULL ,
25
26/*
27** Always turn on DB_FCNTL_LOCKING for DB 4.1.x since its
28** "workaround" for accepting an empty (locked) file depends on
29** this flag. Notice: this requires 4.1.24 + patch (which should be
30** part of 4.1.25).
31*/
32
33# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
34
35# else /* (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5 */
35# else /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */
36
37# define DBTXN
36
37# define DBTXN
38# if !HASFLOCK && defined(DB_FCNTL_LOCKING)
38# if !HASFLOCK
39# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
39# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
40# else /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
40# else /* !HASFLOCK */
41# define SM_DB_FLAG_ADD(flag) ((void) 0)
41# define SM_DB_FLAG_ADD(flag) ((void) 0)
42# endif /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
42# endif /* !HASFLOCK */
43
43
44# endif /* (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5 */
44# endif /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */
45#endif /* NEWDB */
46
47#endif /* ! SM_BDB_H */
45#endif /* NEWDB */
46
47#endif /* ! SM_BDB_H */