use __USE_OPEN_FLAGS macro from db.h
SCCS-vsn: lib/libc/db/hash/hash.c 5.29
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash.c 5.28 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash.c 5.29 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
static int hash_close __P((DB *));
static int hash_delete __P((const DB *, const DBT *, u_int));
static int hash_get __P((const DB *, const DBT *, DBT *, u_int));
static int hash_close __P((DB *));
static int hash_delete __P((const DB *, const DBT *, u_int));
static int hash_get __P((const DB *, const DBT *, DBT *, u_int));
-static int hash_put __P((const DB *, const DBT *, const DBT *, u_int));
+static int hash_put __P((const DB *, DBT *, const DBT *, u_int));
static void *hash_realloc __P((SEGMENT **, int, int));
static int hash_seq __P((const DB *, DBT *, DBT *, u_int));
static int hash_sync __P((const DB *));
static void *hash_realloc __P((SEGMENT **, int, int));
static int hash_seq __P((const DB *, DBT *, DBT *, u_int));
static int hash_sync __P((const DB *));
* But, the field in the hashp structure needs to be accurate so that
* we can check accesses.
*/
* But, the field in the hashp structure needs to be accurate so that
* we can check accesses.
*/
- hashp->flags = flags = flags & (O_CREAT | O_EXCL | O_EXLOCK |
- O_RDONLY | O_RDWR | O_SHLOCK | O_TRUNC);
+ hashp->flags = flags = flags & __USE_OPEN_FLAGS;
new_table = 0;
if (!file || (flags & O_TRUNC) ||
new_table = 0;
if (!file || (flags & O_TRUNC) ||
static int
hash_put(dbp, key, data, flag)
const DB *dbp;
static int
hash_put(dbp, key, data, flag)
const DB *dbp;
+ DBT *key;
+ const DBT *data;
u_int flag;
{
if (flag && flag != R_NOOVERWRITE) {
u_int flag;
{
if (flag && flag != R_NOOVERWRITE) {