X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2Fcbits%2FfileSize.c;h=02ad1d46ca0522cf0a39c3860ef68b4410555cdf;hb=eb256e9af970565f79a66f8731bdaeddcc96a3a6;hp=86c55d937109bd1c7ad073c5f04ca07c1421139f;hpb=c69fc1ae9231717e81f268d4d522c1770d9fdb14;p=ghc-hetmet.git diff --git a/ghc/lib/std/cbits/fileSize.c b/ghc/lib/std/cbits/fileSize.c index 86c55d9..02ad1d4 100644 --- a/ghc/lib/std/cbits/fileSize.c +++ b/ghc/lib/std/cbits/fileSize.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: fileSize.c,v 1.6 2001/03/01 12:25:33 rrt Exp $ + * $Id: fileSize.c,v 1.7 2001/04/02 16:10:32 rrt Exp $ * * hClose Runtime Support */ @@ -21,14 +21,14 @@ StgInt fileSize(StgForeignPtr ptr, StgByteArray result) { IOFileObject* fo = (IOFileObject*)ptr; - struct Stat sb; + struct stat sb; int rc = 0; /* Flush buffer in order to get as an accurate size as poss. */ rc = flushFile(ptr); if (rc < 0) return rc; - while (Fstat(fo->fd, &sb) < 0) { + while (fstat(fo->fd, &sb) < 0) { /* highly unlikely */ if (errno != EINTR) { cvtErrno(); @@ -55,14 +55,14 @@ StgInt fileSize_int64(StgForeignPtr ptr, StgByteArray result) { IOFileObject* fo = (IOFileObject*)ptr; - struct Stat sb; + struct stat sb; int rc = 0; /* Flush buffer in order to get as an accurate size as poss. */ rc = flushFile(ptr); if (rc < 0) return rc; - while (Fstat(fo->fd, &sb) < 0) { + while (fstat(fo->fd, &sb) < 0) { /* highly unlikely */ if (errno != EINTR) { cvtErrno();