aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/local.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-03-12 23:37:01 +0100
committerCorinna Vinschen <corinna@vinschen.de>2016-03-12 23:37:01 +0100
commit99d0e2341d3ff37b98eff9163b195b715ff8bddf (patch)
tree1f07ba8d032a413f253d0efd199c0ce7f8925be8 /newlib/libc/stdio/local.h
parent6b97fabf1ba0c13921549ec4a89b6953da881078 (diff)
downloadnewlib-99d0e2341d3ff37b98eff9163b195b715ff8bddf.zip
newlib-99d0e2341d3ff37b98eff9163b195b715ff8bddf.tar.gz
newlib-99d0e2341d3ff37b98eff9163b195b715ff8bddf.tar.bz2
Add __swhatbuf function from OpenBSD
To fix a long-standing setvbuf bug, import __swhatbuf function from OpenBSD and only slightly rearrange for newlib. * libc/stdio/local.h (__swhatbuf_r): Declare. * libc/stdio/makebuf (__smakebuf_r): New function. (__smakebuf_r): Drop file handling code and call __smakebuf_r. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/stdio/local.h')
-rw-r--r--newlib/libc/stdio/local.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index cf8e6a9..471442e 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -182,6 +182,7 @@ extern int _EXFUN(__stextmode,(int));
extern _VOID _EXFUN(__sinit,(struct _reent *));
extern _VOID _EXFUN(_cleanup_r,(struct _reent *));
extern _VOID _EXFUN(__smakebuf_r,(struct _reent *, FILE *));
+extern int _EXFUN(__swhatbuf_r,(struct _reent *, FILE *, size_t *, int *));
extern int _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *)));
extern int _EXFUN(_fwalk_reent,(struct _reent *, int (*)(struct _reent *, FILE *)));
struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));