diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index 0b16a5c85..3d983d1e5 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -2,7 +2,7 @@ .\" and Copyright 2005 Michael Kerrisk .\" Distributed under the GPL. .\" -.TH FMEMOPEN 3 2005-12-08 "GNU" "Linux Programmer's Manual" +.TH FMEMOPEN 3 2008-08-21 "GNU" "Linux Programmer's Manual" .SH NAME fmemopen, open_memstream \- open memory as stream .SH SYNOPSIS @@ -120,16 +120,14 @@ This byte is .I not included in the size value stored at .IR sizeloc . -.\" -.\" FIXME . The glibc info doc has text like the following, but it appears -.\" not to be true: http://sourceware.org/bugzilla/show_bug.cgi?id=1996 -.\" The stream's file position can be changed with -.\" .BR fseek (3) -.\" or -.\" .BR fseeko (3). -.\" Moving the file position past the end -.\" of the data already written fills the intervening space with -.\" zeros. + +The stream's file position can be changed with +.BR fseek (3) +or +.BR fseeko (3). +Moving the file position past the end +of the data already written fills the intervening space with +zeros. .SH "RETURN VALUE" Upon successful completion .BR fmemopen () @@ -203,6 +201,13 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .fi +.SH BUGS +In glibc before version 2.7, seeking past the end of a stream created by +.BR open_memstream () +does not enlarge the buffer; instead the +.BR fseek () +call fails, returning \-1. +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=1996 .SH "SEE ALSO" .BR fopen (3), .BR feature_test_macros (7)