opnsense-src/contrib/sendmail/include/sm/bdb.h

48 lines
1.3 KiB
C
Raw Normal View History

2003-02-08 15:31:29 -05:00
/*
2014-12-11 23:10:50 -05:00
* Copyright (c) 2002, 2003, 2014 Proofpoint, Inc. and its suppliers.
2003-02-08 15:31:29 -05:00
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*
2014-05-21 23:45:17 -04:00
* $Id: bdb.h,v 1.5 2013-11-22 20:51:31 ca Exp $
2003-02-08 15:31:29 -05:00
*/
#ifndef SM_BDB_H
#define SM_BDB_H
#if NEWDB
# include <db.h>
# ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
# endif /* ! DB_VERSION_MAJOR */
2014-12-11 23:10:50 -05:00
# if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5
2003-02-08 15:31:29 -05:00
# define DBTXN NULL ,
/*
** Always turn on DB_FCNTL_LOCKING for DB 4.1.x since its
** "workaround" for accepting an empty (locked) file depends on
** this flag. Notice: this requires 4.1.24 + patch (which should be
** part of 4.1.25).
*/
# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
2014-12-11 23:10:50 -05:00
# else /* (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5 */
2003-02-08 15:31:29 -05:00
# define DBTXN
2003-03-29 14:12:53 -05:00
# if !HASFLOCK && defined(DB_FCNTL_LOCKING)
2003-02-08 15:31:29 -05:00
# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
2003-03-29 14:12:53 -05:00
# else /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
2003-02-08 15:31:29 -05:00
# define SM_DB_FLAG_ADD(flag) ((void) 0)
2003-03-29 14:12:53 -05:00
# endif /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
2003-02-08 15:31:29 -05:00
2014-12-11 23:10:50 -05:00
# endif /* (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR >= 5 */
2003-02-08 15:31:29 -05:00
#endif /* NEWDB */
#endif /* ! SM_BDB_H */