aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-08-10 11:39:00 +1200
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-08-12 07:14:42 +1200
commita9672faabc2fddb906211c0e79894fe07ac675e6 (patch)
tree5729e33d83c2a1048e8f77956787b0dea703e983
parent423cb9f7ffc4c36443cdb52cf847c7a8e4500123 (diff)
downloadman-pages-a9672faabc2fddb906211c0e79894fe07ac675e6.tar.gz
fmemopen.3: Remove bogus suggestion to use setbuffer()
As Rich Felker comments: The stdio buffer associated with the fmemopen-obtained FILE, and the output memory buffer into which it's writing, are conceptually distinct entities, and there is no reason to expect reasonable results if you modify the contents of a setvbuf-associated buffer through other means while it's associated with a FILE. See http://stackoverflow.com/questions/38854163/using-rewind-on-a-file-opened-with-fmemopen Reported-by: Rich Felker <dalias@libc.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/fmemopen.312
1 files changed, 0 insertions, 12 deletions
diff --git a/man3/fmemopen.3 b/man3/fmemopen.3
index b17b6afb89..299dc7bd77 100644
--- a/man3/fmemopen.3
+++ b/man3/fmemopen.3
@@ -137,18 +137,6 @@ Disabling buffering with the following call
may be useful to detect errors at the time of an output operation:
setbuf(stream, NULL);
-
-Alternatively, the caller can explicitly set
-.I buf
-as the stdio stream buffer, at the same time informing stdio
-of the buffer's size, using:
-
- setbuffer(stream, buf, size);
-.\"
-.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
-.\" and
-.\" http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
-.\"
.SH RETURN VALUE
Upon successful completion,
.BR fmemopen ()