projects
/
oweals
/
musl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix indention with spaces in powerpc asm
[oweals/musl.git]
/
src
/
stdio
/
__toread.c
diff --git
a/src/stdio/__toread.c
b/src/stdio/__toread.c
index f00cc467ee9c4c371a874cb3943f23557976d0d0..2e804f641dbd8a2363f88c4c08696e1f89627d08 100644
(file)
--- a/
src/stdio/__toread.c
+++ b/
src/stdio/__toread.c
@@
-12,3
+12,13
@@
int __toread(FILE *f)
f->rpos = f->rend = f->buf;
return 0;
}
+
+static const int dummy = 0;
+weak_alias(dummy, __towrite_used);
+
+void __stdio_exit(void);
+
+void __seek_on_exit()
+{
+ if (!__towrite_used) __stdio_exit();
+}