diff options
author | dzwdz | 2022-08-26 14:16:16 +0200 |
---|---|---|
committer | dzwdz | 2022-08-26 14:16:16 +0200 |
commit | e6584db26da34572fb13aa236e16e19f71c8e976 (patch) | |
tree | 055c528765e986bc8ed6706cec84289e50b46ed6 /src/user/lib/stdio/misc.c | |
parent | ffdf0e8d93f8e98ed9d5a8270feb2a19eb9659e3 (diff) |
user/libc: prepare for OpenED port
Diffstat (limited to 'src/user/lib/stdio/misc.c')
-rw-r--r-- | src/user/lib/stdio/misc.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/user/lib/stdio/misc.c b/src/user/lib/stdio/misc.c new file mode 100644 index 0000000..8f872ec --- /dev/null +++ b/src/user/lib/stdio/misc.c @@ -0,0 +1,25 @@ +#include <errno.h> +#include <stdio.h> + +void perror(const char *s) { + if (s) fprintf(stderr, "%s: ", s); + fprintf(stderr, "errno %d\n", errno); +} + +int puts(const char *s) { + return printf("%s\n", s); +} + +int getchar(void) { + return fgetc(stdin); +} + +int putchar(int c) { + return fputc(c, stdout); +} + +off_t lseek(int fd, off_t off, int whence) { + (void)fd; (void)off; (void)whence; + errno = ENOSYS; + return -1; +} |