This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/12836] fmemopen(buf,size,"w+b") isn't binary
- From: "eblake at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 30 Jan 2014 04:23:18 +0000
- Subject: [Bug stdio/12836] fmemopen(buf,size,"w+b") isn't binary
- Auto-submitted: auto-generated
- References: <bug-12836-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=12836
--- Comment #6 from Eric Blake <eblake at redhat dot com> ---
(In reply to paxdiablo from comment #5)
> The POSIX standard calls for fmemopen() to accept all mode strings as
> allowed in fopen() but notes that use of "b" results in
> implementation-defined behaviour.
POSIX has been amended to cater to glibc's behavior of having different
behavior for 'b':
http://austingroupbugs.net/view.php?id=396
And in fact, consensus was that the next version of POSIX should require
glibc's behavior of having saner behavior for 'b':
http://austingroupbugs.net/view.php?id=456
>
> So, technically, I think an implementation _could_ treat w+b and wb+ as
> different if it so desired but it would have to document that.
>
> Of course, it would probably be easier to fix the code to make them
> identical :-)
No, we WANT them to be different, per the adjustments to POSIX.
--
You are receiving this mail because:
You are on the CC list for the bug.