Recommending UB in fmemopen man page

From: Rich Felker <hidden>
Date: 2016-08-09 15:13:46

This recent Stack Overflow question turned up a recommendaton to
invoke undefined behavior in the fmemopen man page:

http://stackoverflow.com/questions/38854163/using-rewind-on-a-file-opened-with-fmemopen

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.

The following text should simply be removed:

       Alternatively, the caller can explicitly set buf as the stdio
       stream buffer, at the same time informing stdio of the buffer's
       size, using:

           setbuffer(stream, buf, size);

Rich
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help