Merge pull request #5415 from jethron/freebsd-bits

Freebsd bits
This commit is contained in:
Andrew Kelley
2020-05-23 20:54:09 -04:00
committed by GitHub

View File

@@ -251,7 +251,6 @@ pub const MAP_NOSYNC = 0x0800;
pub const MAP_ANON = 0x1000;
pub const MAP_ANONYMOUS = MAP_ANON;
pub const MAP_FILE = 0;
pub const MAP_NORESERVE = 0;
pub const MAP_GUARD = 0x00002000;
pub const MAP_EXCL = 0x00004000;
@@ -337,7 +336,7 @@ pub const O_NONBLOCK = 0x0004;
pub const O_DSYNC = 0o10000;
pub const O_SYNC = 0x0080;
pub const O_RSYNC = 0o4010000;
pub const O_DIRECTORY = 0o200000;
pub const O_DIRECTORY = 0x20000;
pub const O_NOFOLLOW = 0x0100;
pub const O_CLOEXEC = 0x00100000;
@@ -354,14 +353,12 @@ pub const F_SETFD = 2;
pub const F_GETFL = 3;
pub const F_SETFL = 4;
pub const F_SETOWN = 8;
pub const F_GETOWN = 9;
pub const F_SETSIG = 10;
pub const F_GETSIG = 11;
pub const F_GETOWN = 5;
pub const F_SETOWN = 6;
pub const F_GETLK = 5;
pub const F_SETLK = 6;
pub const F_SETLKW = 7;
pub const F_GETLK = 11;
pub const F_SETLK = 12;
pub const F_SETLKW = 13;
pub const F_RDLCK = 1;
pub const F_WRLCK = 3;
@@ -396,6 +393,47 @@ pub const SOCK_SEQPACKET = 5;
pub const SOCK_CLOEXEC = 0x10000000;
pub const SOCK_NONBLOCK = 0x20000000;
pub const SO_DEBUG = 0x00000001;
pub const SO_ACCEPTCONN = 0x00000002;
pub const SO_REUSEADDR = 0x00000004;
pub const SO_KEEPALIVE = 0x00000008;
pub const SO_DONTROUTE = 0x00000010;
pub const SO_BROADCAST = 0x00000020;
pub const SO_USELOOPBACK = 0x00000040;
pub const SO_LINGER = 0x00000080;
pub const SO_OOBINLINE = 0x00000100;
pub const SO_REUSEPORT = 0x00000200;
pub const SO_TIMESTAMP = 0x00000400;
pub const SO_NOSIGPIPE = 0x00000800;
pub const SO_ACCEPTFILTER = 0x00001000;
pub const SO_BINTIME = 0x00002000;
pub const SO_NO_OFFLOAD = 0x00004000;
pub const SO_NO_DDP = 0x00008000;
pub const SO_REUSEPORT_LB = 0x00010000;
pub const SO_SNDBUF = 0x1001;
pub const SO_RCVBUF = 0x1002;
pub const SO_SNDLOWAT = 0x1003;
pub const SO_RCVLOWAT = 0x1004;
pub const SO_SNDTIMEO = 0x1005;
pub const SO_RCVTIMEO = 0x1006;
pub const SO_ERROR = 0x1007;
pub const SO_TYPE = 0x1008;
pub const SO_LABEL = 0x1009;
pub const SO_PEERLABEL = 0x1010;
pub const SO_LISTENQLIMIT = 0x1011;
pub const SO_LISTENQLEN = 0x1012;
pub const SO_LISTENINCQLEN = 0x1013;
pub const SO_SETFIB = 0x1014;
pub const SO_USER_COOKIE = 0x1015;
pub const SO_PROTOCOL = 0x1016;
pub const SO_PROTOTYPE = SO_PROTOCOL;
pub const SO_TS_CLOCK = 0x1017;
pub const SO_MAX_PACING_RATE = 0x1018;
pub const SO_DOMAIN = 0x1019;
pub const SOL_SOCKET = 0xffff;
pub const PF_UNSPEC = AF_UNSPEC;
pub const PF_LOCAL = AF_LOCAL;
pub const PF_UNIX = PF_LOCAL;
@@ -433,7 +471,7 @@ pub const PF_SLOW = AF_SLOW;
pub const PF_SCLUSTER = AF_SCLUSTER;
pub const PF_ARP = AF_ARP;
pub const PF_BLUETOOTH = AF_BLUETOOTH;
pub const PF_IEEE80211 = AF_IEE80211;
pub const PF_IEEE80211 = AF_IEEE80211;
pub const PF_INET_SDP = AF_INET_SDP;
pub const PF_INET6_SDP = AF_INET6_SDP;
pub const PF_MAX = AF_MAX;
@@ -480,8 +518,8 @@ pub const AF_SCLUSTER = 34;
pub const AF_ARP = 35;
pub const AF_BLUETOOTH = 36;
pub const AF_IEEE80211 = 37;
pub const AF_INET_SDP = 38;
pub const AF_INET6_SDP = 39;
pub const AF_INET_SDP = 40;
pub const AF_INET6_SDP = 42;
pub const AF_MAX = 42;
pub const DT_UNKNOWN = 0;
@@ -641,61 +679,31 @@ pub const NOTE_NSECONDS = 0x00000008;
/// timeout is absolute
pub const NOTE_ABSTIME = 0x00000010;
pub const TCGETS = 0x5401;
pub const TCSETS = 0x5402;
pub const TCSETSW = 0x5403;
pub const TCSETSF = 0x5404;
pub const TCGETA = 0x5405;
pub const TCSETA = 0x5406;
pub const TCSETAW = 0x5407;
pub const TCSETAF = 0x5408;
pub const TCSBRK = 0x5409;
pub const TCXONC = 0x540A;
pub const TCFLSH = 0x540B;
pub const TIOCEXCL = 0x540C;
pub const TIOCNXCL = 0x540D;
pub const TIOCSCTTY = 0x540E;
pub const TIOCGPGRP = 0x540F;
pub const TIOCSPGRP = 0x5410;
pub const TIOCOUTQ = 0x5411;
pub const TIOCSTI = 0x5412;
pub const TIOCGWINSZ = 0x5413;
pub const TIOCSWINSZ = 0x5414;
pub const TIOCMGET = 0x5415;
pub const TIOCMBIS = 0x5416;
pub const TIOCMBIC = 0x5417;
pub const TIOCMSET = 0x5418;
pub const TIOCGSOFTCAR = 0x5419;
pub const TIOCSSOFTCAR = 0x541A;
pub const FIONREAD = 0x541B;
pub const TIOCINQ = FIONREAD;
pub const TIOCLINUX = 0x541C;
pub const TIOCCONS = 0x541D;
pub const TIOCGSERIAL = 0x541E;
pub const TIOCSSERIAL = 0x541F;
pub const TIOCPKT = 0x5420;
pub const FIONBIO = 0x5421;
pub const TIOCNOTTY = 0x5422;
pub const TIOCSETD = 0x5423;
pub const TIOCGETD = 0x5424;
pub const TCSBRKP = 0x5425;
pub const TIOCSBRK = 0x5427;
pub const TIOCCBRK = 0x5428;
pub const TIOCGSID = 0x5429;
pub const TIOCGRS485 = 0x542E;
pub const TIOCSRS485 = 0x542F;
pub const TIOCGPTN = 0x80045430;
pub const TIOCSPTLCK = 0x40045431;
pub const TIOCGDEV = 0x80045432;
pub const TCGETX = 0x5432;
pub const TCSETX = 0x5433;
pub const TCSETXF = 0x5434;
pub const TCSETXW = 0x5435;
pub const TIOCSIG = 0x40045436;
pub const TIOCVHANGUP = 0x5437;
pub const TIOCGPKT = 0x80045438;
pub const TIOCGPTLCK = 0x80045439;
pub const TIOCGEXCL = 0x80045440;
pub const TIOCEXCL = 0x2000740d;
pub const TIOCNXCL = 0x2000740e;
pub const TIOCSCTTY = 0x20007461;
pub const TIOCGPGRP = 0x40047477;
pub const TIOCSPGRP = 0x80047476;
pub const TIOCOUTQ = 0x40047473;
pub const TIOCSTI = 0x80017472;
pub const TIOCGWINSZ = 0x40087468;
pub const TIOCSWINSZ = 0x80087467;
pub const TIOCMGET = 0x4004746a;
pub const TIOCMBIS = 0x8004746c;
pub const TIOCMBIC = 0x8004746b;
pub const TIOCMSET = 0x8004746d;
pub const FIONREAD = 0x4004667f;
pub const TIOCCONS = 0x80047462;
pub const TIOCPKT = 0x80047470;
pub const FIONBIO = 0x8004667e;
pub const TIOCNOTTY = 0x20007471;
pub const TIOCSETD = 0x8004741b;
pub const TIOCGETD = 0x4004741a;
pub const TIOCSBRK = 0x2000747b;
pub const TIOCCBRK = 0x2000747a;
pub const TIOCGSID = 0x40047463;
pub const TIOCGPTN = 0x4004740f;
pub const TIOCSIG = 0x2004745f;
pub fn WEXITSTATUS(s: u32) u32 {
return (s & 0xff00) >> 8;