hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 39d7c53bf72a3dc7c249b433637cc80ee3ac7654
parent bf5d4596abea7fefd630b56a28c168ed2c2fe185
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sun, 20 Mar 2022 00:27:19 -0400

rt: style

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mrt/+freebsd/types.ha | 4++--
Mrt/+linux/socket.ha | 102++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mrt/+linux/types.ha | 2--
3 files changed, 53 insertions(+), 55 deletions(-)

diff --git a/rt/+freebsd/types.ha b/rt/+freebsd/types.ha @@ -320,7 +320,7 @@ export def SIGINT: int = 2; export def SIGQUIT: int = 3; export def SIGILL: int = 4; export def SIGTRAP: int = 5; -export def SIGABRT: int = 6; +export def SIGABRT: int = 6; export def SIGFPE: int = 8; export def SIGKILL: int = 9; export def SIGBUS: int = 10; @@ -332,7 +332,7 @@ export def SIGTERM: int = 15; export def SIGSTOP: int = 17; export def SIGTSTP: int = 18; export def SIGCONT: int = 19; -export def SIGCHLD: int = 20; +export def SIGCHLD: int = 20; export def SIGTTIN: int = 21; export def SIGTTOU: int = 22; export def SIGIO: int = 23; diff --git a/rt/+linux/socket.ha b/rt/+linux/socket.ha @@ -78,52 +78,52 @@ export type cmsg = struct { // domain for socket(2) export def AF_UNSPEC: u16 = 0; -export def AF_UNIX: u16 = 1; // Unix domain sockets -export def AF_LOCAL: u16 = 1; // POSIX name for AF_UNIX -export def AF_INET: u16 = 2; // Internet IP Protocol -export def AF_AX25: u16 = 3; // Amateur Radio AX.25 -export def AF_IPX: u16 = 4; // Novell IPX +export def AF_UNIX: u16 = 1; // Unix domain sockets +export def AF_LOCAL: u16 = 1; // POSIX name for AF_UNIX +export def AF_INET: u16 = 2; // Internet IP Protocol +export def AF_AX25: u16 = 3; // Amateur Radio AX.25 +export def AF_IPX: u16 = 4; // Novell IPX export def AF_APPLETALK: u16 = 5; // AppleTalk DDP -export def AF_NETROM: u16 = 6; // Amateur Radio NET/ROM -export def AF_BRIDGE: u16 = 7; // Multiprotocol bridge -export def AF_ATMPVC: u16 = 8; // ATM PVCs -export def AF_X25: u16 = 9; // Reserved for X.25 project -export def AF_INET6: u16 = 10; // IP version 6 -export def AF_ROSE: u16 = 11; // Amateur Radio X.25 PLP -export def AF_DECnet: u16 = 12; // Reserved for DECnet project +export def AF_NETROM: u16 = 6; // Amateur Radio NET/ROM +export def AF_BRIDGE: u16 = 7; // Multiprotocol bridge +export def AF_ATMPVC: u16 = 8; // ATM PVCs +export def AF_X25: u16 = 9; // Reserved for X.25 project +export def AF_INET6: u16 = 10; // IP version 6 +export def AF_ROSE: u16 = 11; // Amateur Radio X.25 PLP +export def AF_DECnet: u16 = 12; // Reserved for DECnet project export def AF_NETBEUI: u16 = 13; // Reserved for 802.2LLC project export def AF_SECURITY: u16 = 14; // Security callback pseudo AF -export def AF_KEY: u16 = 15; // PF_KEY key management API +export def AF_KEY: u16 = 15; // PF_KEY key management API export def AF_NETLINK: u16 = 16; -export def AF_ROUTE: u16 = AF_NETLINK; // Alias to emulate 4.4BSD -export def AF_PACKET: u16 = 17; // Packet family -export def AF_ASH: u16 = 18; // Ash -export def AF_ECONET: u16 = 19; // Acorn Econet -export def AF_ATMSVC: u16 = 20; // ATM SVCs -export def AF_RDS: u16 = 21; // RDS sockets -export def AF_SNA: u16 = 22; // Linux SNA Project (nutters!) -export def AF_IRDA: u16 = 23; // IRDA sockets -export def AF_PPPOX: u16 = 24; // PPPoX sockets +export def AF_ROUTE: u16 = AF_NETLINK; // Alias to emulate 4.4BSD +export def AF_PACKET: u16 = 17; // Packet family +export def AF_ASH: u16 = 18; // Ash +export def AF_ECONET: u16 = 19; // Acorn Econet +export def AF_ATMSVC: u16 = 20; // ATM SVCs +export def AF_RDS: u16 = 21; // RDS sockets +export def AF_SNA: u16 = 22; // Linux SNA Project (nutters!) +export def AF_IRDA: u16 = 23; // IRDA sockets +export def AF_PPPOX: u16 = 24; // PPPoX sockets export def AF_WANPIPE: u16 = 25; // Wanpipe API Sockets -export def AF_LLC: u16 = 26; // Linux LLC -export def AF_IB: u16 = 27; // Native InfiniBand address -export def AF_MPLS: u16 = 28; // MPLS -export def AF_CAN: u16 = 29; // Controller Area Network -export def AF_TIPC: u16 = 30; // TIPC sockets +export def AF_LLC: u16 = 26; // Linux LLC +export def AF_IB: u16 = 27; // Native InfiniBand address +export def AF_MPLS: u16 = 28; // MPLS +export def AF_CAN: u16 = 29; // Controller Area Network +export def AF_TIPC: u16 = 30; // TIPC sockets export def AF_BLUETOOTH: u16 = 31; // Bluetooth sockets -export def AF_IUCV: u16 = 32; // IUCV sockets -export def AF_RXRPC: u16 = 33; // RxRPC sockets -export def AF_ISDN: u16 = 34; // mISDN sockets -export def AF_PHONET: u16 = 35; // Phonet sockets +export def AF_IUCV: u16 = 32; // IUCV sockets +export def AF_RXRPC: u16 = 33; // RxRPC sockets +export def AF_ISDN: u16 = 34; // mISDN sockets +export def AF_PHONET: u16 = 35; // Phonet sockets export def AF_IEEE802154: u16 = 36; // IEEE802154 sockets -export def AF_CAIF: u16 = 37; // CAIF sockets -export def AF_ALG: u16 = 38; // Algorithm sockets -export def AF_NFC: u16 = 39; // NFC sockets -export def AF_VSOCK: u16 = 40; // vSockets -export def AF_KCM: u16 = 41; // Kernel Connection Multiplexor +export def AF_CAIF: u16 = 37; // CAIF sockets +export def AF_ALG: u16 = 38; // Algorithm sockets +export def AF_NFC: u16 = 39; // NFC sockets +export def AF_VSOCK: u16 = 40; // vSockets +export def AF_KCM: u16 = 41; // Kernel Connection Multiplexor export def AF_QIPCRTR: u16 = 42; // Qualcomm IPC Router -export def AF_SMC: u16 = 43; // smc sockets -export def AF_XDP: u16 = 44; // XDP sockets +export def AF_SMC: u16 = 43; // smc sockets +export def AF_XDP: u16 = 44; // XDP sockets // type for socket(2) export def SOCK_STREAM: int = 1; @@ -169,30 +169,30 @@ export def IPPROTO_MPTCP: int = 262; // Multipath TCP connection export def MSG_OOB: int = 1; export def MSG_PEEK: int = 2; export def MSG_DONTROUTE: int = 4; -export def MSG_TRYHARD: int = 4; // Synonym for MSG_DONTROUTE for DECnet +export def MSG_TRYHARD: int = 4; // Synonym for MSG_DONTROUTE for DECnet export def MSG_CTRUNC: int = 8; -export def MSG_PROBE: int = 0x10; // Do not send. Only probe path f.e. for MTU +export def MSG_PROBE: int = 0x10; // Do not send. Only probe path f.e. for MTU export def MSG_TRUNC: int = 0x20; -export def MSG_DONTWAIT: int = 0x40; // Nonblocking io -export def MSG_EOR: int = 0x80; // End of record -export def MSG_WAITALL: int = 0x100; // Wait for a full request +export def MSG_DONTWAIT: int = 0x40; // Nonblocking io +export def MSG_EOR: int = 0x80; // End of record +export def MSG_WAITALL: int = 0x100; // Wait for a full request export def MSG_FIN: int = 0x200; export def MSG_SYN: int = 0x400; -export def MSG_CONFIRM: int = 0x800; // Confirm path validity +export def MSG_CONFIRM: int = 0x800; // Confirm path validity export def MSG_RST: int = 0x1000; -export def MSG_ERRQUEUE: int = 0x2000; // Fetch message from error queue -export def MSG_NOSIGNAL: int = 0x4000; // Do not generate SIGPIPE -export def MSG_MORE: int = 0x8000; // Sender will send more -export def MSG_WAITFORONE: int = 0x10000; // recvmmsg(): block until 1+ packets avail +export def MSG_ERRQUEUE: int = 0x2000; // Fetch message from error queue +export def MSG_NOSIGNAL: int = 0x4000; // Do not generate SIGPIPE +export def MSG_MORE: int = 0x8000; // Sender will send more +export def MSG_WAITFORONE: int = 0x10000; // recvmmsg(): block until 1+ packets avail export def MSG_SENDPAGE_NOPOLICY: int = 0x10000; // sendpage() internal : do no apply policy export def MSG_SENDPAGE_NOTLAST: int = 0x20000; // sendpage() internal : not the last page export def MSG_BATCH: int = 0x40000; // sendmmsg(): more messages coming export def MSG_EOF: int = MSG_FIN; export def MSG_NO_SHARED_FRAGS: int = 0x80000; // sendpage() internal : page frags are not shared export def MSG_SENDPAGE_DECRYPTED: int = 0x100000; // sendpage() internal : page may carry * plain text and require encryption -export def MSG_ZEROCOPY: int = 0x4000000; // Use user data in kernel path -export def MSG_FASTOPEN: int = 0x20000000; // Send data in TCP SYN -export def MSG_CMSG_CLOEXEC: int = 0x40000000; // Set close_on_exec for file descriptor received through SCM_RIGHTS +export def MSG_ZEROCOPY: int = 0x4000000; // Use user data in kernel path +export def MSG_FASTOPEN: int = 0x20000000; // Send data in TCP SYN +export def MSG_CMSG_CLOEXEC: int = 0x40000000; // Set close_on_exec for file descriptor received through SCM_RIGHTS // setsockopt levels export def SOL_SOCKET: int = 1; diff --git a/rt/+linux/types.ha b/rt/+linux/types.ha @@ -457,7 +457,6 @@ export type siginfo = union { si_addr: *void, union { - // used when si_code=BUS_MCEERR_AR or // used when si_code=BUS_MCEERR_AO si_addr_lsb: i16, @@ -487,7 +486,6 @@ export type siginfo = union { si_syscall: int, si_arch: uint, }, - }, }, _si_pad: [SI_MAX_SIZE - 3 * size(int)]u8,