From 64dac23af83b727e5f33d41dc5ecb1444c8c0c30 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 28 Oct 2015 14:40:02 +0000 Subject: Add _flags2 per jhb@ suggestion since no room left in _flags. Rewrite O_APPEND flag checking using new __S2OAP flag. MFC after: 3 weeks --- lib/libc/stdio/fdopen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libc/stdio/fdopen.c') 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; -- cgit v1.1