+2008-11-25 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ PR fortran/38248
+ * module.c (gfc_dump_module): Check rename/unlink syscalls errors.
+
2008-11-25 Eric Botcazou <ebotcazou@adacore.com>
PR fortran/37319
|| memcmp (md5_old, md5_new, sizeof (md5_old)) != 0)
{
/* Module file have changed, replace the old one. */
- unlink (filename);
- rename (filename_tmp, filename);
+ if (unlink (filename))
+ gfc_fatal_error ("Can't delete module file '%s': %s", filename,
+ strerror (errno));
+ if (rename (filename_tmp, filename))
+ gfc_fatal_error ("Can't rename module file '%s' to '%s': %s",
+ filename_tmp, filename, strerror (errno));
}
else
- unlink (filename_tmp);
+ {
+ if (unlink (filename_tmp))
+ gfc_fatal_error ("Can't delete temporary module file '%s': %s",
+ filename_tmp, strerror (errno));
+ }
}