diff options
author | 2012-05-22 20:05:11 +0000 | |
---|---|---|
committer | 2012-05-22 20:05:11 +0000 | |
commit | a288139cca0c00a06dbaaf795d02a6e14c1a9ee0 (patch) | |
tree | 4b61814d90d0f509aa39012903011744339d15d7 /lib/libc/stdio | |
parent | Make the multicast filter routine conform to the Party's standards. Adapted (diff) | |
download | wireguard-openbsd-a288139cca0c00a06dbaaf795d02a6e14c1a9ee0.tar.xz wireguard-openbsd-a288139cca0c00a06dbaaf795d02a6e14c1a9ee0.zip |
Document that ftell() may return EOVERFLOW.
Diff from Tim van der Molen.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/fseek.3 | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3 index a8e2bac50ee..21235cfd99a 100644 --- a/lib/libc/stdio/fseek.3 +++ b/lib/libc/stdio/fseek.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fseek.3,v 1.12 2011/07/05 15:30:10 jmc Exp $ +.\" $OpenBSD: fseek.3,v 1.13 2012/05/22 20:05:11 matthew 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 5 2011 $ +.Dd $Mdocdate: May 22 2012 $ .Dt FSEEK 3 .Os .Sh NAME @@ -169,24 +169,49 @@ return a non-zero value and the global variable .Va errno is set to indicate the error. .Sh ERRORS +The +.Fn fgetpos , +.Fn fseek , +.Fn fseeko , +.Fn fsetpos , +.Fn ftell , +.Fn ftello , +and +.Fn rewind +functions will fail if: .Bl -tag -width Er .It Bq Er EBADF The .Fa stream specified is not a seekable stream. +.El +.Pp +Additionally, the +.Fn fseek +and +.Fn fseeko +functions will fail if: +.Bl -tag -width Er .It Bq Er EINVAL The .Fa whence -argument to -.Fn fseek -was not +argument was not .Dv SEEK_SET , .Dv SEEK_END , or .Dv SEEK_CUR . .El .Pp -The functions +Additionally, the +.Fn ftell +function will fail if: +.Bl -tag -width Er +.It Bq Er EOVERFLOW +The value of the file position indicator is too large to be represented by a +.Vt long . +.El +.Pp +Finally, the functions .Fn fgetpos , .Fn fseek , .Fn fseeko , |