/* BFD library -- caching of file descriptors.
- Copyright 1990, 1991, 1992, 1994 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
}
else
{
- /*open for creat */
+ /* Create the file. Unlink it first, for the convenience of
+ operating systems which worry about overwriting running
+ binaries. */
+ unlink (abfd->filename);
abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB);
abfd->opened_once = true;
}