[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / lib / std / cbits / removeFile.lc
diff --git a/ghc/lib/std/cbits/removeFile.lc b/ghc/lib/std/cbits/removeFile.lc
deleted file mode 100644 (file)
index 095b621..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-%
-% (c) The GRASP/AQUA Project, Glasgow University, 1995
-%
-\subsection[removeFile.lc]{removeFile Runtime Support}
-
-\begin{code}
-
-#include "rtsdefs.h"
-#include "stgio.h"
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-StgInt
-removeFile(path)
-StgByteArray path;
-{
-    struct stat sb;
-
-    /* Check for a non-directory */
-    while (stat(path, &sb) != 0) {
-       if (errno != EINTR) {
-           cvtErrno();
-           stdErrno();
-           return -1;
-       }
-    }
-    if (S_ISDIR(sb.st_mode)) {
-       ghc_errtype = ERR_INAPPROPRIATETYPE;
-       ghc_errstr = "file is a directory";
-       return -1;
-    }
-    while (unlink(path) != 0) {
-       if (errno != EINTR) {
-           cvtErrno();
-           stdErrno();
-           return -1;
-       }
-    }
-    return 0;
-}
-
-\end{code}