Changeset 1221 in kBuild for trunk/src/kash
- Timestamp:
- Oct 7, 2007 11:15:00 PM (17 years ago)
- Location:
- trunk/src/kash
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/Makefile.kmk
r1218 r1221 19 19 kmk_ash_DEFS.solaris = BSD 20 20 kmk_ash_DEFS.win = \ 21 BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS 21 BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS YY_NO_UNISTD_H 22 22 kmk_ash_DEFS.os2 = \ 23 23 HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME \ … … 82 82 setmode.c 83 83 84 kmk_ash_ DEPS = \84 kmk_ash_ORDERDEPS = \ 85 85 $(PATH_TARGET)/arith.h \ 86 86 $(PATH_TARGET)/builtins.h \ … … 88 88 $(PATH_TARGET)/token.h 89 89 kmk_ash_CLEAN = \ 90 $(kmk_ash_ DEPS) \90 $(kmk_ash_ORDERDEPS) \ 91 91 $(PATH_TARGET)/arith.c \ 92 92 $(PATH_TARGET)/arith_lex.c \ … … 103 103 104 104 105 ifeq ($(filter-out nt win win32 win64,$(BUILD_TARGET)),)105 ifeq ($(filter-out win,$(BUILD_TARGET)),) 106 106 107 107 # 108 108 # Use the pregenerated code. 109 109 # 110 kmk_ash_DEPS := 111 112 define def_copy_generated 113 $(PATH_TARGET)/$(src): generated/$(src) 114 $$(RM) -f $$@ 115 $$(CP) -f $$^ $$@ 116 kmk_ash_DEPS += $(PATH_TARGET)/$(src) 117 endef 118 119 #$(foreach src, arith.h arith.c arith_lex.c builtins.h builtins.c nodes.h nodes.c token.h init.c,\ 120 #$(eval $(def_copy_generated))) 121 110 kmk_ash_ORDERDEPS := 122 111 kmk_ash_INCS += generated 123 kmk_ash_ DEFS += HAVE_SYS_CDEFS_H112 kmk_ash_SOURCES := $(patsubst $(PATH_TARGET)/%,generated/%,$(kmk_ash_SOURCES)) 124 113 125 114 include $(PATH_KBUILD)/footer.kmk -
trunk/src/kash/error.c
r1218 r1221 180 180 exverror(psh, EXERROR, msg, ap); 181 181 /* NOTREACHED */ 182 va_end(ap); 182 #ifndef __GNUC__ 183 va_end(ap); 184 #endif 183 185 } 184 186 … … 192 194 exverror(psh, cond, msg, ap); 193 195 /* NOTREACHED */ 194 va_end(ap); 196 #ifndef __GNUC__ 197 va_end(ap); 198 #endif 195 199 } 196 200 -
trunk/src/kash/exec.h
r1218 r1221 65 65 /*extern const char *pathopt;*/ /* set by padvance */ 66 66 67 #if !defined(__GNUC__) && !defined(__attribute__) 68 # define __attribute__(a) 69 #endif 70 67 71 void shellexec(struct shinstance *, char **, char **, const char *, int, int) 68 72 __attribute__((__noreturn__)); -
trunk/src/kash/miscbltin.c
r1218 r1221 62 62 #undef rflag 63 63 64 void *bsd_setmode(const char *p); 65 mode_t bsd_getmode(const void *bbox, mode_t omode); 64 66 65 67 … … 271 273 272 274 INTOFF; 273 #ifdef __INNOTEK_LIBC__274 275 if ((set = bsd_setmode(ap)) != 0) { 275 #else 276 if ((set = setmode(ap)) != 0) { 277 #endif 278 mask = getmode(set, ~mask & 0777); 276 mask = bsd_getmode(set, ~mask & 0777); 279 277 ckfree(set); 280 278 } -
trunk/src/kash/setmode.c
r1218 r1221 51 51 #include <signal.h> 52 52 #include <stdlib.h> 53 #ifndef _MSC_VER 54 #include <unistd.h> 55 #else 56 #include "mscfakes.h" 57 #endif 53 #include "shinstance.h" /* for unistd.h types/defines */ 58 54 59 55 #ifdef SETMODE_DEBUG … … 89 85 #ifndef _DIAGASSERT 90 86 # define _DIAGASSERT assert 91 #endif 87 #endif 92 88 93 89 #ifndef S_ISTXT … … 106 102 */ 107 103 mode_t 108 getmode(bbox, omode) 109 const void *bbox; 110 mode_t omode; 104 bsd_getmode(const void *bbox, mode_t omode) 111 105 { 112 106 const BITCMD *set; … … 196 190 197 191 void * 198 setmode(p) 199 const char *p; 192 bsd_setmode(const char *p) 200 193 { 201 194 int perm, who; … … 221 214 sigfillset(&signset); 222 215 (void)sigprocmask(SIG_BLOCK, &signset, &sigoset); 223 #endif 216 #endif 224 217 (void)umask(mask = umask(0)); 225 218 mask = ~mask; … … 229 222 230 223 setlen = SET_LEN + 2; 231 224 232 225 if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL) 233 226 return (NULL); … … 290 283 case 's': 291 284 /* 292 * If specific bits where requested and 293 * only "other" bits ignore set-id. 285 * If specific bits where requested and 286 * only "other" bits ignore set-id. 294 287 */ 295 288 if (who == 0 || (who & ~S_IRWXO)) … … 298 291 case 't': 299 292 /* 300 * If specific bits where requested and 301 * only "other" bits ignore set-id. 293 * If specific bits where requested and 294 * only "other" bits ignore set-id. 302 295 */ 303 296 if (who == 0 || (who & ~S_IRWXO)) { … … 412 405 set->bits = mask; 413 406 } 414 407 415 408 if (oparg == '+') 416 409 set->cmd2 |= CMD2_SET; … … 446 439 * Given an array of bitcmd structures, compress by compacting consecutive 447 440 * '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u', 448 * 'g' and 'o' commands continue to be separate. They could probably be 441 * 'g' and 'o' commands continue to be separate. They could probably be 449 442 * compacted, but it's not worth the effort. 450 443 */ -
trunk/src/kash/shtypes.h
r1218 r1221 32 32 33 33 #ifdef _MSC_VER 34 # define setmode setmode_msc35 34 # include <io.h> /* intptr_t and uintptr_t */ 36 # undef setmode37 35 typedef signed char int8_t; 38 36 typedef unsigned char uint8_t; … … 56 54 #define UINTMAX_C(c) (c ## ULL) 57 55 56 #undef INT8_MIN 58 57 #define INT8_MIN (-0x7f-1) 58 #undef INT16_MIN 59 59 #define INT16_MIN (-0x7fff-1) 60 #undef INT32_MIN 60 61 #define INT32_MIN (-0x7fffffff-1) 62 #undef INT64_MIN 61 63 #define INT64_MIN (-0x7fffffffffffffffLL-1) 62 64 65 #undef INT8_MAX 63 66 #define INT8_MAX 0x7f 67 #undef INT16_MAX 64 68 #define INT16_MAX 0x7fff 69 #undef INT32_MAX 65 70 #define INT32_MAX 0x7fffffff 71 #undef INT64_MAX 66 72 #define INT64_MAX 0x7fffffffffffffffLL 67 73 74 #undef UINT8_MAX 68 75 #define UINT8_MAX 0xff 76 #undef UINT16_MAX 69 77 #define UINT16_MAX 0xffff 78 #undef UINT32_MAX 70 79 #define UINT32_MAX 0xffffffffU 80 #undef UINT64_MAX 71 81 #define UINT64_MAX 0xffffffffffffffffULL 72 82 … … 76 86 typedef int mode_t; 77 87 typedef intptr_t ssize_t; 78 79 void * setmode(const char *p);80 mode_t getmode(const void *bbox, mode_t omode);81 88 82 89 #else
Note:
See TracChangeset
for help on using the changeset viewer.