mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
libio: Use stdin consistently for input functions [BZ #24153]
The internal _IO_stdin_ variable is not updated when the application assigns to stdin, which is a GNU extension.
This commit is contained in:
@ -33,8 +33,8 @@ wint_t
|
||||
getwchar (void)
|
||||
{
|
||||
wint_t result;
|
||||
_IO_acquire_lock (_IO_stdin);
|
||||
result = _IO_getwc_unlocked (_IO_stdin);
|
||||
_IO_release_lock (_IO_stdin);
|
||||
_IO_acquire_lock (stdin);
|
||||
result = _IO_getwc_unlocked (stdin);
|
||||
_IO_release_lock (stdin);
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user