diff --git a/newlib/libc/sys/sh3eb/syscalls.c b/newlib/libc/sys/sh3eb/syscalls.c index 6edb99bfc..77d5496d4 100644 --- a/newlib/libc/sys/sh3eb/syscalls.c +++ b/newlib/libc/sys/sh3eb/syscalls.c @@ -15,7 +15,7 @@ _read (int file, char *ptr, int len) { - return -1; + return len; } int @@ -23,7 +23,7 @@ _lseek (int file, int ptr, int dir) { - return -1; + return 0; } int @@ -38,7 +38,7 @@ _write ( int file, int _close (int file) { - return -1; + return 0; } int @@ -58,7 +58,9 @@ int _fstat (int file, struct stat *st) { - return -1; + /* All files are regarded as character special devices */ + st->st_mode = S_IFCHR; + return 0; } int @@ -83,9 +85,10 @@ _unlink () } -_isatty (fd) - int fd; +int +_isatty (int fd) { + /* Every output stream is a terminal */ return 1; } @@ -116,9 +119,9 @@ raise(int sig) int _stat (const char *path, struct stat *st) - { - return -1; + st->st_mode = S_IFCHR; + return 0; } int