authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-23 20:54:09-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-05-23 20:54:09-04:00
log882921b5dd5d6527198f67f9514bca6d5c24798b
tree9f0c293e3cc57e3fbfa2d53fda3933b8e4bf1b29
parent63aa9ffedc6ebfa4b461c6e72f57cb52cd0d6a30
parentf83fd47b144fbf62ee52aea67707054549826486
signature Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #5415 from jethron/freebsd-bits

Freebsd bits

1 files changed, 75 insertions(+), 67 deletions(-)

lib/std/os/bits/freebsd.zig+75-67
...@@ -251,7 +251,6 @@ pub const MAP_NOSYNC = 0x0800;...@@ -251,7 +251,6 @@ pub const MAP_NOSYNC = 0x0800;
251pub const MAP_ANON = 0x1000;251pub const MAP_ANON = 0x1000;
252pub const MAP_ANONYMOUS = MAP_ANON;252pub const MAP_ANONYMOUS = MAP_ANON;
253pub const MAP_FILE = 0;253pub const MAP_FILE = 0;
254pub const MAP_NORESERVE = 0;
255254
256pub const MAP_GUARD = 0x00002000;255pub const MAP_GUARD = 0x00002000;
257pub const MAP_EXCL = 0x00004000;256pub const MAP_EXCL = 0x00004000;
...@@ -337,7 +336,7 @@ pub const O_NONBLOCK = 0x0004;...@@ -337,7 +336,7 @@ pub const O_NONBLOCK = 0x0004;
337pub const O_DSYNC = 0o10000;336pub const O_DSYNC = 0o10000;
338pub const O_SYNC = 0x0080;337pub const O_SYNC = 0x0080;
339pub const O_RSYNC = 0o4010000;338pub const O_RSYNC = 0o4010000;
340pub const O_DIRECTORY = 0o200000;339pub const O_DIRECTORY = 0x20000;
341pub const O_NOFOLLOW = 0x0100;340pub const O_NOFOLLOW = 0x0100;
342pub const O_CLOEXEC = 0x00100000;341pub const O_CLOEXEC = 0x00100000;
343342
...@@ -354,14 +353,12 @@ pub const F_SETFD = 2;...@@ -354,14 +353,12 @@ pub const F_SETFD = 2;
354pub const F_GETFL = 3;353pub const F_GETFL = 3;
355pub const F_SETFL = 4;354pub const F_SETFL = 4;
356355
357pub const F_SETOWN = 8;356pub const F_GETOWN = 5;
358pub const F_GETOWN = 9;357pub const F_SETOWN = 6;
359pub const F_SETSIG = 10;
360pub const F_GETSIG = 11;
361358
362pub const F_GETLK = 5;359pub const F_GETLK = 11;
363pub const F_SETLK = 6;360pub const F_SETLK = 12;
364pub const F_SETLKW = 7;361pub const F_SETLKW = 13;
365362
366pub const F_RDLCK = 1;363pub const F_RDLCK = 1;
367pub const F_WRLCK = 3;364pub const F_WRLCK = 3;
...@@ -396,6 +393,47 @@ pub const SOCK_SEQPACKET = 5;...@@ -396,6 +393,47 @@ pub const SOCK_SEQPACKET = 5;
396pub const SOCK_CLOEXEC = 0x10000000;393pub const SOCK_CLOEXEC = 0x10000000;
397pub const SOCK_NONBLOCK = 0x20000000;394pub const SOCK_NONBLOCK = 0x20000000;
398395
396pub const SO_DEBUG = 0x00000001;
397pub const SO_ACCEPTCONN = 0x00000002;
398pub const SO_REUSEADDR = 0x00000004;
399pub const SO_KEEPALIVE = 0x00000008;
400pub const SO_DONTROUTE = 0x00000010;
401pub const SO_BROADCAST = 0x00000020;
402pub const SO_USELOOPBACK = 0x00000040;
403pub const SO_LINGER = 0x00000080;
404pub const SO_OOBINLINE = 0x00000100;
405pub const SO_REUSEPORT = 0x00000200;
406pub const SO_TIMESTAMP = 0x00000400;
407pub const SO_NOSIGPIPE = 0x00000800;
408pub const SO_ACCEPTFILTER = 0x00001000;
409pub const SO_BINTIME = 0x00002000;
410pub const SO_NO_OFFLOAD = 0x00004000;
411pub const SO_NO_DDP = 0x00008000;
412pub const SO_REUSEPORT_LB = 0x00010000;
413
414pub const SO_SNDBUF = 0x1001;
415pub const SO_RCVBUF = 0x1002;
416pub const SO_SNDLOWAT = 0x1003;
417pub const SO_RCVLOWAT = 0x1004;
418pub const SO_SNDTIMEO = 0x1005;
419pub const SO_RCVTIMEO = 0x1006;
420pub const SO_ERROR = 0x1007;
421pub const SO_TYPE = 0x1008;
422pub const SO_LABEL = 0x1009;
423pub const SO_PEERLABEL = 0x1010;
424pub const SO_LISTENQLIMIT = 0x1011;
425pub const SO_LISTENQLEN = 0x1012;
426pub const SO_LISTENINCQLEN = 0x1013;
427pub const SO_SETFIB = 0x1014;
428pub const SO_USER_COOKIE = 0x1015;
429pub const SO_PROTOCOL = 0x1016;
430pub const SO_PROTOTYPE = SO_PROTOCOL;
431pub const SO_TS_CLOCK = 0x1017;
432pub const SO_MAX_PACING_RATE = 0x1018;
433pub const SO_DOMAIN = 0x1019;
434
435pub const SOL_SOCKET = 0xffff;
436
399pub const PF_UNSPEC = AF_UNSPEC;437pub const PF_UNSPEC = AF_UNSPEC;
400pub const PF_LOCAL = AF_LOCAL;438pub const PF_LOCAL = AF_LOCAL;
401pub const PF_UNIX = PF_LOCAL;439pub const PF_UNIX = PF_LOCAL;
...@@ -433,7 +471,7 @@ pub const PF_SLOW = AF_SLOW;...@@ -433,7 +471,7 @@ pub const PF_SLOW = AF_SLOW;
433pub const PF_SCLUSTER = AF_SCLUSTER;471pub const PF_SCLUSTER = AF_SCLUSTER;
434pub const PF_ARP = AF_ARP;472pub const PF_ARP = AF_ARP;
435pub const PF_BLUETOOTH = AF_BLUETOOTH;473pub const PF_BLUETOOTH = AF_BLUETOOTH;
436pub const PF_IEEE80211 = AF_IEE80211;474pub const PF_IEEE80211 = AF_IEEE80211;
437pub const PF_INET_SDP = AF_INET_SDP;475pub const PF_INET_SDP = AF_INET_SDP;
438pub const PF_INET6_SDP = AF_INET6_SDP;476pub const PF_INET6_SDP = AF_INET6_SDP;
439pub const PF_MAX = AF_MAX;477pub const PF_MAX = AF_MAX;
...@@ -480,8 +518,8 @@ pub const AF_SCLUSTER = 34;...@@ -480,8 +518,8 @@ pub const AF_SCLUSTER = 34;
480pub const AF_ARP = 35;518pub const AF_ARP = 35;
481pub const AF_BLUETOOTH = 36;519pub const AF_BLUETOOTH = 36;
482pub const AF_IEEE80211 = 37;520pub const AF_IEEE80211 = 37;
483pub const AF_INET_SDP = 38;521pub const AF_INET_SDP = 40;
484pub const AF_INET6_SDP = 39;522pub const AF_INET6_SDP = 42;
485pub const AF_MAX = 42;523pub const AF_MAX = 42;
486524
487pub const DT_UNKNOWN = 0;525pub const DT_UNKNOWN = 0;
...@@ -641,61 +679,31 @@ pub const NOTE_NSECONDS = 0x00000008;...@@ -641,61 +679,31 @@ pub const NOTE_NSECONDS = 0x00000008;
641/// timeout is absolute679/// timeout is absolute
642pub const NOTE_ABSTIME = 0x00000010;680pub const NOTE_ABSTIME = 0x00000010;
643681
644pub const TCGETS = 0x5401;682pub const TIOCEXCL = 0x2000740d;
645pub const TCSETS = 0x5402;683pub const TIOCNXCL = 0x2000740e;
646pub const TCSETSW = 0x5403;684pub const TIOCSCTTY = 0x20007461;
647pub const TCSETSF = 0x5404;685pub const TIOCGPGRP = 0x40047477;
648pub const TCGETA = 0x5405;686pub const TIOCSPGRP = 0x80047476;
649pub const TCSETA = 0x5406;687pub const TIOCOUTQ = 0x40047473;
650pub const TCSETAW = 0x5407;688pub const TIOCSTI = 0x80017472;
651pub const TCSETAF = 0x5408;689pub const TIOCGWINSZ = 0x40087468;
652pub const TCSBRK = 0x5409;690pub const TIOCSWINSZ = 0x80087467;
653pub const TCXONC = 0x540A;691pub const TIOCMGET = 0x4004746a;
654pub const TCFLSH = 0x540B;692pub const TIOCMBIS = 0x8004746c;
655pub const TIOCEXCL = 0x540C;693pub const TIOCMBIC = 0x8004746b;
656pub const TIOCNXCL = 0x540D;694pub const TIOCMSET = 0x8004746d;
657pub const TIOCSCTTY = 0x540E;695pub const FIONREAD = 0x4004667f;
658pub const TIOCGPGRP = 0x540F;696pub const TIOCCONS = 0x80047462;
659pub const TIOCSPGRP = 0x5410;697pub const TIOCPKT = 0x80047470;
660pub const TIOCOUTQ = 0x5411;698pub const FIONBIO = 0x8004667e;
661pub const TIOCSTI = 0x5412;699pub const TIOCNOTTY = 0x20007471;
662pub const TIOCGWINSZ = 0x5413;700pub const TIOCSETD = 0x8004741b;
663pub const TIOCSWINSZ = 0x5414;701pub const TIOCGETD = 0x4004741a;
664pub const TIOCMGET = 0x5415;702pub const TIOCSBRK = 0x2000747b;
665pub const TIOCMBIS = 0x5416;703pub const TIOCCBRK = 0x2000747a;
666pub const TIOCMBIC = 0x5417;704pub const TIOCGSID = 0x40047463;
667pub const TIOCMSET = 0x5418;705pub const TIOCGPTN = 0x4004740f;
668pub const TIOCGSOFTCAR = 0x5419;706pub const TIOCSIG = 0x2004745f;
669pub const TIOCSSOFTCAR = 0x541A;
670pub const FIONREAD = 0x541B;
671pub const TIOCINQ = FIONREAD;
672pub const TIOCLINUX = 0x541C;
673pub const TIOCCONS = 0x541D;
674pub const TIOCGSERIAL = 0x541E;
675pub const TIOCSSERIAL = 0x541F;
676pub const TIOCPKT = 0x5420;
677pub const FIONBIO = 0x5421;
678pub const TIOCNOTTY = 0x5422;
679pub const TIOCSETD = 0x5423;
680pub const TIOCGETD = 0x5424;
681pub const TCSBRKP = 0x5425;
682pub const TIOCSBRK = 0x5427;
683pub const TIOCCBRK = 0x5428;
684pub const TIOCGSID = 0x5429;
685pub const TIOCGRS485 = 0x542E;
686pub const TIOCSRS485 = 0x542F;
687pub const TIOCGPTN = 0x80045430;
688pub const TIOCSPTLCK = 0x40045431;
689pub const TIOCGDEV = 0x80045432;
690pub const TCGETX = 0x5432;
691pub const TCSETX = 0x5433;
692pub const TCSETXF = 0x5434;
693pub const TCSETXW = 0x5435;
694pub const TIOCSIG = 0x40045436;
695pub const TIOCVHANGUP = 0x5437;
696pub const TIOCGPKT = 0x80045438;
697pub const TIOCGPTLCK = 0x80045439;
698pub const TIOCGEXCL = 0x80045440;
699707
700pub fn WEXITSTATUS(s: u32) u32 {708pub fn WEXITSTATUS(s: u32) u32 {
701 return (s & 0xff00) >> 8;709 return (s & 0xff00) >> 8;