aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2012-04-28 16:20:29 +1200
committerMichael Kerrisk <mtk.manpages@gmail.com>2012-05-07 15:30:13 +1200
commite70cfff8b5becd76b7e6d5dd439cb261a6734bca (patch)
tree25c8c64573b9bdb138f0052712764af8233e72aa
parent005e6bb888bf049e03f0a47873604ad069fb8e99 (diff)
downloadman-pages-e70cfff8b5becd76b7e6d5dd439cb261a6734bca.tar.gz
fmemopen.3: BUGS: Note inconsistent treatment of 'b' in 'mode'
fopen() permits, for example, both "w+b" and "wb+", but only the latter is meaningful to fmemopen(). See http://sourceware.org/bugzilla/show_bug.cgi?id=12836 Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/fmemopen.313
1 files changed, 13 insertions, 0 deletions
diff --git a/man3/fmemopen.3 b/man3/fmemopen.3
index 39ea297e30..436bb51863 100644
--- a/man3/fmemopen.3
+++ b/man3/fmemopen.3
@@ -249,6 +249,19 @@ However, in this case the glibc
.BR fmemopen ()
sets the file position to \-1.
+To specify binary mode for
+.BR fmemopen ()
+the \(aqb\(aq must be the
+.I second
+character in
+.IR mode .
+Thus, for example, "wb+" has the desired effect, but "w+b" does not.
+This is inconsistent with the treatment of
+.\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12836
+.IR mode
+by
+.BR fopen (3).
+
The glibc 2.9 addition of "binary" mode for
.BR fmemopen ()
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6544