summaryrefslogtreecommitdiff
path: root/debug/fgetws_chk.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:24:30 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:24:30 +0000
commit1949a12d5da678a8532359a95717d8e63910d93b (patch)
tree586d52ba1a6c68f69c997131a343c872bedb8d4e /debug/fgetws_chk.c
parentb12af7e807488f3c955f6eceea75c6f23f39f06d (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/master_backports' into t/master_backportst/master_backports
Diffstat (limited to 'debug/fgetws_chk.c')
-rw-r--r--debug/fgetws_chk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/debug/fgetws_chk.c b/debug/fgetws_chk.c
index a3b7b82459..2380059f0f 100644
--- a/debug/fgetws_chk.c
+++ b/debug/fgetws_chk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,9 +20,9 @@
#include <sys/param.h>
wchar_t *
-__fgetws_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
+__fgetws_chk (wchar_t *buf, size_t size, int n, FILE *fp)
{
- _IO_size_t count;
+ size_t count;
wchar_t *result;
int old_error;
CHECK_FILE (fp, NULL);
@@ -32,8 +32,8 @@ __fgetws_chk (wchar_t *buf, size_t size, int n, _IO_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. */
@@ -46,7 +46,7 @@ __fgetws_chk (wchar_t *buf, size_t size, int n, _IO_FILE *fp)
buf[count] = '\0';
result = buf;
}
- fp->_IO_file_flags |= old_error;
+ fp->_flags |= old_error;
_IO_release_lock (fp);
return result;
}