diff options
| author | kinichiro <kinichiro.inoguchi@gmail.com> | 2018-02-11 23:31:43 +0900 |
|---|---|---|
| committer | kinichiro <kinichiro.inoguchi@gmail.com> | 2018-02-11 23:31:43 +0900 |
| commit | f2953bc209d32d1fd8c79e31b826c76623898187 (patch) | |
| tree | 2c2a50da0a3e39cabcae040f2b3dd53f878b4d6c /include | |
| parent | 57ea69ec1081b3230ae51cf3aee07e650c0eddfb (diff) | |
| download | portable-f2953bc209d32d1fd8c79e31b826c76623898187.tar.gz portable-f2953bc209d32d1fd8c79e31b826c76623898187.tar.bz2 portable-f2953bc209d32d1fd8c79e31b826c76623898187.zip | |
Add file permission define for Windows and MinGW build
Diffstat (limited to 'include')
| -rw-r--r-- | include/compat/sys/stat.h | 12 | ||||
| -rw-r--r-- | include/compat/sys/types.h | 1 |
2 files changed, 13 insertions, 0 deletions
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 @@ | |||
| 10 | #include_next <sys/stat.h> | 10 | #include_next <sys/stat.h> |
| 11 | 11 | ||
| 12 | /* for old MinGW */ | 12 | /* for old MinGW */ |
| 13 | #ifndef S_IRWXU | ||
| 14 | #define S_IRWXU 0 | ||
| 15 | #endif | ||
| 16 | #ifndef S_IRWXG | ||
| 17 | #define S_IRWXG 0 | ||
| 18 | #endif | ||
| 13 | #ifndef S_IRGRP | 19 | #ifndef S_IRGRP |
| 14 | #define S_IRGRP 0 | 20 | #define S_IRGRP 0 |
| 15 | #endif | 21 | #endif |
| 22 | #ifndef S_IRWXO | ||
| 23 | #define S_IRWXO 0 | ||
| 24 | #endif | ||
| 16 | #ifndef S_IROTH | 25 | #ifndef S_IROTH |
| 17 | #define S_IROTH 0 | 26 | #define S_IROTH 0 |
| 18 | #endif | 27 | #endif |
| @@ -65,12 +74,15 @@ | |||
| 65 | #endif | 74 | #endif |
| 66 | 75 | ||
| 67 | #if defined(_MSC_VER) | 76 | #if defined(_MSC_VER) |
| 77 | # define S_IRWXU 0 /* RWX user */ | ||
| 68 | # define S_IRUSR S_IREAD /* Read user */ | 78 | # define S_IRUSR S_IREAD /* Read user */ |
| 69 | # define S_IWUSR S_IWRITE /* Write user */ | 79 | # define S_IWUSR S_IWRITE /* Write user */ |
| 70 | # define S_IXUSR 0 /* Execute user */ | 80 | # define S_IXUSR 0 /* Execute user */ |
| 81 | # define S_IRWXG 0 /* RWX group */ | ||
| 71 | # define S_IRGRP 0 /* Read group */ | 82 | # define S_IRGRP 0 /* Read group */ |
| 72 | # define S_IWGRP 0 /* Write group */ | 83 | # define S_IWGRP 0 /* Write group */ |
| 73 | # define S_IXGRP 0 /* Execute group */ | 84 | # define S_IXGRP 0 /* Execute group */ |
| 85 | # define S_IRWXO 0 /* RWX others */ | ||
| 74 | # define S_IROTH 0 /* Read others */ | 86 | # define S_IROTH 0 /* Read others */ |
| 75 | # define S_IWOTH 0 /* Write others */ | 87 | # define S_IWOTH 0 /* Write others */ |
| 76 | # define S_IXOTH 0 /* Execute others */ | 88 | # 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; | |||
| 28 | typedef unsigned short u_short; | 28 | typedef unsigned short u_short; |
| 29 | typedef unsigned int u_int; | 29 | typedef unsigned int u_int; |
| 30 | typedef uint32_t in_addr_t; | 30 | typedef uint32_t in_addr_t; |
| 31 | typedef uint32_t mode_t; | ||
| 31 | 32 | ||
| 32 | #include <basetsd.h> | 33 | #include <basetsd.h> |
| 33 | typedef SSIZE_T ssize_t; | 34 | typedef SSIZE_T ssize_t; |
