Author: ache Date: Sun Oct 25 12:09:28 2015 New Revision: 289931 URL: https://svnweb.freebsd.org/changeset/base/289931
Log: According to POSIX, a write operation shall start at the current size of the stream (if mode had 'a' as the first character). MFC after: 1 week Modified: head/lib/libc/stdio/fmemopen.c Modified: head/lib/libc/stdio/fmemopen.c ============================================================================== --- head/lib/libc/stdio/fmemopen.c Sun Oct 25 10:49:05 2015 (r289930) +++ head/lib/libc/stdio/fmemopen.c Sun Oct 25 12:09:28 2015 (r289931) @@ -149,6 +149,9 @@ fmemopen(void * __restrict buf, size_t s return (NULL); } + if (mode[0] == 'a') + f->_flags |= __SAPP; + /* * Turn off buffering, so a write past the end of the buffer * correctly returns a short object count. _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"