diff options
author | kinichiro <kinichiro.inoguchi@gmail.com> | 2017-01-28 02:30:16 +0900 |
---|---|---|
committer | kinichiro <kinichiro.inoguchi@gmail.com> | 2017-01-28 02:49:06 +0900 |
commit | fb936f89b8cb16d7e8f1fd73a527099616db74fb (patch) | |
tree | bcf35e392e8b606fc22caab2cd84feeaa54b38c9 | |
parent | cb57534af8ce4cacd69a3edcd42bb8a6bcd0b40b (diff) | |
download | portable-fb936f89b8cb16d7e8f1fd73a527099616db74fb.tar.gz portable-fb936f89b8cb16d7e8f1fd73a527099616db74fb.tar.bz2 portable-fb936f89b8cb16d7e8f1fd73a527099616db74fb.zip |
Move S_IRGRP and S_IROTH from fcntl.h to sys/stat.h
- S_IRGRP and S_IROTH should be defined in sys/stat.h rather than fcntl.h
- Old MinGW64 on Ubuntu 14.04 appears not to have S_IRGRP and S_IROTH
- MinGW64 has __WIN32 defined but does not have _MSC_VER defined
-rw-r--r-- | include/compat/fcntl.h | 8 | ||||
-rw-r--r-- | include/compat/sys/stat.h | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/include/compat/fcntl.h b/include/compat/fcntl.h index feddb7b..7dfedc6 100644 --- a/include/compat/fcntl.h +++ b/include/compat/fcntl.h | |||
@@ -30,11 +30,3 @@ | |||
30 | #ifndef FD_CLOEXEC | 30 | #ifndef FD_CLOEXEC |
31 | #define FD_CLOEXEC 1 | 31 | #define FD_CLOEXEC 1 |
32 | #endif | 32 | #endif |
33 | |||
34 | #ifndef S_IRGRP | ||
35 | #define S_IRGRP 0 | ||
36 | #endif | ||
37 | |||
38 | #ifndef S_IROTH | ||
39 | #define S_IROTH 0 | ||
40 | #endif | ||
diff --git a/include/compat/sys/stat.h b/include/compat/sys/stat.h index 0e04553..629c7fe 100644 --- a/include/compat/sys/stat.h +++ b/include/compat/sys/stat.h | |||
@@ -8,6 +8,15 @@ | |||
8 | 8 | ||
9 | #ifndef _MSC_VER | 9 | #ifndef _MSC_VER |
10 | #include_next <sys/stat.h> | 10 | #include_next <sys/stat.h> |
11 | |||
12 | /* for old MinGW */ | ||
13 | #ifndef S_IRGRP | ||
14 | #define S_IRGRP 0 | ||
15 | #endif | ||
16 | #ifndef S_IROTH | ||
17 | #define S_IROTH 0 | ||
18 | #endif | ||
19 | |||
11 | #else | 20 | #else |
12 | 21 | ||
13 | #include <windows.h> | 22 | #include <windows.h> |