bdb.h revision 256281
1275072Semaste/* 2275072Semaste * Copyright (c) 2002, 2003 Sendmail, Inc. and its suppliers. 3275072Semaste * All rights reserved. 4275072Semaste * 5275072Semaste * By using this file, you agree to the terms and conditions set 6275072Semaste * forth in the LICENSE file which can be found at the top level of 7275072Semaste * the sendmail distribution. 8275072Semaste * 9275072Semaste * 10275072Semaste * $Id: bdb.h,v 1.4 2003/03/06 16:30:05 ca Exp $ 11275072Semaste */ 12275072Semaste 13275072Semaste#ifndef SM_BDB_H 14275072Semaste#define SM_BDB_H 15275072Semaste 16275072Semaste#if NEWDB 17280031Sdim# include <db.h> 18275072Semaste# ifndef DB_VERSION_MAJOR 19275072Semaste# define DB_VERSION_MAJOR 1 20275072Semaste# endif /* ! DB_VERSION_MAJOR */ 21275072Semaste 22280031Sdim# if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 23280031Sdim 24275072Semaste# define DBTXN NULL , 25275072Semaste 26280031Sdim/* 27280031Sdim** Always turn on DB_FCNTL_LOCKING for DB 4.1.x since its 28280031Sdim** "workaround" for accepting an empty (locked) file depends on 29280031Sdim** this flag. Notice: this requires 4.1.24 + patch (which should be 30280031Sdim** part of 4.1.25). 31280031Sdim*/ 32280031Sdim 33280031Sdim# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING 34275072Semaste 35280031Sdim# else /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */ 36280031Sdim 37280031Sdim# define DBTXN 38280031Sdim# if !HASFLOCK && defined(DB_FCNTL_LOCKING) 39280031Sdim# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING 40275072Semaste# else /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */ 41280031Sdim# define SM_DB_FLAG_ADD(flag) ((void) 0) 42280031Sdim# endif /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */ 43275072Semaste 44280031Sdim# endif /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */ 45275072Semaste#endif /* NEWDB */ 46280031Sdim 47280031Sdim#endif /* ! SM_BDB_H */ 48280031Sdim