From 5308fd74fdb4e60b11866cadb5fdaa3e42809a1c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 25 Nov 2008 15:01:41 +0000 Subject: module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT. 2008-11-25 H.J. Lu * module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT. From-SVN: r142192 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/module.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b22c8da..a01ae8f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2008-11-25 H.J. Lu + + * module.c (gfc_dump_module): Report error on unlink only if + errno != ENOENT. + 2008-11-25 Mikael Morin PR fortran/36463 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)) -- cgit v1.1