diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-12-01 13:00:08 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-12-01 21:37:52 -0500 |
commit | eb6cbd249f4465b01f428057bf6ab61f5f0c07e3 (patch) | |
tree | fa77879f6470f5511770ce1975e9a21c0970043d /libio/fileops.c | |
parent | f638872ab422a5747b9481a88087cf7d857f048d (diff) | |
download | glibc-eb6cbd249f4465b01f428057bf6ab61f5f0c07e3.tar.gz glibc-eb6cbd249f4465b01f428057bf6ab61f5f0c07e3.tar.xz glibc-eb6cbd249f4465b01f428057bf6ab61f5f0c07e3.zip |
[BZ #12724] libio: revert partial POSIX 2008 fclose support
In BZ #12724, partial support for POSIX 2008 fclose behavior was added. Since it isn't entirely conforming to the spec, some applications are known to be breaking in this intermediate state. So revert the partial support until we can get things fully implemented. This reverts commit fcabc0f8b185f9e0a9289720be5ede6c39b3bf21. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libio/fileops.c')
-rw-r--r-- | libio/fileops.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libio/fileops.c b/libio/fileops.c index fb6ac17b64..09d689dbb3 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -155,21 +155,13 @@ int _IO_new_file_close_it (fp) _IO_FILE *fp; { + int write_status; if (!_IO_file_is_open (fp)) return EOF; - int write_status; - if (_IO_in_put_mode (fp)) + if ((fp->_flags & _IO_NO_WRITES) == 0 + && (fp->_flags & _IO_CURRENTLY_PUTTING) != 0) write_status = _IO_do_flush (fp); - else if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL - && !_IO_in_backup (fp)) - { - off64_t o = _IO_SEEKOFF (fp, 0, _IO_seek_cur, 0); - if (o == WEOF) - write_status = EOF; - else - write_status = _IO_SYSSEEK (fp, o, SEEK_SET) < 0 ? EOF : 0; - } else write_status = 0; |