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