/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: seekFile.c,v 1.5 2000/01/17 12:30:07 simonmar Exp $
+ * $Id: seekFile.c,v 1.6 2001/03/01 12:25:33 rrt Exp $
*
* hSeek and hIsSeekable Runtime Support
*/
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;
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();
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;
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();
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();