diff options
Diffstat (limited to 'ghc/lib/std/cbits/seekFile.c')
-rw-r--r-- | ghc/lib/std/cbits/seekFile.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ghc/lib/std/cbits/seekFile.c b/ghc/lib/std/cbits/seekFile.c index 16f76187a3..954152ff62 100644 --- a/ghc/lib/std/cbits/seekFile.c +++ b/ghc/lib/std/cbits/seekFile.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: seekFile.c,v 1.6 2001/03/01 12:25:33 rrt Exp $ + * $Id: seekFile.c,v 1.7 2001/04/02 16:10:33 rrt Exp $ * * hSeek and hIsSeekable Runtime Support */ @@ -22,7 +22,7 @@ StgInt seekFile(StgForeignPtr ptr, StgInt whence, StgInt size, StgByteArray d) { IOFileObject* fo = (IOFileObject*)ptr; - struct Stat sb; + struct stat sb; off_t offset; int posn_delta =0; int rc = 0; @@ -84,7 +84,7 @@ seekFile(StgForeignPtr ptr, StgInt whence, StgInt size, StgByteArray d) if (rc < 0) return rc; /* Try to find out the file type */ - while (Fstat(fo->fd, &sb) < 0) { + while (fstat(fo->fd, &sb) < 0) { /* highly unlikely */ if (errno != EINTR) { cvtErrno(); @@ -114,7 +114,7 @@ StgInt seekFile_int64(StgForeignPtr ptr, StgInt whence, StgInt64 d) { IOFileObject* fo = (IOFileObject*)ptr; - struct Stat sb; + struct stat sb; off_t offset = d; int posn_delta =0; int rc = 0; @@ -154,7 +154,7 @@ seekFile_int64(StgForeignPtr ptr, StgInt whence, StgInt64 d) if (rc < 0) return rc; /* Try to find out the file type & size for a physical file */ - while (Fstat(fo->fd, &sb) < 0) { + while (fstat(fo->fd, &sb) < 0) { /* highly unlikely */ if (errno != EINTR) { cvtErrno(); @@ -183,10 +183,10 @@ StgInt seekFileP(StgForeignPtr ptr) { IOFileObject* fo = (IOFileObject*)ptr; - struct Stat sb; + struct stat sb; /* Try to find out the file type */ - while (Fstat(fo->fd, &sb) < 0) { + while (fstat(fo->fd, &sb) < 0) { /* highly unlikely */ if (errno != EINTR) { cvtErrno(); |