summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/fputc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/stdio/fputc.c b/src/stdio/fputc.c
index 7b80f0ef..2d748751 100644
--- a/src/stdio/fputc.c
+++ b/src/stdio/fputc.c
@@ -5,7 +5,8 @@
#include "sys/types.h"
#include "unistd.h"
#else
-#define write(fd, buf, size) -1
+#include "nonstd/syscall.h"
+#define write(_fd, _buf, _size) __syscall(__lookup("write"), _fd, _buf, _size)
#endif
/** write a character to a file stream **/
@@ -24,10 +25,7 @@ int fputc(int c, FILE *stream)
}
funlockfile(stream);
- /*
- RETURN_SUCCESS(ARGUMENT(c));
- RETURN_FAILURE(CONSTANT(EOF));
- */
+
return ch;
}
@@ -38,6 +36,9 @@ file position indicator, which is advanced. If ARGUMENT(stream) does not support
seeking or was opened in append mode, the character is written to the end of
the stream.
***/
+
/*
+RETURN_SUCCESS(ARGUMENT(c))
+RETURN_FAILURE(CONSTANT(EOF))
STDC(1)
*/