#include <_ansi.h> #include #include #include #include "sys/syscall.h" #include "sys/console.h" int errno; /* This is used by _sbrk. */ register char *stack_ptr asm ("r15"); int _read (int file, char *ptr, int len) { return -1; } int _lseek (int file, int ptr, int dir) { return -1; } int _write ( int file, char *ptr, int len) { _console_write(&_console_ctx, file, ptr, len); return len; } int _close (int file) { return -1; } int _link (char *old, char *new) { return -1; } caddr_t _sbrk (int incr) { return -1; } int _fstat (int file, struct stat *st) { return -1; } int _open (const char *path, int flags) { return -1; } int _creat (const char *path, int mode) { return -1; } int _unlink () { return -1; } isatty (fd) int fd; { return 1; } _isatty (fd) int fd; { return 1; } _exit (n) { return -1; } _kill (n, m) { return -1; } _getpid (n) { return 1; } _raise () { } int _stat (const char *path, struct stat *st) { return -1; } int _chmod (const char *path, short mode) { return -1; } int _chown (const char *path, short owner, short group) { return -1; } int _utime (path, times) const char *path; char *times; { return -1; } int _fork () { return -1; } int _wait (statusp) int *statusp; { return -1; } int _execve (const char *path, char *const argv[], char *const envp[]) { return -1; } int _execv (const char *path, char *const argv[]) { return -1; } int _pipe (int *fd) { return -1; } /* This is only provided because _gettimeofday_r and _times_r are defined in the same module, so we avoid a link error. */ clock_t _times (struct tms *tp) { return -1; } int _gettimeofday (struct timeval *tv, void *tz) { //tv->tv_usec = 0; //tv->tv_sec = __trap34 (SYS_time); return -1; } static inline int __setup_argv_for_main (int argc) { return -1; } int __setup_argv_and_call_main () { return main (0, NULL); }