projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2001-04-02 16:10:32 by rrt]
[ghc-hetmet.git]
/
ghc
/
lib
/
std
/
cbits
/
fileSize.c
diff --git
a/ghc/lib/std/cbits/fileSize.c
b/ghc/lib/std/cbits/fileSize.c
index
86c55d9
..
02ad1d4
100644
(file)
--- 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
*
/*
* (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
*/
*
* hClose Runtime Support
*/
@@
-21,14
+21,14
@@
StgInt
fileSize(StgForeignPtr ptr, StgByteArray result)
{
IOFileObject* fo = (IOFileObject*)ptr;
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;
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();
/* highly unlikely */
if (errno != EINTR) {
cvtErrno();
@@
-55,14
+55,14
@@
StgInt
fileSize_int64(StgForeignPtr ptr, StgByteArray result)
{
IOFileObject* fo = (IOFileObject*)ptr;
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;
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();
/* highly unlikely */
if (errno != EINTR) {
cvtErrno();