aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-11-25 15:01:41 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2008-11-25 07:01:41 -0800
commit5308fd74fdb4e60b11866cadb5fdaa3e42809a1c (patch)
treef8d1ac892045853a83c6be7b6cd51a3d989e6fbb /gcc/fortran/module.c
parentbc0f8bd47860ef185442971eb3e5cea226962ef5 (diff)
downloadgcc-5308fd74fdb4e60b11866cadb5fdaa3e42809a1c.zip
gcc-5308fd74fdb4e60b11866cadb5fdaa3e42809a1c.tar.gz
gcc-5308fd74fdb4e60b11866cadb5fdaa3e42809a1c.tar.bz2
module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT.
2008-11-25 H.J. Lu <hongjiu.lu@intel.com> * module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT. From-SVN: r142192
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index a49745a..1b32ee2 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4850,7 +4850,7 @@ gfc_dump_module (const char *name, int dump_flag)
|| memcmp (md5_old, md5_new, sizeof (md5_old)) != 0)
{
/* Module file have changed, replace the old one. */
- if (unlink (filename))
+ if (unlink (filename) && errno != ENOENT)
gfc_fatal_error ("Can't delete module file '%s': %s", filename,
strerror (errno));
if (rename (filename_tmp, filename))