aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man3/fmemopen.311
1 files changed, 10 insertions, 1 deletions
diff --git a/man3/fmemopen.3 b/man3/fmemopen.3
index 3d983d1e5d..0205969a60 100644
--- a/man3/fmemopen.3
+++ b/man3/fmemopen.3
@@ -2,7 +2,7 @@
.\" and Copyright 2005 Michael Kerrisk <mtk.manpages@gmail.com>
.\" Distributed under the GPL.
.\"
-.TH FMEMOPEN 3 2008-08-21 "GNU" "Linux Programmer's Manual"
+.TH FMEMOPEN 3 2008-10-12 "GNU" "Linux Programmer's Manual"
.SH NAME
fmemopen, open_memstream \- open memory as stream
.SH SYNOPSIS
@@ -35,6 +35,15 @@ If
specifies an append mode, then the initial file position is set to
location of the first null byte (\(aq\\0\(aq) in the buffer;
otherwise the initial file position is set to the start of the buffer.
+Since glibc 2.9, the letter 'b' may be specified as the second character in
+.IR mode .
+This provides "binary" mode:
+writes don't add a terminating null byte, and a
+.BR fseek (3)
+.B SEEK_END
+is relative to the end of the buffer (i.e., the value specified by the
+.I size
+argument), rather than the current string length.
.PP
When a stream that has been opened for writing is flushed
.RB ( fflush (3))