1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Remove _IO_file_flags define.

This entirely mechanical (except for some indentation fixups) patch
replaces all uses of _IO_file_flags with _flags and removes the #define.

Installed stripped libraries and executables are unchanged by this patch.

	* libio/libio.h (_IO_file_flags): Remove macro.
	All uses changed to _flags.
This commit is contained in:
Zack Weinberg
2018-02-07 19:41:01 -05:00
parent 177aad3ff6
commit df6c012b99
22 changed files with 97 additions and 120 deletions

View File

@@ -40,13 +40,12 @@ __fgetws_unlocked_chk (wchar_t *buf, size_t size, int n, FILE *fp)
/* This is very tricky since a file descriptor may be in the
non-blocking mode. The error flag doesn't mean much in this
case. We return an error only when there is a new error. */
old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
fp->_IO_file_flags &= ~_IO_ERR_SEEN;
old_error = fp->_flags & _IO_ERR_SEEN;
fp->_flags &= ~_IO_ERR_SEEN;
count = _IO_getwline (fp, buf, MIN ((size_t) n - 1, size), L'\n', 1);
/* If we read in some bytes and errno is EAGAIN, that error will
be reported for next read. */
if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
&& errno != EAGAIN))
if (count == 0 || ((fp->_flags & _IO_ERR_SEEN) && errno != EAGAIN))
result = NULL;
else if (count >= size)
__chk_fail ();
@@ -55,6 +54,6 @@ __fgetws_unlocked_chk (wchar_t *buf, size_t size, int n, FILE *fp)
buf[count] = '\0';
result = buf;
}
fp->_IO_file_flags |= old_error;
fp->_flags |= old_error;
return result;
}