This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug fc003


On Mon, Mar 28, 2005 at 07:55:18PM +0200, Tobias Schl??ter wrote:
> FX Coudert wrote:
> >>Sorry for a me too but it works correctly on powerpc-darwin
> >>(aka Mac OS X) so it could either be a cygwin bug or a libgfortran
> >>bug.
> > 
> > 
> > Is that Cygwin or Mingw bug? In the later case, I will investigate.
> 
> I suspect this patch will fix it, but I can't test this on windows:
> 
> Index: unix.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/libgfortran/io/unix.c,v
> retrieving revision 1.21
> diff -u -p -r1.21 unix.c
> --- unix.c      23 Jan 2005 00:14:31 -0000      1.21
> +++ unix.c      28 Mar 2005 17:53:45 -0000
> @@ -1322,7 +1322,7 @@ delete_file (gfc_unit * u)
>        return 1;
>      }
> 
> -  return unlink (path);
> +  return remove (path);
>  }
> 

Okay, I haven't looked at unix.c, but I do want to note
that remove and unlink have different semantics, particularly
if path is a directory.

For unlink: "The path argument may not be a directory."

For remove: "If path specifies a directory, remove(path)
             is the equivalent of rmdir(path).  Otherwise,
             it is the equivalent of unlink(path)."

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]