Import Upstream version 20180207
[hcoop/debian/mlton.git] / runtime / platform / darwin.h
CommitLineData
7f918cf1
CE
1#include <fenv.h>
2#include <inttypes.h>
3#include <stdint.h>
4
5#include <unistd.h>
6
7#include <dirent.h>
8#include <fcntl.h>
9#include <grp.h>
10#include <netdb.h>
11#include <netinet/in.h>
12#include <netinet/tcp.h>
13#include <netinet/udp.h>
14#include <pwd.h>
15#include <sys/ioctl.h>
16#include <sys/mman.h>
17#include <sys/poll.h>
18#include <sys/ptrace.h>
19#include <sys/socket.h>
20#include <sys/stat.h>
21#include <sys/sysctl.h>
22#include <sys/time.h>
23#include <sys/resource.h> /* <sys/resource.h> might not #include <sys/time.h> */
24#include <sys/times.h>
25#include <sys/un.h>
26#include <sys/utsname.h>
27#include <sys/wait.h>
28#include <syslog.h>
29#include <termios.h>
30#include <sys/ucontext.h>
31#include <utime.h>
32
33#include <crt_externs.h>
34
35#define HAS_FEROUND TRUE
36#define HAS_MSG_DONTWAIT TRUE
37#define HAS_REMAP FALSE
38#define HAS_SIGALTSTACK TRUE
39#define NEEDS_SIGALTSTACK_EXEC FALSE
40#define HAS_SPAWN FALSE
41#define HAS_TIME_PROFILING TRUE
42
43#define MLton_Platform_OS_host "darwin"
44
45// MacOS only defines this if POSIX_C_SOURCE is defined.
46// However, defining that breaks half the osx system headers.
47// They couldn't possibly change the number at this point anyway.
48#ifndef SIGPOLL
49#define SIGPOLL 7
50#endif
51
52/* for Posix_ProcEnv_environ */
53#define environ *_NSGetEnviron()