From 96e74015f0d8d608e2ccb9f981d5826e6a0f37e3 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Thu, 10 Mar 2005 11:40:57 +0000 Subject: [PATCH] - Added S_IREAD, S_IWRITE and S_IEXEC aliases to . git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14875 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/changes | 2 ++ library/include/sys/stat.h | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/library/changes b/library/changes index 412710d..22d279b 100644 --- a/library/changes +++ b/library/changes @@ -52,6 +52,8 @@ PowerPC destructor function now sets up the exit() jmp_buf before the destructor functions are called. +- Added S_IREAD, S_IWRITE and S_IEXEC aliases to . + c.lib 1.189 (5.3.2005) diff --git a/library/include/sys/stat.h b/library/include/sys/stat.h index c1c4192..68ec7ee 100644 --- a/library/include/sys/stat.h +++ b/library/include/sys/stat.h @@ -1,5 +1,5 @@ /* - * $Id: stat.h,v 1.3 2005-01-02 09:07:21 obarthel Exp $ + * $Id: stat.h,v 1.4 2005-03-10 11:40:57 obarthel Exp $ * * :ts=4 * @@ -79,6 +79,15 @@ extern "C" { #define S_IWOTH 0000002 /* W for other */ #define S_IXOTH 0000001 /* X for other */ +/****************************************************************************/ + +/* Aliases for the owner RWX mask. */ +#define S_IREAD S_IRUSR +#define S_IWRITE S_IWUSR +#define S_IEXEC S_IXUSR + +/****************************************************************************/ + #define S_IFMT 0170000 /* type of file */ #define S_IFIFO 0010000 /* named pipe (fifo) */ #define S_IFDIR 0040000 /* directory */ @@ -87,6 +96,8 @@ extern "C" { #define S_IFLNK 0120000 /* symbolic link */ #define S_IFSOCK 0140000 /* socket */ +/****************************************************************************/ + #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) /* directory */ #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) /* regular file */ #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* symbolic link */