This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH 0/2 v3] libio: POSIX compliance fmemopen
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 05 Nov 2014 17:57:58 -0200
- Subject: PATCH 0/2 v3] libio: POSIX compliance fmemopen
- Authentication-results: sourceware.org; auth=none
Hi,
This is an update of my previous fmemopen patch [1] to provide a POSIX-compliance
implementation to GLIBC.
As before it focus on addressing the bugs:
fmemopen_seek() incorrectly inverses seek offset when using SEEK_END
https://sourceware.org/bugzilla/show_bug.cgi?id=14292
fmemopen does not honor append mode
https://sourceware.org/bugzilla/show_bug.cgi?id=13152
fmemopen streams fail to read eof
https://sourceware.org/bugzilla/show_bug.cgi?id=13151
fmemopen returns NULL when len=0
https://sourceware.org/bugzilla/show_bug.cgi?id=11216
fmemopen(buf,size,"w+b") isn't binary
https://sourceware.org/bugzilla/show_bug.cgi?id=12836
fseek(..., 0, SEEK_END) doesn't work as it should on fmemopen's FILE
https://sourceware.org/bugzilla/show_bug.cgi?id=6544
Current fmemopen POSIX definition is:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html
Difference from previous RFC patches set are:
* Rewrite to GLIBC 2.21
* Some indentation fixes on tst-fmemopen2.c
* Moved the fmemopen as first patch instead of tst-fmemopen2 one
Now, related to [2] I was not aware of the issue and my understanding is
currently there is still open for discussion. This set is intended to follow
already place standard, however I intend to address possible issues if this
discussion changes current definition.
[1] https://sourceware.org/ml/libc-alpha/2014-06/msg00616.html
[2] http://www.austingroupbugs.net/view.php?id=657