From 568ef6048dfaafbdde681b1f923c0e15d5d792d2 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 11 Mar 2007 21:29:37 +0000 Subject: [PATCH] (S_IRUSR, S_IWUSR, S_IEUSR, S_IRWXU, S_IRGRP, S_IWGRP, S_IEGRP, S_IRWXG, S_IROTH, S_IWOTH, S_IEOTH, S_IRWXO) [_WIN32]: Add #ifndef for standard defines as the the MinGW environment has the user defines already created. Correct EXEC permision to use S_IEXEC. Set the group and other permssions to 0 as they do not exist in WIN32. --- include/misc.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/misc.h b/include/misc.h index 68b7ebee8..74515dd8e 100644 --- a/include/misc.h +++ b/include/misc.h @@ -59,18 +59,24 @@ typedef int pid_t; #define mkdir(dir,perm) _mkdir((dir)) #define random rand #define srandom srand +#ifndef S_IRUSR #define S_IRUSR _S_IREAD #define S_IWUSR _S_IWRITE -#define S_IXUSR _S_IREAD -#define S_IRGRP _S_IREAD -#define S_IWGRP _S_IWRITE -#define S_IXGRP _S_IREAD -#define S_IROTH _S_IREAD -#define S_IWOTH _S_IWRITE -#define S_IXOTH _S_IREAD +#define S_IXUSR _S_IEXEC #define S_IRWXU S_IRUSR | S_IWUSR | S_IXUSR +#endif +#ifndef S_IRGRP +#define S_IRGRP 0 +#define S_IWGRP 0 +#define S_IXGRP 0 #define S_IRWXG S_IRGRP | S_IWGRP | S_IXGRP +#endif +#ifndef S_IROTH +#define S_IROTH 0 +#define S_IWOTH 0 +#define S_IXOTH 0 #define S_IRWXO S_IROTH | S_IWOTH | S_IXOTH +#endif #endif /* _WIN32 */ #ifndef S_IRWUG -- 2.43.0