Commit 699ae98d authored by simonmar's avatar simonmar
Browse files

[project @ 2001-01-16 11:27:45 by simonmar]

temp. bug fix for MacOS X which has a large off_t.  This code is
broken anyway.
parent 9cad56b2
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
* $Id: fileSize.c,v 1.4 2000/12/11 17:51:57 simonmar Exp $
* $Id: fileSize.c,v 1.5 2001/01/16 11:27:45 simonmar Exp $
*
* hClose Runtime Support
*/
......@@ -38,7 +38,11 @@ fileSize(StgForeignPtr ptr, StgByteArray result)
}
if (S_ISREG(sb.st_mode)) {
/* result will be word aligned */
#if defined( macosx_TARGET_OS )
*(W_ *) result = (W_)sb.st_size;
#else
*(off_t *) result = sb.st_size;
#endif
return 0;
} else {
ghc_errtype = ERR_INAPPROPRIATETYPE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment