/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1997, 1998
* Sleepycat Software. All rights reserved.
*/
#include "config.h"
#ifndef lint
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
#include <fcntl.h>
#endif
#include "db_int.h"
/*
* __db_oflags --
* Convert open(2) flags to DB flags.
*
* PUBLIC: u_int32_t __db_oflags __P((int));
*/
int oflags;
{
/*
* XXX
* Convert POSIX 1003.1 open(2) flags to DB flags. Not an exact
* science as most POSIX implementations don't have a flag value
* for O_RDONLY, it's simply the lack of a write flag.
*/
dbflags = 0;
dbflags |= DB_TRUNCATE;
return (dbflags);
}
/*
* __db_omode --
* Convert a permission string to the correct open(2) flags.
*
* PUBLIC: int __db_omode __P((const char *));
*/
int
const char *perm;
{
int mode;
#ifndef S_IRUSR
#else
#endif /* _WIN32 || WIN16 */
#endif
mode = 0;
if (perm[0] == 'r')
return (mode);
}