| 1 |
;************************************************************************** |
| 2 |
;* * |
| 3 |
;* OCaml * |
| 4 |
;* * |
| 5 |
;* Thomas Refis, Jane Street Europe * |
| 6 |
;* * |
| 7 |
;* Copyright 2018 Jane Street Group LLC * |
| 8 |
;* * |
| 9 |
;* All rights reserved. This file is distributed under the terms of * |
| 10 |
;* the GNU Lesser General Public License version 2.1, with the * |
| 11 |
;* special exception on linking described in the file LICENSE. * |
| 12 |
;* * |
| 13 |
;************************************************************************** |
| 14 |
|
| 15 |
(library |
| 16 |
(name unix) |
| 17 |
(wrapped false) |
| 18 |
(modes byte) |
| 19 |
(flags (:standard -nostdlib -nolabels)) |
| 20 |
(c_flags (-I %{project_root}/runtime)) |
| 21 |
(libraries stdlib) |
| 22 |
(c_names |
| 23 |
accept access addrofstr alarm bind channels chdir chmod chown chroot close |
| 24 |
fsync closedir connect cst2constr cstringv dup dup2 envir errmsg execv execve |
| 25 |
execvp exit fchmod fchown fcntl fork ftruncate getaddrinfo getcwd getegid |
| 26 |
geteuid getgid getgr getgroups gethost gethostname getlogin getnameinfo |
| 27 |
getpeername getpid getppid getproto getpw gettimeofday getserv getsockname |
| 28 |
getuid gmtime initgroups isatty itimer kill link listen lockf lseek mkdir |
| 29 |
mkfifo mmap mmap_ba nice open opendir pipe putenv read readdir readlink |
| 30 |
realpath rename rewinddir rmdir select sendrecv setgid setgroups setsid |
| 31 |
setuid shutdown signals sleep socket socketaddr socketpair sockopt stat |
| 32 |
strofaddr symlink termios time times truncate umask unixsupport unlink utimes |
| 33 |
wait write)) |
| 34 |
|
| 35 |
(rule |
| 36 |
(action (copy accept_unix.c accept.c)) |
| 37 |
(enabled_if (<> %{os_type} "Win32"))) |
| 38 |
(rule (action (copy bind_unix.c bind.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 39 |
(rule |
| 40 |
(action (copy channels_unix.c channels.c)) |
| 41 |
(enabled_if (<> %{os_type} "Win32"))) |
| 42 |
(rule (action (copy close_unix.c close.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 43 |
(rule |
| 44 |
(action (copy connect_unix.c connect.c)) |
| 45 |
(enabled_if (<> %{os_type} "Win32"))) |
| 46 |
(rule (action (copy dup_unix.c dup.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 47 |
(rule (action (copy envir_unix.c envir.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 48 |
(rule |
| 49 |
(action (copy errmsg_unix.c errmsg.c)) |
| 50 |
(enabled_if (<> %{os_type} "Win32"))) |
| 51 |
(rule |
| 52 |
(action (copy getpeername_unix.c getpeername.c)) |
| 53 |
(enabled_if (<> %{os_type} "Win32"))) |
| 54 |
(rule |
| 55 |
(action (copy getpid_unix.c getpid.c)) |
| 56 |
(enabled_if (<> %{os_type} "Win32"))) |
| 57 |
(rule |
| 58 |
(action (copy gettimeofday_unix.c gettimeofday.c)) |
| 59 |
(enabled_if (<> %{os_type} "Win32"))) |
| 60 |
(rule |
| 61 |
(action (copy getsockname_unix.c getsockname.c)) |
| 62 |
(enabled_if (<> %{os_type} "Win32"))) |
| 63 |
(rule |
| 64 |
(action (copy isatty_unix.c isatty.c)) |
| 65 |
(enabled_if (<> %{os_type} "Win32"))) |
| 66 |
(rule (action (copy link_unix.c link.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 67 |
(rule |
| 68 |
(action (copy listen_unix.c listen.c)) |
| 69 |
(enabled_if (<> %{os_type} "Win32"))) |
| 70 |
(rule (action (copy lockf_unix.c lockf.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 71 |
(rule (action (copy lseek_unix.c lseek.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 72 |
(rule (action (copy mmap_unix.c mmap.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 73 |
(rule (action (copy open_unix.c open.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 74 |
(rule (action (copy pipe_unix.c pipe.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 75 |
(rule (action (copy read_unix.c read.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 76 |
(rule |
| 77 |
(action (copy readlink_unix.c readlink.c)) |
| 78 |
(enabled_if (<> %{os_type} "Win32"))) |
| 79 |
(rule |
| 80 |
(action (copy realpath_unix.c realpath.c)) |
| 81 |
(enabled_if (<> %{os_type} "Win32"))) |
| 82 |
(rule |
| 83 |
(action (copy rename_unix.c rename.c)) |
| 84 |
(enabled_if (<> %{os_type} "Win32"))) |
| 85 |
(rule |
| 86 |
(action (copy select_unix.c select.c)) |
| 87 |
(enabled_if (<> %{os_type} "Win32"))) |
| 88 |
(rule |
| 89 |
(action (copy sendrecv_unix.c sendrecv.c)) |
| 90 |
(enabled_if (<> %{os_type} "Win32"))) |
| 91 |
(rule |
| 92 |
(action (copy shutdown_unix.c shutdown.c)) |
| 93 |
(enabled_if (<> %{os_type} "Win32"))) |
| 94 |
(rule (action (copy sleep_unix.c sleep.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 95 |
(rule |
| 96 |
(action (copy socket_unix.c socket.c)) |
| 97 |
(enabled_if (<> %{os_type} "Win32"))) |
| 98 |
(rule |
| 99 |
(action (copy socketpair_unix.c socketpair.c)) |
| 100 |
(enabled_if (<> %{os_type} "Win32"))) |
| 101 |
(rule |
| 102 |
(action (copy sockopt_unix.c sockopt.c)) |
| 103 |
(enabled_if (<> %{os_type} "Win32"))) |
| 104 |
(rule (action (copy stat_unix.c stat.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 105 |
(rule |
| 106 |
(action (copy symlink_unix.c symlink.c)) |
| 107 |
(enabled_if (<> %{os_type} "Win32"))) |
| 108 |
(rule (action (copy times_unix.c times.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 109 |
(rule |
| 110 |
(action (copy truncate_unix.c truncate.c)) |
| 111 |
(enabled_if (<> %{os_type} "Win32"))) |
| 112 |
(rule |
| 113 |
(action (copy unixsupport_unix.c unixsupport.c)) |
| 114 |
(enabled_if (<> %{os_type} "Win32"))) |
| 115 |
(rule |
| 116 |
(action (copy utimes_unix.c utimes.c)) |
| 117 |
(enabled_if (<> %{os_type} "Win32"))) |
| 118 |
(rule (action (copy write_unix.c write.c)) (enabled_if (<> %{os_type} "Win32"))) |
| 119 |
|
| 120 |
(rule |
| 121 |
(action (copy accept_win32.c accept.c)) |
| 122 |
(enabled_if (= %{os_type} "Win32"))) |
| 123 |
(rule (action (copy bind_win32.c bind.c)) (enabled_if (= %{os_type} "Win32"))) |
| 124 |
(rule |
| 125 |
(action (copy channels_win32.c channels.c)) |
| 126 |
(enabled_if (= %{os_type} "Win32"))) |
| 127 |
(rule (action (copy close_win32.c close.c)) (enabled_if (= %{os_type} "Win32"))) |
| 128 |
(rule |
| 129 |
(action (copy connect_win32.c connect.c)) |
| 130 |
(enabled_if (= %{os_type} "Win32"))) |
| 131 |
(rule (action (copy dup_win32.c dup.c)) (enabled_if (= %{os_type} "Win32"))) |
| 132 |
(rule (action (copy envir_win32.c envir.c)) (enabled_if (= %{os_type} "Win32"))) |
| 133 |
(rule |
| 134 |
(action (copy errmsg_win32.c errmsg.c)) |
| 135 |
(enabled_if (= %{os_type} "Win32"))) |
| 136 |
(rule |
| 137 |
(action (copy getpeername_win32.c getpeername.c)) |
| 138 |
(enabled_if (= %{os_type} "Win32"))) |
| 139 |
(rule |
| 140 |
(action (copy getpid_win32.c getpid.c)) |
| 141 |
(enabled_if (= %{os_type} "Win32"))) |
| 142 |
(rule |
| 143 |
(action (copy gettimeofday_win32.c gettimeofday.c)) |
| 144 |
(enabled_if (= %{os_type} "Win32"))) |
| 145 |
(rule |
| 146 |
(action (copy getsockname_win32.c getsockname.c)) |
| 147 |
(enabled_if (= %{os_type} "Win32"))) |
| 148 |
(rule |
| 149 |
(action (copy isatty_win32.c isatty.c)) |
| 150 |
(enabled_if (= %{os_type} "Win32"))) |
| 151 |
(rule (action (copy link_win32.c link.c)) (enabled_if (= %{os_type} "Win32"))) |
| 152 |
(rule |
| 153 |
(action (copy listen_win32.c listen.c)) |
| 154 |
(enabled_if (= %{os_type} "Win32"))) |
| 155 |
(rule (action (copy lockf_win32.c lockf.c)) (enabled_if (= %{os_type} "Win32"))) |
| 156 |
(rule (action (copy lseek_win32.c lseek.c)) (enabled_if (= %{os_type} "Win32"))) |
| 157 |
(rule (action (copy mmap_win32.c mmap.c)) (enabled_if (= %{os_type} "Win32"))) |
| 158 |
(rule (action (copy open_win32.c open.c)) (enabled_if (= %{os_type} "Win32"))) |
| 159 |
(rule (action (copy pipe_win32.c pipe.c)) (enabled_if (= %{os_type} "Win32"))) |
| 160 |
(rule (action (copy read_win32.c read.c)) (enabled_if (= %{os_type} "Win32"))) |
| 161 |
(rule |
| 162 |
(action (copy readlink_win32.c readlink.c)) |
| 163 |
(enabled_if (= %{os_type} "Win32"))) |
| 164 |
(rule |
| 165 |
(action (copy realpath_win32.c realpath.c)) |
| 166 |
(enabled_if (= %{os_type} "Win32"))) |
| 167 |
(rule |
| 168 |
(action (copy rename_win32.c rename.c)) |
| 169 |
(enabled_if (= %{os_type} "Win32"))) |
| 170 |
(rule |
| 171 |
(action (copy select_win32.c select.c)) |
| 172 |
(enabled_if (= %{os_type} "Win32"))) |
| 173 |
(rule |
| 174 |
(action (copy sendrecv_win32.c sendrecv.c)) |
| 175 |
(enabled_if (= %{os_type} "Win32"))) |
| 176 |
(rule |
| 177 |
(action (copy shutdown_win32.c shutdown.c)) |
| 178 |
(enabled_if (= %{os_type} "Win32"))) |
| 179 |
(rule (action (copy sleep_win32.c sleep.c)) (enabled_if (= %{os_type} "Win32"))) |
| 180 |
(rule |
| 181 |
(action (copy socket_win32.c socket.c)) |
| 182 |
(enabled_if (= %{os_type} "Win32"))) |
| 183 |
(rule |
| 184 |
(action (copy socketpair_win32.c socketpair.c)) |
| 185 |
(enabled_if (= %{os_type} "Win32"))) |
| 186 |
(rule |
| 187 |
(action (copy sockopt_win32.c sockopt.c)) |
| 188 |
(enabled_if (= %{os_type} "Win32"))) |
| 189 |
(rule (action (copy stat_win32.c stat.c)) (enabled_if (= %{os_type} "Win32"))) |
| 190 |
(rule |
| 191 |
(action (copy symlink_win32.c symlink.c)) |
| 192 |
(enabled_if (= %{os_type} "Win32"))) |
| 193 |
(rule (action (copy times_win32.c times.c)) (enabled_if (= %{os_type} "Win32"))) |
| 194 |
(rule |
| 195 |
(action (copy truncate_win32.c truncate.c)) |
| 196 |
(enabled_if (= %{os_type} "Win32"))) |
| 197 |
(rule |
| 198 |
(action (copy unixsupport_win32.c unixsupport.c)) |
| 199 |
(enabled_if (= %{os_type} "Win32"))) |
| 200 |
(rule |
| 201 |
(action (copy utimes_win32.c utimes.c)) |
| 202 |
(enabled_if (= %{os_type} "Win32"))) |
| 203 |
(rule (action (copy write_win32.c write.c)) (enabled_if (= %{os_type} "Win32"))) |