This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1995] fprintf() + fmemopen() error (?)
- From: "michael dot kerrisk at gmx dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 Apr 2006 21:00:46 -0000
- Subject: [Bug libc/1995] fprintf() + fmemopen() error (?)
- References: <20051208133403.1995.michael.kerrisk@gmx.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From michael dot kerrisk at gmx dot net 2006-04-19 21:00 -------
Subject: Re: fprintf() + fmemopen() error (?)
Hi Ryan,
> I suggest mentioning setbuffer(fp, buf, sizeof(buf)) in the man page as the
> recommended method for getting around the problem. I believe the libc info
> page needs to be updated as well.
Can you just say a little more about why you think
setbuffer(fp, buf, sizeof(buf))
is superior to, say,
setvbuf(fp, NULL)
Yes, I suppose that there is potentially less buffer copying involved with
the former way of doing things, but is there anything else?
For what it's worth, I like the idea of your patch that would make the
setbuffer() step implicit.
Cheers,
Michael
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1995
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.