From 488028199d4db9f2eb35921e9d1e10181c53dd7d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 12 Dec 1999 21:45:34 +0000 Subject: (S_IRUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Define if not defined. This was necessary on a NeXT Turbostation running Mach 3.3. Reported by Nelson H. F. Beebe. --- src/system.h | 57 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/system.h b/src/system.h index 4e2be1d46..928ee1b7b 100644 --- a/src/system.h +++ b/src/system.h @@ -80,48 +80,57 @@ # define S_ISVTX 01000 #endif -#if !S_IWUSR -# if S_IWRITE -# define S_IWUSR S_IWRITE -# else -# define S_IWUSR 00200 -# endif +#if !S_IRUSR && S_IREAD +# define S_IRUSR S_IREAD #endif - -#ifndef S_IWUSR -# ifdef S_IWRITE -# define S_IWUSR S_IWRITE -# else -# define S_IWUSR 00200 -# endif +#if !S_IRUSR +# define S_IRUSR 00400 +#endif +#if !S_IRGRP +# define S_IRGRP (S_IRUSR >> 3) +#endif +#if !S_IROTH +# define S_IROTH (S_IRUSR >> 6) #endif -#ifndef S_IEXEC -# define S_IEXEC S_IXUSR +#if !S_IWUSR && S_IWRITE +# define S_IWUSR S_IWRITE +#endif +#if !S_IWUSR +# define S_IWUSR 00200 +#endif +#if !S_IWGRP +# define S_IWGRP (S_IWUSR >> 3) +#endif +#if !S_IWOTH +# define S_IWOTH (S_IWUSR >> 6) #endif -#ifndef S_IXUSR +#if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif -#ifndef S_IXGRP -# define S_IXGRP (S_IEXEC >> 3) +#if !S_IXUSR +# define S_IXUSR 00100 +#endif +#if !S_IXGRP +# define S_IXGRP (S_IXUSR >> 3) #endif -#ifndef S_IXOTH -# define S_IXOTH (S_IEXEC >> 6) +#if !S_IXOTH +# define S_IXOTH (S_IXUSR >> 6) #endif -#ifndef S_IRWXU +#if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif -#ifndef S_IRWXG +#if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif -#ifndef S_IRWXO +#if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX.1. */ -#ifndef S_IXUGO +#if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif -- cgit v1.2.3-70-g09d2