From fb789a7a51ba183c2600711a5f771720930aa1da Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 12 Sep 2002 16:38:22 +0000 Subject: [project @ 2002-09-12 16:38:21 by simonmar] More POSIX bits... we're getting there. --- include/HsUnix.h | 32 ++++++++++++++++++++++++++++++++ include/Makefile | 9 +++++++++ 2 files changed, 41 insertions(+) create mode 100644 include/HsUnix.h create mode 100644 include/Makefile (limited to 'include') diff --git a/include/HsUnix.h b/include/HsUnix.h new file mode 100644 index 0000000..46af25a --- /dev/null +++ b/include/HsUnix.h @@ -0,0 +1,32 @@ +/* ----------------------------------------------------------------------------- + * $Id: HsUnix.h,v 1.1 2002/09/12 16:38:22 simonmar Exp $ + * + * (c) The University of Glasgow 2002 + * + * Definitions for package `unix' which are visible in Haskell land. + * + * ---------------------------------------------------------------------------*/ + +#ifndef HSUNIX_H +#define HSUNIX_H + +#include "config.h" + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +extern int execvpe(char *name, char **argv, char **envp); + +#ifndef INLINE +#define INLINE extern inline +#endif + +INLINE int __hsunix_wifexited (int stat) { return WIFEXITED(stat); } +INLINE int __hsunix_wexitstatus (int stat) { return WEXITSTATUS(stat); } +INLINE int __hsunix_wifsignaled (int stat) { return WIFSIGNALED(stat); } +INLINE int __hsunix_wtermsig (int stat) { return WTERMSIG(stat); } +INLINE int __hsunix_wifstopped (int stat) { return WIFSTOPPED(stat); } +INLINE int __hsunix_wstopsig (int stat) { return WSTOPSIG(stat); } + +#endif diff --git a/include/Makefile b/include/Makefile new file mode 100644 index 0000000..ed4eaae --- /dev/null +++ b/include/Makefile @@ -0,0 +1,9 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk + +H_FILES = $(wildcard *.h) + +includedir = $(libdir)/include +INSTALL_INCLUDES = $(H_FILES) + +include $(TOP)/mk/target.mk -- cgit v1.2.3