diff options
author | ngie <ngie@FreeBSD.org> | 2015-01-11 19:15:28 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-01-11 19:15:28 +0000 |
commit | 0a1f910d396bf47c3adf1608f16805eafce1c69c (patch) | |
tree | a6ea4260d0fa3a951d8063b29c894d9134fb675b /lib/libc/stdio/fopen.3 | |
parent | addcd434f9cfc53268eb0ba8220e61e410a48727 (diff) | |
download | FreeBSD-src-0a1f910d396bf47c3adf1608f16805eafce1c69c.zip FreeBSD-src-0a1f910d396bf47c3adf1608f16805eafce1c69c.tar.gz |
MFC discussed with: jilles, -developers
MFC r266971:
- Return NULL and set errno to EINVAL if size is 0 (as required by POSIX).
Update the manpage to reflect this change.
- Always set the current position to the first null-byte when opening in append
mode. This makes the implementation compatible with glibc's. Update the test
suite.
Reported by: pho
Approved by: cognet
Diffstat (limited to 'lib/libc/stdio/fopen.3')
-rw-r--r-- | lib/libc/stdio/fopen.3 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index f11f4e0..b39cb5a 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -302,6 +302,15 @@ for any of the errors specified for the routines .Xr fclose 3 and .Xr fflush 3 . +.Pp +The +.Fn fmemopen +function +may also fail and set +.Va errno +if the +.Fa size +argument is 0. .Sh SEE ALSO .Xr open 2 , .Xr fclose 3 , |