| ... | @@ -34,6 +34,17 @@ pub const Kevent = extern struct { | ... | @@ -34,6 +34,17 @@ pub const Kevent = extern struct { |
| 34 | udata: usize, | 34 | udata: usize, |
| 35 | }; | 35 | }; |
| 36 | | 36 | |
| | 37 | pub const RTLD_LAZY = 1; |
| | 38 | pub const RTLD_NOW = 2; |
| | 39 | pub const RTLD_GLOBAL = 0x100; |
| | 40 | pub const RTLD_LOCAL = 0x200; |
| | 41 | pub const RTLD_NODELETE = 0x01000; |
| | 42 | pub const RTLD_NOLOAD = 0x02000; |
| | 43 | |
| | 44 | pub const RTLD_NEXT = @intToPtr(*c_void, @bitCast(usize, @as(isize, -1))); |
| | 45 | pub const RTLD_DEFAULT = @intToPtr(*c_void, @bitCast(usize, @as(isize, -2))); |
| | 46 | pub const RTLD_SELF = @intToPtr(*c_void, @bitCast(usize, @as(isize, -3))); |
| | 47 | |
| 37 | pub const dl_phdr_info = extern struct { | 48 | pub const dl_phdr_info = extern struct { |
| 38 | dlpi_addr: usize, | 49 | dlpi_addr: usize, |
| 39 | dlpi_name: ?[*:0]const u8, | 50 | dlpi_name: ?[*:0]const u8, |
| ... | @@ -212,6 +223,121 @@ pub const dirent = extern struct { | ... | @@ -212,6 +223,121 @@ pub const dirent = extern struct { |
| 212 | } | 223 | } |
| 213 | }; | 224 | }; |
| 214 | | 225 | |
| | 226 | pub const SOCK_STREAM = 1; |
| | 227 | pub const SOCK_DGRAM = 2; |
| | 228 | pub const SOCK_RAW = 3; |
| | 229 | pub const SOCK_RDM = 4; |
| | 230 | pub const SOCK_SEQPACKET = 5; |
| | 231 | pub const SOCK_CONN_DGRAM = 6; |
| | 232 | pub const SOCK_DCCP = SOCK_CONN_DGRAM; |
| | 233 | |
| | 234 | pub const SOCK_CLOEXEC = 0x10000000; |
| | 235 | pub const SOCK_NONBLOCK = 0x20000000; |
| | 236 | pub const SOCK_NOSIGPIPE = 0x40000000; |
| | 237 | pub const SOCK_FLAGS_MASK = 0xf0000000; |
| | 238 | |
| | 239 | pub const SO_DEBUG = 0x0001; |
| | 240 | pub const SO_ACCEPTCONN = 0x0002; |
| | 241 | pub const SO_REUSEADDR = 0x0004; |
| | 242 | pub const SO_KEEPALIVE = 0x0008; |
| | 243 | pub const SO_DONTROUTE = 0x0010; |
| | 244 | pub const SO_BROADCAST = 0x0020; |
| | 245 | pub const SO_USELOOPBACK = 0x0040; |
| | 246 | pub const SO_LINGER = 0x0080; |
| | 247 | pub const SO_OOBINLINE = 0x0100; |
| | 248 | pub const SO_REUSEPORT = 0x0200; |
| | 249 | pub const SO_NOSIGPIPE = 0x0800; |
| | 250 | pub const SO_ACCEPTFILTER = 0x1000; |
| | 251 | pub const SO_TIMESTAMP = 0x2000; |
| | 252 | pub const SO_RERROR = 0x4000; |
| | 253 | |
| | 254 | pub const SO_SNDBUF = 0x1001; |
| | 255 | pub const SO_RCVBUF = 0x1002; |
| | 256 | pub const SO_SNDLOWAT = 0x1003; |
| | 257 | pub const SO_RCVLOWAT = 0x1004; |
| | 258 | pub const SO_ERROR = 0x1007; |
| | 259 | pub const SO_TYPE = 0x1008; |
| | 260 | pub const SO_OVERFLOWED = 0x1009; |
| | 261 | |
| | 262 | pub const SO_NOHEADER = 0x100a; |
| | 263 | pub const SO_SNDTIMEO = 0x100b; |
| | 264 | pub const SO_RCVTIMEO = 0x100c; |
| | 265 | |
| | 266 | pub const SOL_SOCKET = 0xffff; |
| | 267 | |
| | 268 | pub const PF_UNSPEC = AF_UNSPEC; |
| | 269 | pub const PF_LOCAL = AF_LOCAL; |
| | 270 | pub const PF_UNIX = PF_LOCAL; |
| | 271 | pub const PF_INET = AF_INET; |
| | 272 | pub const PF_IMPLINK = AF_IMPLINK; |
| | 273 | pub const PF_PUP = AF_PUP; |
| | 274 | pub const PF_CHAOS = AF_CHAOS; |
| | 275 | pub const PF_NS = AF_NS; |
| | 276 | pub const PF_ISO = AF_ISO; |
| | 277 | pub const PF_OSI = AF_ISO; |
| | 278 | pub const PF_ECMA = AF_ECMA; |
| | 279 | pub const PF_DATAKIT = AF_DATAKIT; |
| | 280 | pub const PF_CCITT = AF_CCITT; |
| | 281 | pub const PF_SNA = AF_SNA; |
| | 282 | pub const PF_DECnet = AF_DECnet; |
| | 283 | pub const PF_DLI = AF_DLI; |
| | 284 | pub const PF_LAT = AF_LAT; |
| | 285 | pub const PF_HYLINK = AF_HYLINK; |
| | 286 | pub const PF_APPLETALK = AF_APPLETALK; |
| | 287 | pub const PF_OROUTE = AF_OROUTE; |
| | 288 | pub const PF_LINK = AF_LINK; |
| | 289 | pub const PF_COIP = AF_COIP; |
| | 290 | pub const PF_CNT = AF_CNT; |
| | 291 | pub const PF_INET6 = AF_INET6; |
| | 292 | pub const PF_IPX = AF_IPX; |
| | 293 | pub const PF_ISDN = AF_ISDN; |
| | 294 | pub const PF_E164 = AF_E164; |
| | 295 | pub const PF_NATM = AF_NATM; |
| | 296 | pub const PF_ARP = AF_ARP; |
| | 297 | pub const PF_BLUETOOTH = AF_BLUETOOTH; |
| | 298 | pub const PF_MPLS = AF_MPLS; |
| | 299 | pub const PF_ROUTE = AF_ROUTE; |
| | 300 | pub const PF_CAN = AF_CAN; |
| | 301 | pub const PF_ETHER = AF_ETHER; |
| | 302 | pub const PF_MAX = AF_MAX; |
| | 303 | |
| | 304 | pub const AF_UNSPEC = 0; |
| | 305 | pub const AF_LOCAL = 1; |
| | 306 | pub const AF_UNIX = AF_LOCAL; |
| | 307 | pub const AF_INET = 2; |
| | 308 | pub const AF_IMPLINK = 3; |
| | 309 | pub const AF_PUP = 4; |
| | 310 | pub const AF_CHAOS = 5; |
| | 311 | pub const AF_NS = 6; |
| | 312 | pub const AF_ISO = 7; |
| | 313 | pub const AF_OSI = AF_ISO; |
| | 314 | pub const AF_ECMA = 8; |
| | 315 | pub const AF_DATAKIT = 9; |
| | 316 | pub const AF_CCITT = 10; |
| | 317 | pub const AF_SNA = 11; |
| | 318 | pub const AF_DECnet = 12; |
| | 319 | pub const AF_DLI = 13; |
| | 320 | pub const AF_LAT = 14; |
| | 321 | pub const AF_HYLINK = 15; |
| | 322 | pub const AF_APPLETALK = 16; |
| | 323 | pub const AF_OROUTE = 17; |
| | 324 | pub const AF_LINK = 18; |
| | 325 | pub const AF_COIP = 20; |
| | 326 | pub const AF_CNT = 21; |
| | 327 | pub const AF_IPX = 23; |
| | 328 | pub const AF_INET6 = 24; |
| | 329 | pub const AF_ISDN = 26; |
| | 330 | pub const AF_E164 = AF_ISDN; |
| | 331 | pub const AF_NATM = 27; |
| | 332 | pub const AF_ARP = 28; |
| | 333 | pub const AF_BLUETOOTH = 31; |
| | 334 | pub const AF_IEEE80211 = 32; |
| | 335 | pub const AF_MPLS = 33; |
| | 336 | pub const AF_ROUTE = 34; |
| | 337 | pub const AF_CAN = 35; |
| | 338 | pub const AF_ETHER = 36; |
| | 339 | pub const AF_MAX = 37; |
| | 340 | |
| 215 | pub const in_port_t = u16; | 341 | pub const in_port_t = u16; |
| 216 | pub const sa_family_t = u8; | 342 | pub const sa_family_t = u8; |
| 217 | | 343 | |
| ... | @@ -471,48 +597,6 @@ pub const SIG_BLOCK = 1; | ... | @@ -471,48 +597,6 @@ pub const SIG_BLOCK = 1; |
| 471 | pub const SIG_UNBLOCK = 2; | 597 | pub const SIG_UNBLOCK = 2; |
| 472 | pub const SIG_SETMASK = 3; | 598 | pub const SIG_SETMASK = 3; |
| 473 | | 599 | |
| 474 | pub const SOCK_STREAM = 1; | | |
| 475 | pub const SOCK_DGRAM = 2; | | |
| 476 | pub const SOCK_RAW = 3; | | |
| 477 | pub const SOCK_RDM = 4; | | |
| 478 | pub const SOCK_SEQPACKET = 5; | | |
| 479 | | | |
| 480 | pub const SOCK_CLOEXEC = 0x10000000; | | |
| 481 | pub const SOCK_NONBLOCK = 0x20000000; | | |
| 482 | | | |
| 483 | pub const PF_UNSPEC = 0; | | |
| 484 | pub const PF_LOCAL = 1; | | |
| 485 | pub const PF_UNIX = PF_LOCAL; | | |
| 486 | pub const PF_FILE = PF_LOCAL; | | |
| 487 | pub const PF_INET = 2; | | |
| 488 | pub const PF_APPLETALK = 16; | | |
| 489 | pub const PF_INET6 = 24; | | |
| 490 | pub const PF_DECnet = 12; | | |
| 491 | pub const PF_KEY = 29; | | |
| 492 | pub const PF_ROUTE = 34; | | |
| 493 | pub const PF_SNA = 11; | | |
| 494 | pub const PF_MPLS = 33; | | |
| 495 | pub const PF_CAN = 35; | | |
| 496 | pub const PF_BLUETOOTH = 31; | | |
| 497 | pub const PF_ISDN = 26; | | |
| 498 | pub const PF_MAX = 37; | | |
| 499 | | | |
| 500 | pub const AF_UNSPEC = PF_UNSPEC; | | |
| 501 | pub const AF_LOCAL = PF_LOCAL; | | |
| 502 | pub const AF_UNIX = AF_LOCAL; | | |
| 503 | pub const AF_FILE = AF_LOCAL; | | |
| 504 | pub const AF_INET = PF_INET; | | |
| 505 | pub const AF_APPLETALK = PF_APPLETALK; | | |
| 506 | pub const AF_INET6 = PF_INET6; | | |
| 507 | pub const AF_KEY = PF_KEY; | | |
| 508 | pub const AF_ROUTE = PF_ROUTE; | | |
| 509 | pub const AF_SNA = PF_SNA; | | |
| 510 | pub const AF_MPLS = PF_MPLS; | | |
| 511 | pub const AF_CAN = PF_CAN; | | |
| 512 | pub const AF_BLUETOOTH = PF_BLUETOOTH; | | |
| 513 | pub const AF_ISDN = PF_ISDN; | | |
| 514 | pub const AF_MAX = PF_MAX; | | |
| 515 | | | |
| 516 | pub const DT_UNKNOWN = 0; | 600 | pub const DT_UNKNOWN = 0; |
| 517 | pub const DT_FIFO = 1; | 601 | pub const DT_FIFO = 1; |
| 518 | pub const DT_CHR = 2; | 602 | pub const DT_CHR = 2; |