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:
authorJeff Johnston <jjohnstn@redhat.com>2007-03-15 21:40:48 +0300
committerJeff Johnston <jjohnstn@redhat.com>2007-03-15 21:40:48 +0300
commit14ba5e14d9226cb4dd1b2a72781ee02e9f2bf8a2 (patch)
tree2bd8d4251eebbf9db5443c0bba034650fb5c15ad /newlib/libc/stdio/refill.c
parente96d068ed3c85f138e368c399a728eb6e9a65751 (diff)
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.
Diffstat (limited to 'newlib/libc/stdio/refill.c')
-rw-r--r--newlib/libc/stdio/refill.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/stdio/refill.c b/newlib/libc/stdio/refill.c
index 75ba0565f..71a1e565f 100644
--- a/newlib/libc/stdio/refill.c
+++ b/newlib/libc/stdio/refill.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1990 The Regents of the University of California.
+ * Copyright (c) 1990, 2007 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@@ -43,7 +43,7 @@ _DEFUN(__srefill_r, (ptr, fp),
{
/* make sure stdio is set up */
- CHECK_INIT (_REENT, fp);
+ CHECK_INIT (ptr, fp);
fp->_r = 0; /* largely a convenience for callers */
@@ -83,7 +83,7 @@ _DEFUN(__srefill_r, (ptr, fp),
*/
if (HASUB (fp))
{
- FREEUB (fp);
+ FREEUB (ptr, fp);
if ((fp->_r = fp->_ur) != 0)
{
fp->_p = fp->_up;
@@ -93,7 +93,7 @@ _DEFUN(__srefill_r, (ptr, fp),
}
if (fp->_bf._base == NULL)
- __smakebuf (fp);
+ __smakebuf_r (ptr, fp);
/*
* Before reading from a line buffered or unbuffered file,