]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r289863,r289931,r290110,r290230,r290231,r290232
authorache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 8 Nov 2015 13:37:16 +0000 (13:37 +0000)
committerache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 8 Nov 2015 13:37:16 +0000 (13:37 +0000)
commitf1ed16084ee8104e6a769ab604d3a0db907584b4
tree20f498bd623fab85c76c978a69e059c9bda125d0
parent840f4c4fd74b804b7afd7530d3fb1913e52b5614
MFC:  r289863,r289931,r290110,r290230,r290231,r290232

r290232:

Microoptimize.

r290231:

Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.

r290230:

Don't seek to the end if write buffer is empty (in append modes).
PR:     204156

r290110:

Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag.

r289931:

According to POSIX, a write operation shall start at the current size of
the stream (if mode had 'a' as the first character).

r289863:

Since no room left in the _flags, reuse __SALC for O_APPEND.
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().

git-svn-id: svn://svn.freebsd.org/base/stable/10@290544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
include/stdio.h
lib/libc/stdio/fdopen.c
lib/libc/stdio/findfp.c
lib/libc/stdio/fmemopen.c
lib/libc/stdio/fopen.c
lib/libc/stdio/freopen.c
lib/libc/stdio/ftell.c
lib/libc/stdio/stdio.c