From de305a6f4c6ea80df07948f860dfbdad6193a4c4 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 22 Jun 2013 17:29:08 -0400 Subject: [PATCH] roken: Define S_IRWXU and friends on Windows POSIX mkdir (unlike the Windows version) takes a 'mode_t' parameter. Provide definitions for the mode_t constants. Change-Id: Ie57e746aa3e579e28f93064ab430f1128508cc84 --- lib/roken/roken.h.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index 59d1e6d67..598ff241b 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -357,6 +357,21 @@ rk_vsnprintf (char *str, size_t sz, const char *format, va_list args); S_ISBLK(m) */ +/* The following symbolic constants are provided for rk_mkdir mode */ + +#define S_IRWXU 00700 /* user (file owner) has read, write and execute permission */ +#define S_IRUSR 00400 /* user has read permission */ +#define S_IWUSR 00200 /* user has write permission */ +#define S_IXUSR 00100 /* user has execute permission */ +#define S_IRWXG 00070 /* group has read, write and execute permission */ +#define S_IRGRP 00040 /* group has read permission */ +#define S_IWGRP 00020 /* group has write permission */ +#define S_IXGRP 00010 /* group has execute permission */ +#define S_IRWXO 00007 /* others have read, write and execute permission */ +#define S_IROTH 00004 /* others have read permission */ +#define S_IWOTH 00002 /* others have write permission */ +#define S_IXOTH 00001 /* others have execute permission */ + #if !defined(ROKEN_NO_DEFINE_ALLOCATORS) /* Ensure that a common memory allocator is used by all */ #define calloc rk_calloc