Changeset 632 in kBuild for trunk/src/ash
- Timestamp:
- Nov 26, 2006 1:46:21 PM (18 years ago)
- Location:
- trunk/src/ash
- Files:
-
- 15 added
- 5 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/Makefile.kmk
r630 r632 17 17 kmk_ash_DEFS.linux = BSD 18 18 kmk_ash_DEFS.win = \ 19 PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS19 BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS 20 20 kmk_ash_DEFS.os2 = \ 21 21 HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME \ 22 22 EXEC_HASH_BANG_SCRIPT PC_OS2_LIBPATHS PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS 23 23 kmk_ash_INCS = $(PATH_TARGET) . # (the last is because of error.h) 24 kmk_ash_INCS.win = win 24 25 kmk_ash_SOURCES = \ 25 26 alias.c \ … … 57 58 strlcpy.c \ 58 59 setmode.c 60 #kmk_ash_SOURCES.win = \ 61 # win/mscfakes.c 62 59 63 kmk_ash_DEPS = \ 60 64 $(PATH_TARGET)/arith.h \ … … 75 79 #ash.man_SYMLINKS = \ 76 80 # ash.1.gz=>sh.1 81 82 83 84 ifeq ($(filter-out nt win win32 win64,$(BUILD_TARGET)),) 85 86 # 87 # Use the pregenerated code. 88 # 89 kmk_ash_DEPS := 90 91 define def_copy_generated 92 $(PATH_TARGET)/$(src): generated/$(src) 93 $$(RM) -f $$@ 94 $$(CP) -f $$^ $$@ 95 kmk_ash_DEPS += $(PATH_TARGET)/$(src) 96 endef 97 98 $(foreach src, arith.h arith.c arith_lex.c builtins.h builtins.c nodes.h nodes.c token.h init.c,\ 99 $(eval $(def_copy_generated))) 100 101 include $(PATH_KBUILD)/footer.kmk 102 103 else 77 104 78 105 include $(PATH_KBUILD)/footer.kmk … … 112 139 $(MV) init.c $@ 113 140 141 endif -
trunk/src/ash/bltin/kill.c
r630 r632 224 224 } 225 225 #else 226 #ifndef _MSC_VER 226 227 #warning TIOCGWINSZ is not present. 228 #endif 227 229 #endif 228 230 #ifndef HAVE_SYS_SIGNAME -
trunk/src/ash/bltin/test.c
r630 r632 361 361 return S_ISDIR(s.st_mode); 362 362 case FILCDEV: 363 #ifdef S_ISCHR 363 364 return S_ISCHR(s.st_mode); 365 #else 366 return 0; 367 #endif 364 368 case FILBDEV: 369 #ifdef S_ISBLK 365 370 return S_ISBLK(s.st_mode); 371 #else 372 return 0; 373 #endif 366 374 case FILFIFO: 375 #ifdef S_ISFIFO 367 376 return S_ISFIFO(s.st_mode); 377 #else 378 return 0; 379 #endif 368 380 case FILSOCK: 381 #ifdef S_ISSOCK 369 382 return S_ISSOCK(s.st_mode); 383 #else 384 return 0; 385 #endif 370 386 case FILSYM: 371 387 return S_ISLNK(s.st_mode); … … 375 391 return (s.st_mode & S_ISGID) != 0; 376 392 case FILSTCK: 393 #ifdef S_ISVTX 377 394 return (s.st_mode & S_ISVTX) != 0; 395 #else 396 return 0; 397 #endif 378 398 case FILGZ: 379 399 return s.st_size > (off_t)0; -
trunk/src/ash/error.c
r626 r632 315 315 { ENXIO, ALL, "no such device or address" }, 316 316 { EROFS, ALL, "read-only file system" }, 317 #ifdef ETXTBSY 317 318 { ETXTBSY, ALL, "text busy" }, 319 #endif 318 320 #ifdef EAGAIN 319 321 { EAGAIN, E_EXEC, "not enough memory" }, -
trunk/src/ash/error.h
r629 r632 112 112 */ 113 113 114 #if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) 114 #if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__) && !defined(__KLIBC__) && !defined(_MSC_VER) 115 115 #define setjmp(jmploc) _setjmp(jmploc) 116 116 #define longjmp(jmploc, val) _longjmp(jmploc, val) -
trunk/src/ash/win/mscfakes.h
r630 r632 31 31 #include <direct.h> 32 32 #include <time.h> 33 #include <fcntl.h> 34 #include <limits.h> 33 35 #undef setmode 34 #include "getopt.h" 36 //#include "getopt.h" 37 38 #if !defined(__GNUC__) && !defined(__attribute__) 39 #define __attribute__(a) 40 #endif 41 42 typedef int pid_t; 35 43 36 44 #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) … … 115 123 #define mkfifo(path, mode) -1 116 124 #define mknod(path, mode, devno) -1 125 #define pipe(v) _pipe(v,0,0) 117 126 int mkstemp(char *temp); 118 127 #define readlink(link, buf, size) -1 119 128 #define reallocf(old, size) realloc(old, size) 129 #define strcasecmp stricmp 130 #define strncasecmp strnicmp 120 131 #if _MSC_VER < 1400 121 132 int snprintf(char *buf, size_t size, const char *fmt, ...); … … 127 138 int utimes(const char *pszPath, const struct timeval *paTimes); 128 139 int writev(int fd, const struct iovec *vector, int count); 140 #define F_DUPFD 0 141 #define F_GETFD 1 142 #define F_SETFD 2 143 #define F_GETFL 3 144 #define F_SETFL 4 145 #define FD_CLOEXEC 1 146 #define O_NONBLOCK 0 /// @todo 147 #define EWOULDBLOCK 512 148 int fcntl (int, int, ...); 149 150 /* signal hacks */ 151 typedef struct sigset 152 { 153 unsigned long __bitmap[1]; 154 } sigset_t; 155 int sigprocmask(int, const sigset_t *, sigset_t *); 156 #define SIG_BLOCK 1 157 #define SIG_UNBLOCK 2 158 #define SIG_SETMASK 3 159 160 #define SIGTTIN 0 161 #define SIGTSTP 0 162 #define SIGTTOU 0 163 #define SIGCONT 0 164 #define SIGPIPE 0 165 #define SIGQUIT 0 166 #define SIGHUP 0 167 #ifndef NSIG 168 #define NSIG 32 169 #endif 170 extern const char *const sys_siglist[NSIG]; 171 172 int kill(pid_t, int); 173 int sigaction(int, const struct sigaction *, struct sigaction *); 174 //int sigaddset(sigset_t *, int); 175 //int sigdelset(sigset_t *, int); 176 int sigemptyset(sigset_t *); 177 //int sigfillset(sigset_t *); 178 //int sigismember(const sigset_t *, int); 179 //int sigpending(sigset_t *); 180 //int sigsuspend(const sigset_t *); 181 //int sigwait(const sigset_t *, int *); 129 182 130 183 #endif /* _MSC_VER */
Note:
See TracChangeset
for help on using the changeset viewer.