2 % (c) The GRASP/AQUA Project, Glasgow University, 1994
4 \subsection[fileSize.lc]{hfileSize Runtime Support}
11 #ifdef HAVE_SYS_TYPES_H
12 #include <sys/types.h>
15 #ifdef HAVE_SYS_STAT_H
26 while (fstat(fileno((FILE *) fp), &sb) < 0) {
34 if (S_ISREG(sb.st_mode)) {
35 /* result will be word aligned */
36 *(off_t *) result = sb.st_size;
39 ghc_errtype = ERR_INAPPROPRIATETYPE;
40 ghc_errstr = "not a regular file";