summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/openFile.c
diff options
context:
space:
mode:
authorrrt <unknown>2001-03-01 12:25:33 +0000
committerrrt <unknown>2001-03-01 12:25:33 +0000
commitae2fa137637637d21e3ca46b25b9325a77e77641 (patch)
treeda5bad2d07aad10a7420b39fd0cec4944395777d /ghc/lib/std/cbits/openFile.c
parentf0c9e5607b8c45773d6c099645e3228af2694d81 (diff)
downloadhaskell-ae2fa137637637d21e3ca46b25b9325a77e77641.tar.gz
[project @ 2001-03-01 12:25:32 by rrt]
Apply stat fix for mingw. It's ugly, it's implausible, but it seems to work. Unlike Cygwin...(missing no. 3).
Diffstat (limited to 'ghc/lib/std/cbits/openFile.c')
-rw-r--r--ghc/lib/std/cbits/openFile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/lib/std/cbits/openFile.c b/ghc/lib/std/cbits/openFile.c
index 66f7eab686..5ce3340806 100644
--- a/ghc/lib/std/cbits/openFile.c
+++ b/ghc/lib/std/cbits/openFile.c
@@ -1,7 +1,7 @@
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: openFile.c,v 1.18 2000/05/15 09:20:11 simonmar Exp $
+ * $Id: openFile.c,v 1.19 2001/03/01 12:25:33 rrt Exp $
*
* openFile Runtime Support
*/
@@ -79,7 +79,7 @@ openFile(StgByteArray file, StgInt how, StgInt binary)
int oflags;
int for_writing;
int created = 0;
- struct stat sb;
+ struct Stat sb;
IOFileObject* fo;
int flags = 0;
@@ -136,7 +136,7 @@ openFile(StgByteArray file, StgInt how, StgInt binary)
} else {
/* If it is a dangling symlink, break off now, too. */
#ifndef mingw32_TARGET_OS
- struct stat st;
+ struct Stat st;
if ( lstat(file,&st) == 0) {
ghc_errtype = ERR_NOSUCHTHING;
ghc_errstr = "dangling symlink";
@@ -193,7 +193,7 @@ openFile(StgByteArray file, StgInt how, StgInt binary)
/* Make sure that we aren't looking at a directory */
- while (fstat(fd, &sb) < 0) {
+ while (Fstat(fd, &sb) < 0) {
/* highly unlikely */
if (errno != EINTR) {
cvtErrno();