[PATCH 05/11] libio: Add fseterr_unlocked for internal use

Florian Weimer fweimer@redhat.com
Fri Jul 17 08:30:30 GMT 2020


---
 include/stdio.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/stdio.h b/include/stdio.h
index bc67d020d4..ede0f3d444 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -31,6 +31,13 @@
 #  define stdio_hidden_ldbl_proto(p,f) libc_hidden_proto (p ## f)
 # endif
 
+/* Set the error indicator on FP.  */
+static inline void
+fseterr_unlocked (FILE *fp)
+{
+  fp->_flags |= _IO_ERR_SEEN;
+}
+
 extern int __fcloseall (void) attribute_hidden;
 extern int __snprintf (char *__restrict __s, size_t __maxlen,
 		       const char *__restrict __format, ...)
-- 
2.26.2




More information about the Libc-alpha mailing list