aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2015-09-04 00:18:56 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2015-09-04 00:18:56 +0300
commit43ff5c7a2dd5912a3bf90bd0f9cc599ac3a3acce (patch)
tree593d7f86e1d9512136f291a704411e7af2722593 /libgfortran/io/unix.c
parentc8c030589bd61290418753e766f26d8f99e8b074 (diff)
downloadgcc-43ff5c7a2dd5912a3bf90bd0f9cc599ac3a3acce.zip
gcc-43ff5c7a2dd5912a3bf90bd0f9cc599ac3a3acce.tar.gz
gcc-43ff5c7a2dd5912a3bf90bd0f9cc599ac3a3acce.tar.bz2
libgfortran: Use remove(3) instead of unlink(2) when deleting files.
testsuite: 2015-09-04 Janne Blomqvist <jb@gcc.gnu.org> * gfortran.dg/read_dir.f90: Delete empty directory when closing rather than calling rmdir, cleanup if open fails. libgfortran: 2015-09-04 Janne Blomqvist <jb@gcc.gnu.org> * io/unix.h (delete_file): Remove prototype. * io/unix.c (delete_file): Remove function. * io/close.c (st_close): Replace delete_file and unlink with remove. * io/open.c (already_open): Replace unlink with remove. From-SVN: r227472
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index fd5f277..5385d8b 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1716,16 +1716,6 @@ flush_all_units (void)
}
-/* delete_file()-- Given a unit structure, delete the file associated
- * with the unit. Returns nonzero if something went wrong. */
-
-int
-delete_file (gfc_unit * u)
-{
- return unlink (u->filename);
-}
-
-
/* file_exists()-- Returns nonzero if the current filename exists on
* the system */