summaryrefslogtreecommitdiffstats
path: root/newlib/libc/machine/spu/putchar.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2006-12-18 20:39:02 +0000
committerJeff Johnston <jjohnstn@redhat.com>2006-12-18 20:39:02 +0000
commit505ccc75c4d380084ef11bc51b8d876ba656e729 (patch)
tree0b80780613fea864ee996a3ffec339951c1776e6 /newlib/libc/machine/spu/putchar.c
parent78b7c6f81727c700279895c2012f0d7b01a72d97 (diff)
downloadcygnal-505ccc75c4d380084ef11bc51b8d876ba656e729.tar.gz
cygnal-505ccc75c4d380084ef11bc51b8d876ba656e729.tar.bz2
cygnal-505ccc75c4d380084ef11bc51b8d876ba656e729.zip
2006-12-18 Joel Schopp <jschopp@austin.ibm.com>
* libc/machine/spu/c99ppe.h: New file * libc/machine/spu/perror.c: New file to override libc/stdio version. * libc/machine/spu/printf.c: New file * libc/machine/spu/putchar.c: New file * libc/machine/spu/puts.c: New file * libc/machine/spu/vprintf.c: New file * libc/machine/spu/vsnprintf.c: New file * libc/machine/spu/vsprintf.c: New file * libc/machine/spu/Makefile.am: Add new targets. * libc/machine/spu/Makefile.in: Regenerated.
Diffstat (limited to 'newlib/libc/machine/spu/putchar.c')
-rw-r--r--newlib/libc/machine/spu/putchar.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/newlib/libc/machine/spu/putchar.c b/newlib/libc/machine/spu/putchar.c
new file mode 100644
index 000000000..0b6709d7f
--- /dev/null
+++ b/newlib/libc/machine/spu/putchar.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+#include "c99ppe.h"
+
+#undef putchar
+
+int
+putchar (c)
+ int c;
+{
+ /* c gets overwritten before return */
+
+ send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c);
+
+ return c;
+}
+