diff options
Diffstat (limited to 'bdb/os/os_oflags.c')
-rw-r--r-- | bdb/os/os_oflags.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/bdb/os/os_oflags.c b/bdb/os/os_oflags.c index fd413bdacbe..f75178de75e 100644 --- a/bdb/os/os_oflags.c +++ b/bdb/os/os_oflags.c @@ -1,14 +1,14 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 1997, 1998, 1999, 2000 + * Copyright (c) 1997-2002 * Sleepycat Software. All rights reserved. */ #include "db_config.h" #ifndef lint -static const char revid[] = "$Id: os_oflags.c,v 11.6 2000/10/27 20:32:02 dda Exp $"; +static const char revid[] = "$Id: os_oflags.c,v 11.9 2002/01/11 15:53:00 bostic Exp $"; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -72,23 +72,35 @@ __db_omode(perm) { int mode; -#ifndef S_IRUSR #ifdef DB_WIN32 +#ifndef S_IRUSR #define S_IRUSR S_IREAD /* R for owner */ +#endif +#ifndef S_IWUSR #define S_IWUSR S_IWRITE /* W for owner */ +#endif +#ifndef S_IRGRP #define S_IRGRP 0 /* R for group */ +#endif +#ifndef S_IWGRP #define S_IWGRP 0 /* W for group */ +#endif +#ifndef S_IROTH #define S_IROTH 0 /* R for other */ +#endif +#ifndef S_IWOTH #define S_IWOTH 0 /* W for other */ +#endif #else +#ifndef S_IRUSR #define S_IRUSR 0000400 /* R for owner */ #define S_IWUSR 0000200 /* W for owner */ #define S_IRGRP 0000040 /* R for group */ #define S_IWGRP 0000020 /* W for group */ #define S_IROTH 0000004 /* R for other */ #define S_IWOTH 0000002 /* W for other */ -#endif /* DB_WIN32 */ #endif +#endif /* DB_WIN32 */ mode = 0; if (perm[0] == 'r') mode |= S_IRUSR; |