OSDN Git Service

2007-03-15 Eric Blake <ebb9@byu.net>
authorjjohnstn <jjohnstn>
Thu, 15 Mar 2007 18:40:48 +0000 (18:40 +0000)
committerjjohnstn <jjohnstn>
Thu, 15 Mar 2007 18:40:48 +0000 (18:40 +0000)
commit02c34cef149cdadcbdf620b88d39c479e620ed18
treea7380c4a60253b34b394f46630df33611b5b5459
parent47667312a92eca0ca4805b92e1de8fad69a341f8
2007-03-15  Eric Blake  <ebb9@byu.net>

* libc/stdio/local.h (cantwrite, FREEUB, FREELB): Make reentrant.
(__smakebuf): Rename...
(__smakebuf_r): to this.
* libc/stdio/fvwrite.h (__swsetup_r): Rename, from __swsetup.
* libc/stdio/makebuf.c (__smakebuf): Detect failed asprint
allocation, then rename...
(__smakebuf_r): ...to this and fix reentrancy.
* libc/stdio/wsetup.c (__swsetup): Detect failed asprintf
allocation, then rename...
(__swsetup_r): ...to this and fix reentrancy.
* libc/stdio/fseek.c (_fseek_r): Fix reentrancy.
* libc/stdio/refill.c (__srefill_r): Likewise.
* libc/stdio/fclose.c (_fclose_r): Likewise.
* libc/stdio/fread.c (_fread_r): Likewise.
* libc/stdio/freopen.c (_freopen_r): Likewise.
* libc/stdio/wbuf.c (__swbuf_r): Likewise.
* libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
* libc/stdio/fvwrite.c (__sfvwrite_r): Set errno properly on
failed asprintf allocation, and fix reentrancy.
* libc/stdio/snprintf.c (snprintf, _snprintf_r): Report overflow,
as required by POSIX.
* libc/stdio/sniprintf.c (sniprintf, _sniprintf_r): Likewise.
* libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Likewise.
* libc/stdio/vsniprintf.c (vsniprintf, _vsniprintf_r): Likewise.
17 files changed:
newlib/ChangeLog
newlib/libc/stdio/fclose.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/fseek.c
newlib/libc/stdio/fvwrite.c
newlib/libc/stdio/fvwrite.h
newlib/libc/stdio/local.h
newlib/libc/stdio/makebuf.c
newlib/libc/stdio/refill.c
newlib/libc/stdio/sniprintf.c
newlib/libc/stdio/snprintf.c
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vsniprintf.c
newlib/libc/stdio/vsnprintf.c
newlib/libc/stdio/wbuf.c
newlib/libc/stdio/wsetup.c