summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fputs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/fputs.c')
-rw-r--r--lib/libc/stdio/fputs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/stdio/fputs.c b/lib/libc/stdio/fputs.c
new file mode 100644
index 00000000..8538b9c2
--- /dev/null
+++ b/lib/libc/stdio/fputs.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+#include <string.h>
+
+int fputs(const char *restrict s, FILE *restrict stream)
+{
+ return fwrite(s, 1, strlen(s), stream) == strlen(s) ? 0 : EOF;
+}