aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/putchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/putchar.c')
-rw-r--r--com32/lib/putchar.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/com32/lib/putchar.c b/com32/lib/putchar.c
new file mode 100644
index 00000000..4b340d17
--- /dev/null
+++ b/com32/lib/putchar.c
@@ -0,0 +1,16 @@
+/*
+ * putchar.c
+ *
+ * gcc "printf decompilation" expects this to exist...
+ */
+
+#include <stdio.h>
+
+#undef putchar
+
+int putchar(int c)
+{
+ unsigned char ch = c;
+
+ return _fwrite(&ch, 1, stdout) == 1 ? ch : EOF;
+}