Changeset 616 in kBuild for trunk/src/gmake/kmkbuiltin/setmode.c
- Timestamp:
- Nov 26, 2006 6:40:55 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/kmkbuiltin/setmode.c
r615 r616 33 33 */ 34 34 35 #include <sys/cdefs.h> 35 /*#include <sys/cdefs.h>*/ 36 36 #if defined(LIBC_SCCS) && !defined(lint) 37 37 #if 0 … … 42 42 #endif /* LIBC_SCCS and not lint */ 43 43 44 #include "namespace.h" 44 /*#include "namespace.h"*/ 45 45 #include <sys/types.h> 46 46 #include <sys/stat.h> … … 51 51 #include <signal.h> 52 52 #include <stdlib.h> 53 #ifndef _MSC_VER 53 54 #include <unistd.h> 55 #else 56 #include "mscfakes.h" 57 #endif 54 58 55 59 #ifdef SETMODE_DEBUG … … 57 61 #endif 58 62 59 #ifdef __weak_alias63 /*#ifdef __weak_alias 60 64 __weak_alias(getmode,_getmode) 61 65 __weak_alias(setmode,_setmode) 62 #endif 66 #endif*/ 63 67 64 68 #define SET_LEN 6 /* initial # of bitcmd struct to malloc */ … … 77 81 #define CMD2_UBITS 0x10 78 82 79 static BITCMD *addcmd __P((BITCMD *, int, int, int, u_int));80 static void compress_mode __P((BITCMD *));83 static BITCMD *addcmd(BITCMD *, int, int, int, u_int); 84 static void compress_mode(BITCMD *); 81 85 #ifdef SETMODE_DEBUG 82 static void dumpmode __P((BITCMD *)); 83 #endif 86 static void dumpmode(BITCMD *); 87 #endif 88 89 #ifndef _DIAGASSERT 90 # define _DIAGASSERT assert 91 #endif 92 93 #ifndef S_ISTXT 94 # ifdef S_ISVTX 95 # define S_ISTXT S_ISVTX 96 # else 97 # define S_ISTXT 0 98 # endif 99 #endif /* !S_ISTXT */ 84 100 85 101 /* … … 186 202 char op, *ep; 187 203 BITCMD *set, *saveset, *endset; 204 #ifndef _MSC_VER 188 205 sigset_t signset, sigoset; 206 #endif 189 207 mode_t mask; 190 208 int equalopdone = 0; /* pacify gcc */ … … 200 218 * as best we can. 201 219 */ 220 #ifndef _MSC_VER 202 221 sigfillset(&signset); 203 222 (void)sigprocmask(SIG_BLOCK, &signset, &sigoset); 223 #endif 204 224 (void)umask(mask = umask(0)); 205 225 mask = ~mask; 226 #ifndef _MSC_VER 206 227 (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); 228 #endif 207 229 208 230 setlen = SET_LEN + 2;
Note:
See TracChangeset
for help on using the changeset viewer.