From 245c459c3f4dcbc6da4c66aebc8879251e9af682 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 2 Sep 2001 19:10:10 +0000 Subject: Move all stdio internal flags processing and setting out of __sread(), __swrite() and __sseek() to higher level. According to funopen(3) they all are just wrappers to something like standard read(2), write(2) and lseek(2), i.e. must not touch stdio internals because they are replaceable with any other functions knows nothing about stdio internals. See example of funopen(3) usage in sendmail sources f.e. NOTE: this is original stdio bug, not result of my range checkin added. --- lib/libc/stdio/fdopen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdio/fdopen.c') diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c index 2e72e71..30bf5b9 100644 --- a/lib/libc/stdio/fdopen.c +++ b/lib/libc/stdio/fdopen.c @@ -78,8 +78,8 @@ fdopen(fd, mode) fp->_flags = flags; /* * If opened for appending, but underlying descriptor does not have - * O_APPEND bit set, assert __SAPP so that __swrite() will lseek to - * end before each write. + * O_APPEND bit set, assert __SAPP so that __swrite() caller + * will _sseek() to the end before write. */ if ((oflags & O_APPEND) && !(fdflags & O_APPEND)) fp->_flags |= __SAPP; -- cgit v1.1