summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/setbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/setbuf.c')
-rw-r--r--lib/libc/stdio/setbuf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/stdio/setbuf.c b/lib/libc/stdio/setbuf.c
new file mode 100644
index 00000000..a1ef7b31
--- /dev/null
+++ b/lib/libc/stdio/setbuf.c
@@ -0,0 +1,7 @@
+#include <io.h>
+#include <stdio.h>
+
+void setbuf(FILE *restrict stream, char *restrict buf)
+{
+ setvbuf(stream, buf, buf != NULL ? _IOFBF : _IONBF, BUFSIZ);
+}