From f2953bc209d32d1fd8c79e31b826c76623898187 Mon Sep 17 00:00:00 2001 From: kinichiro Date: Sun, 11 Feb 2018 23:31:43 +0900 Subject: Add file permission define for Windows and MinGW build --- include/compat/sys/stat.h | 12 ++++++++++++ include/compat/sys/types.h | 1 + 2 files changed, 13 insertions(+) diff --git a/include/compat/sys/stat.h b/include/compat/sys/stat.h index 629c7fe..b88da1d 100644 --- a/include/compat/sys/stat.h +++ b/include/compat/sys/stat.h @@ -10,9 +10,18 @@ #include_next /* for old MinGW */ +#ifndef S_IRWXU +#define S_IRWXU 0 +#endif +#ifndef S_IRWXG +#define S_IRWXG 0 +#endif #ifndef S_IRGRP #define S_IRGRP 0 #endif +#ifndef S_IRWXO +#define S_IRWXO 0 +#endif #ifndef S_IROTH #define S_IROTH 0 #endif @@ -65,12 +74,15 @@ #endif #if defined(_MSC_VER) +# define S_IRWXU 0 /* RWX user */ # define S_IRUSR S_IREAD /* Read user */ # define S_IWUSR S_IWRITE /* Write user */ # define S_IXUSR 0 /* Execute user */ +# define S_IRWXG 0 /* RWX group */ # define S_IRGRP 0 /* Read group */ # define S_IWGRP 0 /* Write group */ # define S_IXGRP 0 /* Execute group */ +# define S_IRWXO 0 /* RWX others */ # define S_IROTH 0 /* Read others */ # define S_IWOTH 0 /* Write others */ # define S_IXOTH 0 /* Execute others */ diff --git a/include/compat/sys/types.h b/include/compat/sys/types.h index 701b77a..473d6da 100644 --- a/include/compat/sys/types.h +++ b/include/compat/sys/types.h @@ -28,6 +28,7 @@ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef uint32_t in_addr_t; +typedef uint32_t mode_t; #include typedef SSIZE_T ssize_t; -- cgit v1.2.3-55-g6feb