int __towrite(FILE *f)
{
f->mode |= f->mode-1;
- if (f->flags & (F_NOWR)) {
+ if (f->flags & F_NOWR) {
f->flags |= F_ERR;
return EOF;
}
return 0;
}
-const int __towrite_used = 1;
-
-void __stdio_exit(void);
-
-void __flush_on_exit()
+hidden void __towrite_needs_stdio_exit()
{
- __stdio_exit();
+ __stdio_exit_needed();
}