2 * See the file LICENSE for redistribution information.
5 * Sleepycat Software. All rights reserved.
11 static const char sccsid[] = "@(#)os_oflags.c 10.2 (Sleepycat) 10/24/97";
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
24 * Convert open(2) flags to DB flags.
26 * PUBLIC: int __db_oflags __P((int));
36 * Convert POSIX 1003.1 open(2) flags to DB flags. Not an exact
37 * science as most POSIX implementations don't have a flag value
38 * for O_RDONLY, it's simply the lack of a write flag.
43 if (!(oflags & (O_RDWR | O_WRONLY)) || oflags & O_RDONLY)
46 dbflags |= DB_TRUNCATE;