#define off64_t off_t
int asprintf(char **, const char *, ...);
int vasprintf(char **, const char *, va_list);
+void setlinebuf(FILE *);
+void setbuffer(FILE *, char *, size_t);
#endif
#ifdef __cplusplus
-#include "stdio_impl.h"
+#include <stdio.h>
void setbuf(FILE *f, char *buf)
{
--- /dev/null
+#define _GNU_SOURCE
+#include <stdio.h>
+
+void setbuffer(FILE *f, char *buf, size_t size)
+{
+ setvbuf(f, buf, buf ? _IOFBF : _IONBF, size);
+}
--- /dev/null
+#define _GNU_SOURCE
+#include <stdio.h>
+
+void setlinebuf(FILE *f)
+{
+ setvbuf(f, 0, _IOLBF, 0);
+}