2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
* libc/stdio/fclose.c (fclose): Release FILE as the last step. * libc/stdio/freopen.c (freopen): Ditto.
This commit is contained in:
parent
14aecf24eb
commit
403f752cb2
|
@ -1,3 +1,8 @@
|
|||
2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
|
||||
|
||||
* libc/stdio/fclose.c (fclose): Release FILE as the last step.
|
||||
* libc/stdio/freopen.c (freopen): Ditto.
|
||||
|
||||
2004-01-16 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* libc/stdio/vfprintf.c: Add sys/lock.h include.
|
||||
|
|
|
@ -83,11 +83,11 @@ _DEFUN (fclose, (fp),
|
|||
FREEUB (fp);
|
||||
if (HASLB (fp))
|
||||
FREELB (fp);
|
||||
fp->_flags = 0; /* release this FILE for reuse */
|
||||
_funlockfile(fp);
|
||||
#ifndef __SINGLE_THREAD__
|
||||
__lock_close_recursive (*(_LOCK_RECURSIVE_T *)&fp->_lock);
|
||||
#endif
|
||||
fp->_flags = 0; /* release this FILE for reuse */
|
||||
|
||||
return (r);
|
||||
}
|
||||
|
|
|
@ -148,12 +148,12 @@ _DEFUN (_freopen_r, (ptr, file, mode, fp),
|
|||
|
||||
if (f < 0)
|
||||
{ /* did not get it after all */
|
||||
fp->_flags = 0; /* set it free */
|
||||
ptr->_errno = e; /* restore in case _close clobbered */
|
||||
_funlockfile(fp);
|
||||
#ifndef __SINGLE_THREAD__
|
||||
__lock_close_recursive (*(_LOCK_RECURSIVE_T *)&fp->_lock);
|
||||
#endif
|
||||
fp->_flags = 0; /* set it free */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue