Commit fdf96aa3 by Janne Blomqvist

Use ISO C remove() instead of POSIX unlink()

2014-08-30  Janne Blomqvist  <jb@gcc.gnu.org>

	* module.c (gfc_dump_module): Use ISO C remove() instead of POSIX
	unlink().

From-SVN: r214744
parent 70103202
2014-08-30 Janne Blomqvist <jb@gcc.gnu.org>
* module.c (gfc_dump_module): Use ISO C remove() instead of POSIX
unlink().
2014-08-29 Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com>
PR fortran/62215
......
......@@ -6000,7 +6000,7 @@ gfc_dump_module (const char *name, int dump_flag)
module file, even if it was already there. */
if (!dump_flag)
{
unlink (filename);
remove (filename);
return;
}
......@@ -6040,7 +6040,7 @@ gfc_dump_module (const char *name, int dump_flag)
|| crc_old != crc)
{
/* Module file have changed, replace the old one. */
if (unlink (filename) && errno != ENOENT)
if (remove (filename) && errno != ENOENT)
gfc_fatal_error ("Can't delete module file '%s': %s", filename,
xstrerror (errno));
if (rename (filename_tmp, filename))
......@@ -6049,7 +6049,7 @@ gfc_dump_module (const char *name, int dump_flag)
}
else
{
if (unlink (filename_tmp))
if (remove (filename_tmp))
gfc_fatal_error ("Can't delete temporary module file '%s': %s",
filename_tmp, xstrerror (errno));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment