aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar simonmar <unknown>2002-09-12 16:38:22 +0000
committerGravatar simonmar <unknown>2002-09-12 16:38:22 +0000
commitfb789a7a51ba183c2600711a5f771720930aa1da (patch)
tree506bf212d27b9069fe29eef7160fc87ba1b82d20 /include
parent7f4767d8c35cee56b8fcb5f949bd4aa30deea061 (diff)
[project @ 2002-09-12 16:38:21 by simonmar]
More POSIX bits... we're getting there.
Diffstat (limited to 'include')
-rw-r--r--include/HsUnix.h32
-rw-r--r--include/Makefile9
2 files changed, 41 insertions, 0 deletions
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 <sys/wait.h>
+#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