Add compiling[?] kbuild
[sgilles-overlay.git] / dev-util / kbuild / files / 0008-allperms.patch
blob3be86e7fca545c6834e0b39ece930f1d66b372ed
1 From ebf670d261916c9a789894442b95662972866e7d Mon Sep 17 00:00:00 2001
2 From: "S. Gilles" <sgilles@math.umd.edu>
3 Date: Wed, 15 Jun 2016 00:54:36 +0000
4 Subject: [PATCH 08/17] allperms
6 ---
7 src/kmk/kmkbuiltin/chmod.c | 4 ++++
8 src/kmk/kmkbuiltin/install.c | 4 ++++
9 2 files changed, 8 insertions(+)
11 diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c
12 index e6db989..b6a9e23 100644
13 --- a/src/kmk/kmkbuiltin/chmod.c
14 +++ b/src/kmk/kmkbuiltin/chmod.c
15 @@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
16 #include "getopt.h"
17 #include "kmkbuiltin.h"
19 +#ifndef ALLPERMS
20 +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
21 +#endif
23 extern void * bsd_setmode(const char *p);
24 extern mode_t bsd_getmode(const void *bbox, mode_t omode);
25 extern void bsd_strmode(mode_t mode, char *p);
26 diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c
27 index 13bec72..08d8ffe 100644
28 --- a/src/kmk/kmkbuiltin/install.c
29 +++ b/src/kmk/kmkbuiltin/install.c
30 @@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode);
31 # define IS_SLASH(ch) ((ch) == '/')
32 #endif
34 +#ifndef ALLPERMS
35 +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
36 +#endif
38 static gid_t gid;
39 static uid_t uid;
40 static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given;
41 --
42 2.8.4