Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/setvbuf.c')
-rw-r--r--newlib/libc/stdio/setvbuf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/newlib/libc/stdio/setvbuf.c b/newlib/libc/stdio/setvbuf.c
index 63f1f80db..41bdff6b6 100644
--- a/newlib/libc/stdio/setvbuf.c
+++ b/newlib/libc/stdio/setvbuf.c
@@ -103,8 +103,9 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
register size_t size)
{
int ret = 0;
+ struct _reent *reent = _REENT;
- CHECK_INIT (_REENT, fp);
+ CHECK_INIT (reent, fp);
_newlib_flockfile_start (fp);
@@ -126,11 +127,11 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
* non buffer flags, and clear malloc flag.
*/
- _fflush_r (_REENT, fp);
+ _fflush_r (reent, fp);
fp->_r = 0;
fp->_lbfsize = 0;
if (fp->_flags & __SMBF)
- _free_r (_REENT, (_PTR) fp->_bf._base);
+ _free_r (reent, (_PTR) fp->_bf._base);
fp->_flags &= ~(__SLBF | __SNBF | __SMBF);
if (mode == _IONBF)
@@ -180,7 +181,7 @@ nbf:
case _IOFBF:
/* no flag */
- _REENT->__cleanup = _cleanup_r;
+ reent->__cleanup = _cleanup_r;
fp->_bf._base = fp->_p = (unsigned char *) buf;
fp->_bf._size = size;
break;