1 /* -----------------------------------------------------------------------------
2 * $Id: HsCore.h,v 1.2 2001/08/17 12:50:34 simonmar Exp $
4 * Definitions for package `core' which are visible in Haskell land.
6 * ---------------------------------------------------------------------------*/
13 #ifdef HAVE_SYS_TYPES_H
14 #include <sys/types.h>
19 #ifdef HAVE_SYS_STAT_H
43 #if defined(HAVE_GETTIMEOFDAY)
44 # ifdef HAVE_SYS_TIME_H
45 # include <sys/time.h>
47 #elif defined(HAVE_GETCLOCK)
48 # ifdef HAVE_SYS_TIMERS_H
50 # include <sys/timers.h>
53 #if defined(HAVE_TIME_H)
56 #ifdef HAVE_SYS_TIMEB_H
57 #include <sys/timeb.h>
62 #ifdef HAVE_SYS_TIMES_H
63 #include <sys/times.h>
66 #if !defined(mingw32_TARGET_OS) && !defined(irix_TARGET_OS)
67 # if defined(HAVE_SYS_RESOURCE_H)
68 # include <sys/resource.h>
73 #include <sys/syscall.h>
74 #define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b)
75 #define HAVE_GETRUSAGE
79 #ifdef HAVE_SYS_WAIT_H
86 extern inline int s_isreg_wrap(m) { return S_ISREG(m); }
87 extern inline int s_isdir_wrap(m) { return S_ISDIR(m); }
88 extern inline int s_isfifo_wrap(m) { return S_ISFIFO(m); }
89 extern inline int s_isblk_wrap(m) { return S_ISBLK(m); }
90 extern inline int s_ischr_wrap(m) { return S_ISCHR(m); }
92 extern inline int s_issock_wrap(m) { return S_ISSOCK(m); }
103 HsInt systemCmd(HsAddr cmd);
105 /* in inputReady.c */
106 int inputReady(int fd, int msecs);
109 HsAddr get_prog_argv(void);
110 HsInt get_prog_argc();