2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
* io/open.c (already_open): Test for POSIX close return value.
* io/unit.c (close_unit_1): Likewise.
* io/unix.c (raw_close): Return 0 for success for preconnected units.
From-SVN: r145761
2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
+ * io/open.c (already_open): Test for POSIX close return value.
+ * io/unit.c (close_unit_1): Likewise.
+ * io/unix.c (raw_close): Return 0 for success for preconnected units.
+
+2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
+
* runtime/string.c (compare0): Use gfc_charlen_type.
* runtime/error.c (gfc_itoa): Move to io/write.c
(xtoa): Rename to gfc_xtoa.
}
#endif
- if (sclose (u->s) == FAILURE)
+ if (sclose (u->s) == -1)
{
unlock_unit (u);
generate_error (&opp->common, LIBERROR_OS,
if (u->previous_nonadvancing_write)
finish_last_advance_record (u);
- rc = (u->s == NULL) ? 0 : sclose (u->s) == FAILURE;
+ rc = (u->s == NULL) ? 0 : sclose (u->s) == -1;
u->closed = 1;
if (!locked)
&& s->fd != STDIN_FILENO)
retval = close (s->fd);
else
- retval = SUCCESS;
+ retval = 0;
free_mem (s);
return retval;
}