------------------------------------------------------------ revno: 13623 revision-id: squid3@treenet.co.nz-20141002175047-7d7u3ybh20jqif9z parent: squid3@treenet.co.nz-20141002121252-i6bkwka4etf89gr4 committer: Amos Jeffries branch nick: trunk timestamp: Thu 2014-10-02 10:50:47 -0700 message: Windows: add missing file permission definitions * initgroups() shim was building, but header not included correctly. * POSIX 5.6 / 6.5 Protection Bits for group access do not exist in windows MinGW. Define as 0-bits until better API is found. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20141002175047-7d7u3ybh20jqif9z # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: f8d39723e1dc677717074dc9499ca434d238c949 # timestamp: 2014-10-06 17:34:39 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk # base_revision_id: squid3@treenet.co.nz-20141002121252-\ # i6bkwka4etf89gr4 # # Begin patch === modified file 'compat/os/mswindows.h' --- compat/os/mswindows.h 2014-10-02 12:07:26 +0000 +++ compat/os/mswindows.h 2014-10-02 17:50:47 +0000 @@ -32,6 +32,8 @@ #endif #endif /* _SQUID_MINGW_ */ +#include "compat/initgroups.h" + #if HAVE_DIRECT_H #include #endif @@ -205,15 +207,33 @@ #define S_IRWXO 007 #endif +/* There are no group protection bits like these in Windows. + * The values are used by umask() to remove permissions so + * mapping to user permission bits will break file accesses. + * Map group permissions to harmless zero instead. + */ +#ifndef S_IXGRP +#define S_IXGRP 0 +#endif +#ifndef S_IWGRP +#define S_IWGRP 0 +#endif +#ifndef S_IWOTH +#define S_IWOTH 0 +#endif +#ifndef S_IXOTH +#define S_IXOTH 0 +#endif + #if defined(_MSC_VER) #define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR) #endif -#define SIGHUP 1 /* hangup */ -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -#define SIGBUS 10 /* bus error */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGCHLD 20 /* to parent on child stop or exit */ +#define SIGHUP 1 /* hangup */ +#define SIGKILL 9 /* kill (cannot be caught or ignored) */ +#define SIGBUS 10 /* bus error */ +#define SIGPIPE 13 /* write on a pipe with no one to read it */ +#define SIGCHLD 20 /* to parent on child stop or exit */ #define SIGUSR1 30 /* user defined signal 1 */ #define SIGUSR2 31 /* user defined signal 2 */