From 1af096d3e286498e531ecb0542bd26997ab5fe06 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 8 Oct 2002 08:03:02 +0000 Subject: [project @ 2002-10-08 08:03:02 by wolfgang] Make the new Posix bindings compile on Mac OS X. Most notable, Mac OS X lacks *) lchown *) SIGPOLL I don't know of a replacement of either, so they are just left out when they are not detected by configure. --- include/HsUnix.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/HsUnix.h b/include/HsUnix.h index 46af25a..00cb1bc 100644 --- a/include/HsUnix.h +++ b/include/HsUnix.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HsUnix.h,v 1.1 2002/09/12 16:38:22 simonmar Exp $ + * $Id: HsUnix.h,v 1.2 2002/10/08 08:03:02 wolfgang Exp $ * * (c) The University of Glasgow 2002 * @@ -16,6 +16,8 @@ #include #endif +#include + extern int execvpe(char *name, char **argv, char **envp); #ifndef INLINE @@ -29,4 +31,10 @@ 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); } +/* 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 + #endif -- cgit v1.2.3