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/fpurge.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011年06月30日 11:42:33 -0400
committerRich Felker <dalias@aerifal.cx>2011年06月30日 11:42:33 -0400
commit7640497f5f28ddb4aa13528676a99b603320f47e (patch)
tree000a3f48b6d4f0a557f291ee043db9aadfc9c2a2 /src/stdio/fpurge.c
parentfb62ae74d0c87ff506e970bf18579cc96b16e046 (diff)
downloadmusl-7640497f5f28ddb4aa13528676a99b603320f47e.tar.gz
implement the nonstandard GNU function fpurge
this is a really ugly and backwards function, but its presence will prevent lots of broken gnulib software from trying to define its own version of fpurge and thereby failing to build or worse.
Diffstat (limited to 'src/stdio/fpurge.c')
-rw-r--r--src/stdio/fpurge.c 11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/stdio/fpurge.c b/src/stdio/fpurge.c
new file mode 100644
index 00000000..a9e98e7b
--- /dev/null
+++ b/src/stdio/fpurge.c
@@ -0,0 +1,11 @@
+#define _GNU_SOURCE
+#include "stdio_impl.h"
+
+int __fpurge(FILE *f)
+{
+ f->wpos = f->wbase = f->wend = 0;
+ f->rpos = f->rend = 0;
+ return 0;
+}
+
+weak_alias(__fpurge, fpurge);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月16日 02:32:18 +0000

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