summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fopen.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/fopen.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/fopen.c')
-rw-r--r--lib/libc/stdio/fopen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c
index b26f637..9ab61ba 100644
--- a/lib/libc/stdio/fopen.c
+++ b/lib/libc/stdio/fopen.c
@@ -92,8 +92,7 @@ fopen(const char * __restrict file, const char * __restrict mode)
* fseek and ftell.)
*/
if (oflags & O_APPEND) {
- /* XXX: Reuse __SALC for O_APPEND. */
- fp->_flags |= __SALC;
+ fp->_flags2 |= __S2OAP;
(void)_sseek(fp, (fpos_t)0, SEEK_END);
}
return (fp);
OpenPOWER on IntegriCloud