/* ----------------------------------------------------------------------------- * * (c) The University of Glasgow 2002 * * Definitions for package `unix' which are visible in Haskell land. * * ---------------------------------------------------------------------------*/ #ifndef HSUNIX_H #define HSUNIX_H #include "HsUnixConfig.h" #include "HsFFI.h" /* ultra-evil... */ #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION #include #include #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_SYS_TIMES_H #include #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_SYS_RESOURCE_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_UTIME_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_TERMIOS_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_GRP_H #include #endif #ifdef HAVE_DIRENT_H #include #endif #if defined(HAVE_BSD_LIBUTIL_H) #include #elif defined(HAVE_LIBUTIL_H) #include #endif #ifdef HAVE_PTY_H #include #endif #ifdef HAVE_UTMP_H #include #endif #include #ifdef HAVE_SIGNAL_H #include #endif /* defined in rts/posix/Signals.c */ extern HsInt nocldstop; /* defined in libc */ extern char **environ; #ifdef HAVE_RTLDNEXT void *__hsunix_rtldNext (void); #endif #ifdef HAVE_RTLDDEFAULT void *__hsunix_rtldDefault (void); #endif /* O_SYNC doesn't exist on Mac OS X and (at least some versions of) FreeBSD, fall back to O_FSYNC, which should be the same */ #ifndef O_SYNC # define O_SYNC O_FSYNC #endif // not part of POSIX, hence may not be always defined #ifndef WCOREDUMP # define WCOREDUMP(s) 0 #endif // push a SVR4 STREAMS module; do nothing if STREAMS not available int __hsunix_push_module(int fd, const char *module); #endif