summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fdopen.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2015-10-28 14:40:02 +0000
committerache <ache@FreeBSD.org>2015-10-28 14:40:02 +0000
commit64dac23af83b727e5f33d41dc5ecb1444c8c0c30 (patch)
treebaa8aba8f21fff38237715019c7a521ac1e39e6a /lib/libc/stdio/fdopen.c
parentc641ee406283e8610464caba08dac1b0ffd2cfff (diff)
downloadFreeBSD-src-64dac23af83b727e5f33d41dc5ecb1444c8c0c30.zip
FreeBSD-src-64dac23af83b727e5f33d41dc5ecb1444c8c0c30.tar.gz
Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag. MFC after: 3 weeks
Diffstat (limited to 'lib/libc/stdio/fdopen.c')
-rw-r--r--lib/libc/stdio/fdopen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c
index 8bd9c2d..fbe37e8 100644
--- a/lib/libc/stdio/fdopen.c
+++ b/lib/libc/stdio/fdopen.c
@@ -91,9 +91,8 @@ fdopen(int fd, const char *mode)
* O_APPEND bit set, assert __SAPP so that __swrite() caller
* will _sseek() to the end before write.
*/
- /* XXX: Reuse __SALC for O_APPEND. */
if (fdflags & O_APPEND)
- fp->_flags |= __SALC;
+ fp->_flags2 |= __S2OAP;
else if (oflags & O_APPEND)
fp->_flags |= __SAPP;
fp->_file = fd;
OpenPOWER on IntegriCloud