From 7640497f5f28ddb4aa13528676a99b603320f47e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 30 Jun 2011 11:42:33 -0400 Subject: 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. --- src/stdio/fpurge.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/stdio/fpurge.c (limited to 'src') 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); -- cgit v1.2.1