From e6584db26da34572fb13aa236e16e19f71c8e976 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 26 Aug 2022 14:16:16 +0200 Subject: user/libc: prepare for OpenED port --- src/user/lib/stdio/misc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/user/lib/stdio/misc.c (limited to 'src/user/lib/stdio/misc.c') 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 +#include + +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; +} -- cgit v1.2.3