Once we link in libgcc.a it seems we need the putchar
without underscore (in C).
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
SRC_C += libintl.c
SRC_C += localtim.c localtim_r.c lseek.c lsearch.c lstat.c ltoa.c ltostr.c
SRC_C += malloc.c mkfifo.c mkstemps.c nanosleep.c opendir.c pause.c perror.c
-SRC_C += popen.c printf.c putenv.c putgetch.c putpwent.c pwent.c qsort.c
+SRC_C += popen.c printf.c putenv.c putchar_wrapper.c putpwent.c pwent.c qsort.c
SRC_C += raise.c rand.c readdir.c readlink.c realloc.c regerror.c
SRC_C += regsub.c remove.c rewind.c rindex.c setbuffer.c setenv.c setjmp.c
SRC_C += setlocale.c setvbuf.c settimeofday.c sleep.c sprintf.c
--- /dev/null
+/* This little wrapper seems needed when linking with libgcc */
+
+int putchar(int ch)
+{
+ unsigned char c = ch;
+ return write(1, &c, 1);
+}