summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/stdio/ferror.313
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/libc/stdio/ferror.3 b/lib/libc/stdio/ferror.3
index 526c07e32a8..0f0bdf21f9e 100644
--- a/lib/libc/stdio/ferror.3
+++ b/lib/libc/stdio/ferror.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ferror.3,v 1.10 2013/07/17 05:42:11 schwarze Exp $
+.\" $OpenBSD: ferror.3,v 1.11 2021/10/31 16:56:47 schwarze Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 17 2013 $
+.Dd $Mdocdate: October 31 2021 $
.Dt FERROR 3
.Os
.Sh NAME
@@ -73,9 +73,14 @@ function.
.Pp
The function
.Fn fileno
-examines the argument
+returns the file descriptor associated with the given
.Fa stream
-and returns its integer file descriptor.
+or \-1 if it is not associated with any file descriptor,
+for example if it was created with
+.Xr fmemopen 3 ,
+.Xr open_memstream 3 ,
+or
+.Xr funopen 3 .
.Sh ERRORS
These functions should not fail and do not set the external
variable