arch/m68k-all/exec: Add Exec/Supervisor
[AROS.git] / arch / all-unix / kernel / putchar.c
blobca5a78f1731093161e5aae7722a802cd96b5fbc9
1 #include <proto/exec.h>
3 #include <kernel_base.h>
4 #include <proto/kernel.h>
6 #include <unistd.h>
8 AROS_LH1(void, KrnPutChar,
9 AROS_LHA(char, c, D0),
10 struct KernelBase *, KernelBase, 25, Kernel)
12 AROS_LIBFUNC_INIT
14 write (STDERR_FILENO, &c, 1);
15 /* Make sure it makes it to the user. Slow but save.
16 On Linux this gives an error (stderr is already unbuffered) */
17 #if !(defined(__linux__) || defined(__FreeBSD__))
18 fsync (STDERR_FILENO);
19 #endif
21 AROS_LIBFUNC_EXIT