summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-01-23 16:55:06 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-01-23 16:55:06 +0000
commit2be77241537a65d5d1e507d2c2dd6afddb666049 (patch)
tree6ef3199afa854064be79ca48112bfcec36ed368f
parent545e51be154967ab3e8d82fff5f7c25487076e72 (diff)
Wasn't thinking... we don't need to seek to end when appending if stdio
is built without buffer support.
-rw-r--r--libc/stdio/stdio.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c
index 4cd330a9b..0599f2353 100644
--- a/libc/stdio/stdio.c
+++ b/libc/stdio/stdio.c
@@ -1736,18 +1736,6 @@ size_t _stdio_fwrite(const unsigned char *buffer, size_t bytes,
/* We always clear the reading flag in case at EOF. */
stream->modeflags &= ~(__FLAG_READING);
- if ((stream->modeflags & (__FLAG_WRITING|__FLAG_APPEND)) == __FLAG_APPEND) {
- /* Append mode, but not currently writing. Need to seek to end for proper
- * ftell() return values. Don't worry if the stream isn't seekable. */
- __offmax_t pos[1];
- *pos = 0;
- if (_stdio_lseek(stream, pos, SEEK_END) && (errno != EPIPE)) { /* Too big? */
- stream->modeflags |= __FLAG_ERROR;
- return 0;
- }
- }
-
-
/* Unlike the buffered case, we set the writing flag now since we don't
* need to do anything here for fflush(). */
stream->modeflags |= __FLAG_WRITING;