musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/setbuffer.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011年04月05日 12:25:31 -0400
committerRich Felker <dalias@aerifal.cx>2011年04月05日 12:25:31 -0400
commite72180083e4b0203d1883b6054198decdb60071c (patch)
tree3032022750932b31296345883363c96e532fb956 /src/stdio/setbuffer.c
parent8b61c816933abe9ac152a05ccf8bd801f7bc13bf (diff)
downloadmusl-e72180083e4b0203d1883b6054198decdb60071c.tar.gz
add more legacy functions: setlinebuf and setbuffer
Diffstat (limited to 'src/stdio/setbuffer.c')
-rw-r--r--src/stdio/setbuffer.c 7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stdio/setbuffer.c b/src/stdio/setbuffer.c
new file mode 100644
index 00000000..71233d2e
--- /dev/null
+++ b/src/stdio/setbuffer.c
@@ -0,0 +1,7 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+
+void setbuffer(FILE *f, char *buf, size_t size)
+{
+ setvbuf(f, buf, buf ? _IOFBF : _IONBF, size);
+}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月13日 04:08:59 +0000

AltStyle によって変換されたページ (->オリジナル) /