Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | #include <inttypes.h> |
2 | ||
3 | #include <unistd.h> | |
4 | ||
5 | #include <dirent.h> | |
6 | #include <fcntl.h> | |
7 | #include <grp.h> | |
8 | #include <io.h> | |
9 | #include <netdb.h> | |
10 | #include <netinet/in.h> | |
11 | #include <netinet/tcp.h> | |
12 | #include <netinet/udp.h> | |
13 | #include <process.h> | |
14 | #include <pwd.h> | |
15 | #include <sys/cygwin.h> | |
16 | #include <sys/ioctl.h> | |
17 | #include <sys/mman.h> | |
18 | #include <sys/poll.h> | |
19 | #include <sys/resource.h> | |
20 | #include <sys/socket.h> | |
21 | #include <sys/stat.h> | |
22 | #include <sys/time.h> | |
23 | #include <sys/times.h> | |
24 | #include <sys/un.h> | |
25 | #include <sys/utsname.h> | |
26 | #include <sys/wait.h> | |
27 | #include <syslog.h> | |
28 | #include <termios.h> | |
29 | #include <utime.h> | |
30 | #include <windows.h> | |
31 | ||
32 | #include <cygwin/version.h> | |
33 | ||
34 | #define MLton_Platform_OS_host "cygwin" | |
35 | ||
36 | #define HAS_FEROUND FALSE | |
37 | #define HAS_REMAP TRUE | |
38 | #define HAS_SIGALTSTACK FALSE | |
39 | #define NEEDS_SIGALTSTACK_EXEC FALSE | |
40 | #define HAS_SPAWN TRUE | |
41 | #define HAS_TIME_PROFILING FALSE | |
42 | ||
43 | #ifndef MSG_DONTWAIT | |
44 | #define HAS_MSG_DONTWAIT FALSE | |
45 | /* This should not conflict with existing flags. */ | |
46 | #define MSG_DONTWAIT 0x1000000 | |
47 | #else | |
48 | #define HAS_MSG_DONTWAIT TRUE | |
49 | #endif | |
50 | ||
51 | #define SPAWN_MODE _P_NOWAIT | |
52 | ||
53 | /* Cygwin does not handle IPv6. */ | |
54 | #ifndef AF_INET6 | |
55 | ||
56 | #define AF_INET6 23 /* Internet Protocol, Version 6 */ | |
57 | #define PF_INET6 AF_INET6 | |
58 | ||
59 | struct sockaddr_in6 { | |
60 | int dummy; // quell gcc warnings about "struct has no members" | |
61 | }; | |
62 | ||
63 | /* Cygwin does provide sockaddr_storage. */ | |
64 | ||
65 | #endif | |
66 | ||
67 | typedef unsigned int nfds_t; | |
68 | typedef long suseconds_t; // type of timeval.tv_usec in sys/time.h | |
69 | ||
70 | #ifndef MSG_WAITALL | |
71 | // Unimplemented on Cygwin | |
72 | #define MSG_WAITALL 0 | |
73 | #endif | |
74 | #ifndef MSG_EOR | |
75 | // Unimplemented on Cygwin | |
76 | #define MSG_EOR 0 | |
77 | #endif |