2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1997-2009 Oracle. All rights reserved.
15 * Convert open(2) flags to DB flags.
17 * PUBLIC: u_int32_t __db_openflags __P((int));
20 __db_openflags(oflags)
31 dbflags |= DB_TRUNCATE;
35 * Convert POSIX 1003.1 open(2) mode flags to DB flags. This isn't
36 * an exact science as few POSIX implementations have a flag value
37 * for O_RDONLY, it's simply the lack of a write flag.
40 #define O_ACCMODE (O_RDONLY | O_RDWR | O_WRONLY)
42 switch (oflags & O_ACCMODE) {