1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2000-11-16  Ulrich Drepper  <drepper@redhat.com>

	* libio/freopen.c (freopen): Reset _mode after succesful
	reopening.
	* libio/freopen64.c (freopen64): Likewise.
	Patch by Yoshito Kawada <KAWADA@jp.ibm.com>.
This commit is contained in:
Ulrich Drepper
2000-11-16 18:20:27 +00:00
parent 40306912c9
commit 3b1de3ba9e
3 changed files with 14 additions and 1 deletions

View File

@ -51,6 +51,9 @@ freopen (filename, mode, fp)
else
#endif
result = _IO_freopen (filename, mode, fp);
if (result != NULL)
/* unbound stream orientation */
result->_mode = 0;
_IO_funlockfile (fp);
_IO_cleanup_region_end (0);
return result;