Changeset 636 in kBuild for trunk/src/ash/win/mscfakes.c
- Timestamp:
- Nov 26, 2006 5:45:01 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/win/mscfakes.c
r632 r636 31 31 #include <io.h> 32 32 #include <fcntl.h> 33 #include <sys/times.h> 33 34 #include "err.h" 34 35 #include "mscfakes.h" 35 36 #undef mkdir 37 38 39 int optind = 1; 36 40 37 41 … … 151 155 } 152 156 157 158 int fcntl(int fd, int iCmd, ...) 159 { 160 fprintf(stderr, "fcntl(%d, %d,..)\n", fd, iCmd); 161 return 0; 162 } 163 164 int ioctl(int fd, unsigned long iCmd, ...) 165 { 166 fprintf(stderr, "ioctl(%d, %d,..)\n", fd, iCmd); 167 return 0; 168 } 169 170 int tcsetpgrp(int fd, pid_t pgrp) 171 { 172 fprintf(stderr, "tcgetpgrp(%d, %d)\n", fd, pgrp); 173 return 0; 174 } 175 176 pid_t tcgetpgrp(int fd) 177 { 178 fprintf(stderr, "tcgetpgrp(%d)\n", fd); 179 return 0; 180 } 181 182 pid_t getpgrp(void) 183 { 184 fprintf(stderr, "getpgrp\n"); 185 return _getpid(); 186 } 187 188 uid_t getuid(void) 189 { 190 fprintf(stderr, "getuid\n"); 191 return 0; 192 } 193 194 gid_t getgid(void) 195 { 196 fprintf(stderr, "getgid\n"); 197 return 0; 198 } 199 200 gid_t getegid(void) 201 { 202 fprintf(stderr, "getegid\n"); 203 return 0; 204 } 205 206 int setpgid(pid_t pid, pid_t pgid) 207 { 208 fprintf(stderr, "setpgid(%d,%d)\n", pid, pgid); 209 return 0; 210 } 211 212 pid_t getpgid(pid_t pid) 213 { 214 fprintf(stderr, "getpgid(%d)\n", pid); 215 return 0; 216 } 217 218 long sysconf(int name) 219 { 220 fprintf(stderr, "sysconf(%d)\n", name); 221 return 0; 222 } 223 224 clock_t times(struct tms *pBuf) 225 { 226 struct timeval tv = {0}; 227 if (pBuf) 228 { 229 pBuf->tms_utime = clock(); /* clock () * HZ / CLOCKS_PER_SEC */ 230 pBuf->tms_stime = pBuf->tms_cutime = pBuf->tms_cstime = 0; 231 } 232 /* 233 gettimeofday(&tv, NULL); */ 234 fprintf(stderr, "times(%p)\n", pBuf); 235 return CLK_TCK * tv.tv_sec + (CLK_TCK * tv.tv_usec) / 1000000; 236 } 237 238 struct passwd *getpwnam(const char *pszName) 239 { 240 printf("getpwnam(%s)\n", pszName); 241 return NULL; 242 } 243 244 int setrlimit(int iResId, const struct rlimit *pLimit) 245 { 246 printf("setrlimit(%d, %p)\n", iResId, pLimit); 247 return -1; 248 } 249 250 int getrlimit(int iResId, struct rlimit *pLimit) 251 { 252 printf("getrlimit(%d, %p)\n", iResId, pLimit); 253 return -1; 254 } 255 256 257 pid_t fork(void) 258 { 259 fprintf(stderr, "fork()\n"); 260 return -1; 261 } 262 263 pid_t wait3(int *piStatus, int fOptions, struct rusage *pRUsage) 264 { 265 fprintf(stderr, "wait3()\n"); 266 return -1; 267 } 268 269 270 /* signal stuff */ 271 272 int sigprocmask(int iOperation, const sigset_t *pNew, sigset_t *pOld) 273 { 274 fprintf(stderr, "sigprocmask(%d, %p, %p)\n", iOperation, pNew, pOld); 275 return 0; 276 } 277 278 int sigemptyset(sigset_t *pSet) 279 { 280 pSet->__bitmap[0] = 0; 281 return 0; 282 } 283 284 int siginterrupt(int iSignalNo, int fFlag) 285 { 286 fprintf(stderr, "siginterrupt(%d, %#x)\n", iSignalNo, fFlag); 287 return 0; 288 } 289 290 int sigaction(int iSignalNo, const struct sigaction *pSigAct, struct sigaction *pSigActOld) 291 { 292 fprintf(stderr, "sigaction(%d, %p, %p)\n", iSignalNo, pSigAct, pSigActOld); 293 return 0; 294 } 295 296 int kill(pid_t pid, int iSignalNo) 297 { 298 fprintf(stderr, "kill(%d, %d)\n", pid, iSignalNo); 299 return 0; 300 } 301 302 int killpg(pid_t pgrp, int iSignalNo) 303 { 304 if (pgrp < 0) 305 { 306 errno = EINVAL; 307 return -1; 308 } 309 return kill(-pgrp, iSignalNo); 310 } 311 312 const char * const sys_siglist[NSIG] = 313 { 314 "0", 315 "1", 316 "2", 317 "3", 318 "4", 319 "5", 320 "6", 321 "7", 322 "8", 323 "9", 324 "10", 325 "11", 326 "12", 327 "13", 328 "14", 329 "15", 330 "16", 331 "17", 332 "18", 333 "19", 334 "20", 335 "21", 336 "22" 337 }; 338 339 340 /* */
Note:
See TracChangeset
for help on using the changeset viewer.