diff --git a/mlibc/include/stdio.h b/mlibc/include/stdio.h index e3ff2cf5..79db7d93 100644 --- a/mlibc/include/stdio.h +++ b/mlibc/include/stdio.h @@ -53,6 +53,7 @@ int fdputs (char const* s, int fd); #undef putc #endif +int eputc (int c); int eputs (char const* s); int fdputc (int c, int fd); int getchar (); @@ -94,6 +95,7 @@ typedef int FILE; typedef unsigned long size_t; #endif +int eputc (int c); int eputs (char const* s); int fclose (FILE *stream); FILE *fdopen (int fd, char const *mode); diff --git a/mlibc/libc-gcc.c b/mlibc/libc-gcc.c index 82e080d8..01745f8d 100644 --- a/mlibc/libc-gcc.c +++ b/mlibc/libc-gcc.c @@ -461,6 +461,12 @@ fdputs (char const* s, int fd) return 0; } +int +eputc (int c) +{ + return fdputc (c, STDERR); +} + int eputs (char const* s) { diff --git a/mlibc/libc-mes.c b/mlibc/libc-mes.c index c8abba5f..154d1f4b 100644 --- a/mlibc/libc-mes.c +++ b/mlibc/libc-mes.c @@ -139,6 +139,12 @@ strlen (char const* s) return i; } +int +eputc (int c) +{ + return fputc (c, 2); +} + int eputs (char const* s) {