mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Make improvements
- Expand redbean UNIX module - Expand redbean documentation - Ensure Lua copyright is embedded in binary - Increase the PATH_MAX limit especially on NT - Use column major sorting for linenoise completions - Fix some suboptimalities in redbean's new UNIX API - Figured out right flags for Multics newline in raw mode
This commit is contained in:
parent
cf3174dc74
commit
2046c0d2ae
305 changed files with 6602 additions and 4221 deletions
|
@ -1,2 +0,0 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall setregid,0x07f07f07f207f072,globl
|
|
@ -1,2 +0,0 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall setreuid,0x07e07e07e207e071,globl
|
2
libc/sysv/calls/sys_setregid.s
Normal file
2
libc/sysv/calls/sys_setregid.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_setregid,0x07f07f07f207f072,globl,hidden
|
2
libc/sysv/calls/sys_setreuid.s
Normal file
2
libc/sysv/calls/sys_setreuid.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_setreuid,0x07e07e07e207e071,globl,hidden
|
|
@ -685,7 +685,6 @@ syscon so SO_RCVBUF 8 0x1002 0x1002 0x1002 0x1002 0x1002 # bsd co
|
|||
syscon so SO_RCVTIMEO 20 0x1006 0x1006 0x1006 0x100c 0x1006 # recv timeout; takes struct timeval (overrides SA_RESTART restoring EINTR behavior on recv/send/connect/accept/etc.; bsd consensus)
|
||||
syscon so SO_SNDTIMEO 21 0x1005 0x1005 0x1005 0x100b 0x1005 # send timeout; takes struct timeval; bsd consensus
|
||||
syscon so SO_RCVLOWAT 18 0x1004 0x1004 0x1004 0x1004 0x1004 # bsd consensus
|
||||
syscon so SO_EXCLUSIVEADDRUSE 0 0 0 0 0 0xfffffffb # hoo boy
|
||||
syscon so SO_SNDLOWAT 19 0x1003 0x1003 0x1003 0x1003 0x1003 # bsd consensus
|
||||
syscon so SO_TYPE 3 0x1008 0x1008 0x1008 0x1008 0x1008 # bsd consensus
|
||||
syscon so SO_TIMESTAMP 29 0x0400 0x0400 0x0800 0x2000 0
|
||||
|
@ -693,6 +692,7 @@ syscon so SO_SETFIB 0 0 0x1014 0 0 0
|
|||
syscon so SO_DOMAIN 39 0 0x1019 0x1024 0 0
|
||||
syscon so SO_MAX_PACING_RATE 47 0 0x1018 0 0 0
|
||||
syscon so SO_PEERCRED 17 0 0 0x1022 0 0
|
||||
syscon so SO_EXCLUSIVEADDRUSE 0 0 0 0 0 0xfffffffb # hoo boy
|
||||
syscon so LOCAL_PEERCRED 0 1 1 0 0 0
|
||||
syscon so SO_PROTOCOL 38 0 0x1016 0x1025 0 0
|
||||
syscon so SO_ATTACH_BPF 50 0 0 0 0 0
|
||||
|
@ -730,9 +730,10 @@ syscon so SO_TIMESTAMPNS 35 0 0 0 0 0
|
|||
syscon so SO_WIFI_STATUS 41 0 0 0 0 0
|
||||
|
||||
syscon sol SOL_IP 0 0 0 0 0 0 # consensus
|
||||
syscon sol SOL_SOCKET 1 0xffff 0xffff 0xffff 0xffff 0xffff # bsd+nt consensus (todo: what's up with ipproto_icmp overlap)
|
||||
syscon sol SOL_SOCKET 1 0xffff 0xffff 0xffff 0xffff 0xffff # yes it's actually 0xffff; bsd+nt consensus (todo: what's up with ipproto_icmp overlap)
|
||||
syscon sol SOL_TCP 6 6 6 6 6 6 # consensus
|
||||
syscon sol SOL_UDP 17 17 17 17 17 17 # consensus
|
||||
syscon sol SOL_RAW 255 0 0 0 0 0
|
||||
syscon sol SOL_IPV6 41 41 41 41 41 41
|
||||
syscon sol SOL_ICMPV6 58 58 58 58 58 0
|
||||
syscon sol SOL_AAL 265 0 0 0 0 0
|
||||
|
@ -752,7 +753,6 @@ syscon sol SOL_NFC 280 0 0 0 0 0
|
|||
syscon sol SOL_PACKET 263 0 0 0 0 0
|
||||
syscon sol SOL_PNPIPE 275 0 0 0 0 0
|
||||
syscon sol SOL_PPPOL2TP 273 0 0 0 0 0
|
||||
syscon sol SOL_RAW 255 0 0 0 0 0
|
||||
syscon sol SOL_RDS 276 0 0 0 0 0
|
||||
syscon sol SOL_RXRPC 272 0 0 0 0 0
|
||||
syscon sol SOL_TIPC 271 0 0 0 0 0
|
||||
|
@ -808,13 +808,14 @@ syscon tcp TCP_REPAIR_QUEUE 20 0 0 0 0 0 # what is it
|
|||
syscon tcp TCP_THIN_LINEAR_TIMEOUTS 16 0 0 0 0 0 # what is it
|
||||
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon ip IP_TOS 1 3 3 3 3 8 # bsd consensus
|
||||
syscon ip IP_TTL 2 4 4 4 4 7 # bsd consensus
|
||||
syscon ip IP_HDRINCL 3 2 2 2 2 2 # bsd consensus
|
||||
syscon ip IP_DEFAULT_MULTICAST_LOOP 1 1 1 1 1 1 # consensus
|
||||
syscon ip IP_DEFAULT_MULTICAST_TTL 1 1 1 1 1 1 # consensus
|
||||
syscon ip IP_PMTUDISC_DONT 0 0 0 0 0 0 # consensus
|
||||
syscon ip IP_HDRINCL 3 2 2 2 2 2 # bsd consensus
|
||||
syscon ip IP_MAX_MEMBERSHIPS 20 0x0fff 0x0fff 0x0fff 0x0fff 20 # bsd consensus
|
||||
syscon ip IP_OPTIONS 4 1 1 1 1 1 # bsd consensus
|
||||
syscon ip IP_TOS 1 3 3 3 3 8 # bsd consensus
|
||||
syscon ip IP_RECVTTL 12 24 65 31 23 21
|
||||
syscon ip IP_ADD_MEMBERSHIP 35 12 12 12 12 5 # bsd consensus
|
||||
syscon ip IP_DROP_MEMBERSHIP 36 13 13 13 13 6 # bsd consensus
|
||||
|
@ -825,7 +826,6 @@ syscon ip IP_RECVOPTS 6 5 5 5 5 0 # bsd consensus
|
|||
syscon ip IP_RECVRETOPTS 7 6 6 6 6 0 # bsd consensus
|
||||
syscon ip IP_RECVDSTADDR 0 7 7 7 7 0 # bsd consensus
|
||||
syscon ip IP_RETOPTS 7 8 8 8 8 0 # bsd consensus
|
||||
syscon ip IP_TTL 2 4 4 4 4 7 # bsd consensus
|
||||
syscon ip IP_ADD_SOURCE_MEMBERSHIP 39 70 70 0 0 15
|
||||
syscon ip IP_BLOCK_SOURCE 38 72 72 0 0 17
|
||||
syscon ip IP_DROP_SOURCE_MEMBERSHIP 40 71 71 0 0 0x10
|
||||
|
@ -1367,6 +1367,25 @@ syscon termios ENDRUNDISC 0 0 0 0x9 0x9 0 # boop
|
|||
syscon termios TIOCPTMASTER 0 0 0x2000741c 0 0 0 # boop
|
||||
syscon termios NETGRAPHDISC 0 0 0x6 0 0 0 # boop
|
||||
syscon termios H4DISC 0 0 0x7 0 0 0 # boop
|
||||
|
||||
# Teletypewriter Control Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios CS5 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b0000000000000000 0b0000000000000000 0b0000000000000000 # termios.c_cflag; consensus
|
||||
syscon termios CS6 0b0000000000010000 0b000000000100000000 0b000000000100000000 0b0000000100000000 0b0000000100000000 0b0000000000010000 # termios.c_cflag; 6-bit characters
|
||||
syscon termios CS7 0b0000000000100000 0b000000001000000000 0b000000001000000000 0b0000001000000000 0b0000001000000000 0b0000000000100000 # termios.c_cflag; 7-bit characters
|
||||
syscon termios CS8 0b0000000000110000 0b000000001100000000 0b000000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # termios.c_cflag; 8-bit characters
|
||||
syscon termios CSIZE 0b0000000000110000 0b000000001100000000 0b000000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # termios.c_cflag; mask for CS𝑥 flags
|
||||
syscon termios CSTOPB 0b0000000001000000 0b000000010000000000 0b000000010000000000 0b0000010000000000 0b0000010000000000 0b0000000001000000 # termios.c_cflag; bsd consensus
|
||||
syscon termios CREAD 0b0000000010000000 0b000000100000000000 0b000000100000000000 0b0000100000000000 0b0000100000000000 0b0000000010000000 # termios.c_cflag; bsd consensus
|
||||
syscon termios PARENB 0b0000000100000000 0b000001000000000000 0b000001000000000000 0b0001000000000000 0b0001000000000000 0b0000000100000000 # termios.c_cflag
|
||||
syscon termios PARODD 0b0000001000000000 0b000010000000000000 0b000010000000000000 0b0010000000000000 0b0010000000000000 0b0000001000000000 # termios.c_cflag
|
||||
syscon termios HUPCL 0b0000010000000000 0b000100000000000000 0b000100000000000000 0b0100000000000000 0b0100000000000000 0b0000010000000000 # termios.c_cflag; bsd consensus
|
||||
syscon termios CLOCAL 0b0000100000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b0000100000000000 # termios.c_cflag; consensus
|
||||
|
||||
# Teletypewriter Local Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios ISIG 0b0000000000000001 0b0000000010000000 0b0000000010000000 0b0000000010000000 0b0000000010000000 0b0000000000000001 # termios.c_lflag|=ISIG makes Ctrl-C, Ctrl-\, etc. generate signals
|
||||
syscon termios ICANON 0b0000000000000010 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000000000010 # termios.c_lflag&=~ICANON disables 1960's version of gnu readline (see also VMIN)
|
||||
syscon termios XCASE 0b0000000000000100 0 0 16777216 0 0b0000000000000100 # termios.c_lflag
|
||||
|
@ -1383,6 +1402,10 @@ syscon termios FLUSHO 0b0001000000000000 8388608 8388608 8388608 83886
|
|||
syscon termios PENDIN 0b0100000000000000 536870912 536870912 536870912 536870912 0b0100000000000000 # termios.c_lflag
|
||||
syscon termios IEXTEN 0b1000000000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b1000000000000000 # termios.c_lflag&=~IEXTEN disables platform input processing magic
|
||||
syscon termios EXTPROC 65536 0b0000100000000000 0b0000100000000000 0b0000100000000000 0b0000100000000000 65536 # termios.c_lflag
|
||||
|
||||
# Teletypewriter Input Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios IGNBRK 0b0000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 # termios.c_iflag it's complicated, uart only? UNIXCONSENSUS
|
||||
syscon termios BRKINT 0b0000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000010 # termios.c_iflag it's complicated, uart only? UNIXCONSENSUS
|
||||
syscon termios IGNPAR 0b0000000000000100 0b0000000000000100 0b0000000000000100 0b0000000000000100 0b0000000000000100 0b0000000000000100 # termios.c_iflag|=IGNPAR ignores parity and framing errors; see PARMRK UNIXCONSENSUS
|
||||
|
@ -1398,9 +1421,13 @@ syscon termios IXANY 0b0000100000000000 0b0000100000000000 0b000010000000000
|
|||
syscon termios IXOFF 0b0001000000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b0001000000000000 # termios.c_iflag|=IXOFF disables annoying display freeze keys
|
||||
syscon termios IMAXBEL 0b0010000000000000 0b0010000000000000 0b0010000000000000 0b0010000000000000 0b0010000000000000 0b0010000000000000 # termios.c_iflag|=IMAXBEL rings when queue full UNIXCONSENSUS
|
||||
syscon termios IUTF8 0b0100000000000000 0b0100000000000000 0 0 0 0b0100000000000000 # termios.c_iflag|=IUTF8 helps w/ rubout on UTF-8 input
|
||||
|
||||
# Teletypewriter Output Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios OPOST 0b0000000000000001 0b000000000000000001 0b000000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 # termios.c_oflag&=~OPOST disables output processing magic, e.g. MULTICS newlines
|
||||
syscon termios OLCUC 0b0000000000000010 0 0 0b0000000000100000 0 0b0000000000000010 # termios.c_oflag|=OLCUC maps a-z → A-Z output
|
||||
syscon termios ONLCR 0b0000000000000100 0b000000000000000010 0b000000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000100 # termios.c_oflag|=ONLCR claims to map \n → \r\n output
|
||||
syscon termios ONLCR 0b0000000000000100 0b000000000000000010 0b000000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000100 # termios.c_oflag|=ONLCR map \n → \r\n output (MULTICS newline) and requires OPOST
|
||||
syscon termios OCRNL 0b0000000000001000 0b000000000000010000 0b000000000000010000 0b0000000000010000 0b0000000000010000 0b0000000000001000 # termios.c_oflag|=OCRNL maps \r → \n output
|
||||
syscon termios ONOCR 0b0000000000010000 0b000000000000100000 0b000000000000100000 0b0000000001000000 0b0000000001000000 0b0000000000010000 # termios.c_oflag|=ONOCR maps \r → ∅ output iff column 0
|
||||
syscon termios ONLRET 0b0000000000100000 0b000000000001000000 0b000000000001000000 0b0000000010000000 0b0000000010000000 0b0000000000100000 # termios.c_oflag|=ONLRET maps \r → ∅ output
|
||||
|
@ -1431,11 +1458,10 @@ syscon termios VT1 0b0100000000000000 0b010000000000000000 0b0100000000000
|
|||
syscon termios FFDLY 0b1000000000000000 0b000100000000000000 0b000100000000000000 0 0 0b1000000000000000 # termios.c_oflag
|
||||
syscon termios FF0 0b0000000000000000 0b000000000000000000 0b000000000000000000 0 0 0b0000000000000000 # termios.c_oflag
|
||||
syscon termios FF1 0b1000000000000000 0b000100000000000000 0b000100000000000000 0 0 0b1000000000000000 # termios.c_oflag
|
||||
syscon termios CS5 0 0 0 0 0 0 # consensus
|
||||
syscon termios CS6 0b0000000000010000 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000000010000 # termios.c_cflag flag for 6-bit characters
|
||||
syscon termios CS7 0b0000000000100000 0b0000001000000000 0b0000001000000000 0b0000001000000000 0b0000001000000000 0b0000000000100000 # termios.c_cflag flag for 7-bit characters
|
||||
syscon termios CS8 0b0000000000110000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # termios.c_cflag flag for 8-bit characters
|
||||
syscon termios CSIZE 0b0000000000110000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # mask for CS𝑥 flags
|
||||
|
||||
# Teletypewriter Special Control Character Assignments
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios NCCS 20 20 20 20 20 20 # ARRAYLEN(termios.c_cc); we schlep c_line into c_cc on linux
|
||||
syscon termios VINTR 0+1 8 8 8 8 0 # termios.c_cc[VINTR]=𝑥
|
||||
syscon termios VQUIT 1+1 9 9 9 9 1 # termios.c_cc[VQUIT]=𝑥
|
||||
|
@ -1454,15 +1480,13 @@ syscon termios VDISCARD 13+1 15 15 15 15 13 # termios.c_cc[VDISCA
|
|||
syscon termios VWERASE 14+1 4 4 4 4 14 # termios.c_cc[VWERASE]=𝑥
|
||||
syscon termios VLNEXT 15+1 14 14 14 14 15 # termios.c_cc[VLNEXT]=𝑥
|
||||
syscon termios VEOL2 16+1 2 2 2 2 16 # termios.c_cc[VEOL2]=𝑥
|
||||
|
||||
syscon termios TIOCSERGETLSR 0x5459 0 0 0 0 0 #
|
||||
syscon termios TIOCSERGETMULTI 0x545a 0 0 0 0 0 #
|
||||
syscon termios TIOCSERSETMULTI 0x545b 0 0 0 0 0 #
|
||||
syscon termios TIOCSER_TEMT 1 0 0 0 0 0 #
|
||||
syscon termios VERIFY 47 0 0 0 0 0
|
||||
syscon termios PARENB 0x0100 0x1000 0x1000 0x1000 0x1000 0 #
|
||||
syscon termios PARODD 0x0200 0x2000 0x2000 0x2000 0x2000 0 #
|
||||
syscon termios CIBAUD 0x100f0000 0 0 0 0 0
|
||||
syscon termios CLOCAL 0x0800 0x8000 0x8000 0x8000 0x8000 0 #
|
||||
syscon termios CMSPAR 0x40000000 0 0 0 0 0
|
||||
syscon termios BUSY 4 0 0 0 0 0
|
||||
syscon termios CANBSIZ 255 0 0 0 0 0
|
||||
|
@ -1488,9 +1512,6 @@ syscon termios TCOON 1 2 2 2 2 1 # see tcflow; bsd consensus
|
|||
syscon termios TCIOFF 2 3 3 3 3 2 # see tcflow; bsd consensus
|
||||
syscon termios TCION 3 4 4 4 4 3 # see tcflow; bsd consensus
|
||||
|
||||
syscon termios CREAD 0x80 0x0800 0x0800 0x0800 0x0800 0 # bsd consensus
|
||||
syscon termios CSTOPB 0x40 0x0400 0x0400 0x0400 0x0400 0 # bsd consensus
|
||||
syscon termios HUPCL 0x0400 0x4000 0x4000 0x4000 0x4000 0 # bsd consensus
|
||||
syscon termios CSTART 17 17 17 17 17 0 # unix consensus
|
||||
syscon termios CSTOP 19 19 19 19 19 0 # unix consensus
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CLOCAL,0x0800,0x8000,0x8000,0x8000,0x8000,0
|
||||
.syscon termios,CLOCAL,0b0000100000000000,0b1000000000000000,0b1000000000000000,0b1000000000000000,0b1000000000000000,0b0000100000000000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CREAD,0x80,0x0800,0x0800,0x0800,0x0800,0
|
||||
.syscon termios,CREAD,0b0000000010000000,0b000000100000000000,0b000000100000000000,0b0000100000000000,0b0000100000000000,0b0000000010000000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CS5,0,0,0,0,0,0
|
||||
.syscon termios,CS5,0b0000000000000000,0b000000000000000000,0b000000000000000000,0b0000000000000000,0b0000000000000000,0b0000000000000000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CS6,0b0000000000010000,0b0000000100000000,0b0000000100000000,0b0000000100000000,0b0000000100000000,0b0000000000010000
|
||||
.syscon termios,CS6,0b0000000000010000,0b000000000100000000,0b000000000100000000,0b0000000100000000,0b0000000100000000,0b0000000000010000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CS7,0b0000000000100000,0b0000001000000000,0b0000001000000000,0b0000001000000000,0b0000001000000000,0b0000000000100000
|
||||
.syscon termios,CS7,0b0000000000100000,0b000000001000000000,0b000000001000000000,0b0000001000000000,0b0000001000000000,0b0000000000100000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CS8,0b0000000000110000,0b0000001100000000,0b0000001100000000,0b0000001100000000,0b0000001100000000,0b0000000000110000
|
||||
.syscon termios,CS8,0b0000000000110000,0b000000001100000000,0b000000001100000000,0b0000001100000000,0b0000001100000000,0b0000000000110000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CSIZE,0b0000000000110000,0b0000001100000000,0b0000001100000000,0b0000001100000000,0b0000001100000000,0b0000000000110000
|
||||
.syscon termios,CSIZE,0b0000000000110000,0b000000001100000000,0b000000001100000000,0b0000001100000000,0b0000001100000000,0b0000000000110000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,CSTOPB,0x40,0x0400,0x0400,0x0400,0x0400,0
|
||||
.syscon termios,CSTOPB,0b0000000001000000,0b000000010000000000,0b000000010000000000,0b0000010000000000,0b0000010000000000,0b0000000001000000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,HUPCL,0x0400,0x4000,0x4000,0x4000,0x4000,0
|
||||
.syscon termios,HUPCL,0b0000010000000000,0b000100000000000000,0b000100000000000000,0b0100000000000000,0b0100000000000000,0b0000010000000000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,PARENB,0x0100,0x1000,0x1000,0x1000,0x1000,0
|
||||
.syscon termios,PARENB,0b0000000100000000,0b000001000000000000,0b000001000000000000,0b0001000000000000,0b0001000000000000,0b0000000100000000
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon termios,PARODD,0x0200,0x2000,0x2000,0x2000,0x2000,0
|
||||
.syscon termios,PARODD,0b0000001000000000,0b000010000000000000,0b000010000000000000,0b0010000000000000,0b0010000000000000,0b0000001000000000
|
||||
|
|
|
@ -1,69 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SO_H_
|
||||
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SO_H_
|
||||
#include "libc/runtime/symbolic.h"
|
||||
|
||||
#define LOCAL_PEERCRED SYMBOLIC(LOCAL_PEERCRED)
|
||||
#define SO_ACCEPTCONN SYMBOLIC(SO_ACCEPTCONN)
|
||||
#define SO_ATTACH_BPF SYMBOLIC(SO_ATTACH_BPF)
|
||||
#define SO_ATTACH_FILTER SYMBOLIC(SO_ATTACH_FILTER)
|
||||
#define SO_ATTACH_REUSEPORT_CBPF SYMBOLIC(SO_ATTACH_REUSEPORT_CBPF)
|
||||
#define SO_ATTACH_REUSEPORT_EBPF SYMBOLIC(SO_ATTACH_REUSEPORT_EBPF)
|
||||
#define SO_BINDTODEVICE SYMBOLIC(SO_BINDTODEVICE)
|
||||
#define SO_BPF_EXTENSIONS SYMBOLIC(SO_BPF_EXTENSIONS)
|
||||
#define SO_BROADCAST SYMBOLIC(SO_BROADCAST)
|
||||
#define SO_BSDCOMPAT SYMBOLIC(SO_BSDCOMPAT)
|
||||
#define SO_BUSY_POLL SYMBOLIC(SO_BUSY_POLL)
|
||||
#define SO_CNX_ADVICE SYMBOLIC(SO_CNX_ADVICE)
|
||||
#define SO_DEBUG SYMBOLIC(SO_DEBUG)
|
||||
#define SO_DETACH_BPF SYMBOLIC(SO_DETACH_BPF)
|
||||
#define SO_DETACH_FILTER SYMBOLIC(SO_DETACH_FILTER)
|
||||
#define SO_DOMAIN SYMBOLIC(SO_DOMAIN)
|
||||
#define SO_DONTROUTE SYMBOLIC(SO_DONTROUTE)
|
||||
#define SO_ERROR SYMBOLIC(SO_ERROR)
|
||||
#define SO_EXCLUSIVEADDRUSE SYMBOLIC(SO_EXCLUSIVEADDRUSE)
|
||||
#define SO_GET_FILTER SYMBOLIC(SO_GET_FILTER)
|
||||
#define SO_INCOMING_CPU SYMBOLIC(SO_INCOMING_CPU)
|
||||
#define SO_KEEPALIVE SYMBOLIC(SO_KEEPALIVE)
|
||||
#define SO_LINGER SYMBOLIC(SO_LINGER)
|
||||
#define SO_LOCK_FILTER SYMBOLIC(SO_LOCK_FILTER)
|
||||
#define SO_MARK SYMBOLIC(SO_MARK)
|
||||
#define SO_MAX_PACING_RATE SYMBOLIC(SO_MAX_PACING_RATE)
|
||||
#define SO_NOFCS SYMBOLIC(SO_NOFCS)
|
||||
#define SO_NO_CHECK SYMBOLIC(SO_NO_CHECK)
|
||||
#define SO_OOBINLINE SYMBOLIC(SO_OOBINLINE)
|
||||
#define SO_PASSCRED SYMBOLIC(SO_PASSCRED)
|
||||
#define SO_PASSSEC SYMBOLIC(SO_PASSSEC)
|
||||
#define SO_PEEK_OFF SYMBOLIC(SO_PEEK_OFF)
|
||||
#define SO_PEERCRED SYMBOLIC(SO_PEERCRED)
|
||||
#define SO_PEERNAME SYMBOLIC(SO_PEERNAME)
|
||||
#define SO_PEERSEC SYMBOLIC(SO_PEERSEC)
|
||||
#define SO_PRIORITY SYMBOLIC(SO_PRIORITY)
|
||||
#define SO_PROTOCOL SYMBOLIC(SO_PROTOCOL)
|
||||
#define SO_RCVBUF SYMBOLIC(SO_RCVBUF)
|
||||
#define SO_RCVBUFFORCE SYMBOLIC(SO_RCVBUFFORCE)
|
||||
#define SO_RCVLOWAT SYMBOLIC(SO_RCVLOWAT)
|
||||
#define SO_RCVTIMEO SYMBOLIC(SO_RCVTIMEO)
|
||||
#define SO_REUSEADDR SYMBOLIC(SO_REUSEADDR)
|
||||
#define SO_REUSEPORT SYMBOLIC(SO_REUSEPORT)
|
||||
#define SO_RXQ_OVFL SYMBOLIC(SO_RXQ_OVFL)
|
||||
#define SO_SELECT_ERR_QUEUE SYMBOLIC(SO_SELECT_ERR_QUEUE)
|
||||
#define SO_SETFIB SYMBOLIC(SO_SETFIB)
|
||||
#define SO_SNDBUF SYMBOLIC(SO_SNDBUF)
|
||||
#define SO_SNDBUFFORCE SYMBOLIC(SO_SNDBUFFORCE)
|
||||
#define SO_SNDLOWAT SYMBOLIC(SO_SNDLOWAT)
|
||||
#define SO_SNDTIMEO SYMBOLIC(SO_SNDTIMEO)
|
||||
#define SO_TIMESTAMP SYMBOLIC(SO_TIMESTAMP)
|
||||
#define SO_TIMESTAMPING SYMBOLIC(SO_TIMESTAMPING)
|
||||
#define SO_TIMESTAMPNS SYMBOLIC(SO_TIMESTAMPNS)
|
||||
#define SO_TYPE SYMBOLIC(SO_TYPE)
|
||||
#define SO_USELOOPBACK SYMBOLIC(SO_USELOOPBACK)
|
||||
#define SO_WIFI_STATUS SYMBOLIC(SO_WIFI_STATUS)
|
||||
|
||||
#define SO_SECURITY_AUTHENTICATION SYMBOLIC(SO_SECURITY_AUTHENTICATION)
|
||||
#define SO_SECURITY_ENCRYPTION_NETWORK SYMBOLIC(SO_SECURITY_ENCRYPTION_NETWORK)
|
||||
#define SO_SECURITY_ENCRYPTION_TRANSPORT \
|
||||
SYMBOLIC(SO_SECURITY_ENCRYPTION_TRANSPORT)
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -129,4 +66,68 @@ extern const long SO_WIFI_STATUS;
|
|||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
||||
#define SO_DEBUG LITERALLY(1)
|
||||
|
||||
#define LOCAL_PEERCRED SYMBOLIC(LOCAL_PEERCRED)
|
||||
#define SO_ACCEPTCONN SYMBOLIC(SO_ACCEPTCONN)
|
||||
#define SO_ATTACH_BPF SYMBOLIC(SO_ATTACH_BPF)
|
||||
#define SO_ATTACH_FILTER SYMBOLIC(SO_ATTACH_FILTER)
|
||||
#define SO_ATTACH_REUSEPORT_CBPF SYMBOLIC(SO_ATTACH_REUSEPORT_CBPF)
|
||||
#define SO_ATTACH_REUSEPORT_EBPF SYMBOLIC(SO_ATTACH_REUSEPORT_EBPF)
|
||||
#define SO_BINDTODEVICE SYMBOLIC(SO_BINDTODEVICE)
|
||||
#define SO_BPF_EXTENSIONS SYMBOLIC(SO_BPF_EXTENSIONS)
|
||||
#define SO_BROADCAST SYMBOLIC(SO_BROADCAST)
|
||||
#define SO_BSDCOMPAT SYMBOLIC(SO_BSDCOMPAT)
|
||||
#define SO_BUSY_POLL SYMBOLIC(SO_BUSY_POLL)
|
||||
#define SO_CNX_ADVICE SYMBOLIC(SO_CNX_ADVICE)
|
||||
#define SO_DETACH_BPF SYMBOLIC(SO_DETACH_BPF)
|
||||
#define SO_DETACH_FILTER SYMBOLIC(SO_DETACH_FILTER)
|
||||
#define SO_DOMAIN SYMBOLIC(SO_DOMAIN)
|
||||
#define SO_DONTROUTE SYMBOLIC(SO_DONTROUTE)
|
||||
#define SO_ERROR SYMBOLIC(SO_ERROR)
|
||||
#define SO_EXCLUSIVEADDRUSE SYMBOLIC(SO_EXCLUSIVEADDRUSE)
|
||||
#define SO_GET_FILTER SYMBOLIC(SO_GET_FILTER)
|
||||
#define SO_INCOMING_CPU SYMBOLIC(SO_INCOMING_CPU)
|
||||
#define SO_KEEPALIVE SYMBOLIC(SO_KEEPALIVE)
|
||||
#define SO_LINGER SYMBOLIC(SO_LINGER)
|
||||
#define SO_LOCK_FILTER SYMBOLIC(SO_LOCK_FILTER)
|
||||
#define SO_MARK SYMBOLIC(SO_MARK)
|
||||
#define SO_MAX_PACING_RATE SYMBOLIC(SO_MAX_PACING_RATE)
|
||||
#define SO_NOFCS SYMBOLIC(SO_NOFCS)
|
||||
#define SO_NO_CHECK SYMBOLIC(SO_NO_CHECK)
|
||||
#define SO_OOBINLINE SYMBOLIC(SO_OOBINLINE)
|
||||
#define SO_PASSCRED SYMBOLIC(SO_PASSCRED)
|
||||
#define SO_PASSSEC SYMBOLIC(SO_PASSSEC)
|
||||
#define SO_PEEK_OFF SYMBOLIC(SO_PEEK_OFF)
|
||||
#define SO_PEERCRED SYMBOLIC(SO_PEERCRED)
|
||||
#define SO_PEERNAME SYMBOLIC(SO_PEERNAME)
|
||||
#define SO_PEERSEC SYMBOLIC(SO_PEERSEC)
|
||||
#define SO_PRIORITY SYMBOLIC(SO_PRIORITY)
|
||||
#define SO_PROTOCOL SYMBOLIC(SO_PROTOCOL)
|
||||
#define SO_RCVBUF SYMBOLIC(SO_RCVBUF)
|
||||
#define SO_RCVBUFFORCE SYMBOLIC(SO_RCVBUFFORCE)
|
||||
#define SO_RCVLOWAT SYMBOLIC(SO_RCVLOWAT)
|
||||
#define SO_RCVTIMEO SYMBOLIC(SO_RCVTIMEO)
|
||||
#define SO_REUSEADDR SYMBOLIC(SO_REUSEADDR)
|
||||
#define SO_REUSEPORT SYMBOLIC(SO_REUSEPORT)
|
||||
#define SO_RXQ_OVFL SYMBOLIC(SO_RXQ_OVFL)
|
||||
#define SO_SELECT_ERR_QUEUE SYMBOLIC(SO_SELECT_ERR_QUEUE)
|
||||
#define SO_SETFIB SYMBOLIC(SO_SETFIB)
|
||||
#define SO_SNDBUF SYMBOLIC(SO_SNDBUF)
|
||||
#define SO_SNDBUFFORCE SYMBOLIC(SO_SNDBUFFORCE)
|
||||
#define SO_SNDLOWAT SYMBOLIC(SO_SNDLOWAT)
|
||||
#define SO_SNDTIMEO SYMBOLIC(SO_SNDTIMEO)
|
||||
#define SO_TIMESTAMP SYMBOLIC(SO_TIMESTAMP)
|
||||
#define SO_TIMESTAMPING SYMBOLIC(SO_TIMESTAMPING)
|
||||
#define SO_TIMESTAMPNS SYMBOLIC(SO_TIMESTAMPNS)
|
||||
#define SO_TYPE SYMBOLIC(SO_TYPE)
|
||||
#define SO_USELOOPBACK SYMBOLIC(SO_USELOOPBACK)
|
||||
#define SO_WIFI_STATUS SYMBOLIC(SO_WIFI_STATUS)
|
||||
|
||||
#define SO_SECURITY_AUTHENTICATION SYMBOLIC(SO_SECURITY_AUTHENTICATION)
|
||||
#define SO_SECURITY_ENCRYPTION_NETWORK SYMBOLIC(SO_SECURITY_ENCRYPTION_NETWORK)
|
||||
#define SO_SECURITY_ENCRYPTION_TRANSPORT \
|
||||
SYMBOLIC(SO_SECURITY_ENCRYPTION_TRANSPORT)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SO_H_ */
|
||||
|
|
|
@ -1,36 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SOL_H_
|
||||
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SOL_H_
|
||||
#include "libc/runtime/symbolic.h"
|
||||
|
||||
#define SOL_AAL SYMBOLIC(SOL_AAL)
|
||||
#define SOL_ALG SYMBOLIC(SOL_ALG)
|
||||
#define SOL_ATM SYMBOLIC(SOL_ATM)
|
||||
#define SOL_BLUETOOTH SYMBOLIC(SOL_BLUETOOTH)
|
||||
#define SOL_CAIF SYMBOLIC(SOL_CAIF)
|
||||
#define SOL_DCCP SYMBOLIC(SOL_DCCP)
|
||||
#define SOL_DECNET SYMBOLIC(SOL_DECNET)
|
||||
#define SOL_ICMPV6 SYMBOLIC(SOL_ICMPV6)
|
||||
#define SOL_IP SYMBOLIC(SOL_IP)
|
||||
#define SOL_IPV6 SYMBOLIC(SOL_IPV6)
|
||||
#define SOL_IRDA SYMBOLIC(SOL_IRDA)
|
||||
#define SOL_IUCV SYMBOLIC(SOL_IUCV)
|
||||
#define SOL_KCM SYMBOLIC(SOL_KCM)
|
||||
#define SOL_LLC SYMBOLIC(SOL_LLC)
|
||||
#define SOL_NETBEUI SYMBOLIC(SOL_NETBEUI)
|
||||
#define SOL_NETLINK SYMBOLIC(SOL_NETLINK)
|
||||
#define SOL_NFC SYMBOLIC(SOL_NFC)
|
||||
#define SOL_PACKET SYMBOLIC(SOL_PACKET)
|
||||
#define SOL_PNPIPE SYMBOLIC(SOL_PNPIPE)
|
||||
#define SOL_PPPOL2TP SYMBOLIC(SOL_PPPOL2TP)
|
||||
#define SOL_RAW SYMBOLIC(SOL_RAW)
|
||||
#define SOL_RDS SYMBOLIC(SOL_RDS)
|
||||
#define SOL_RXRPC SYMBOLIC(SOL_RXRPC)
|
||||
#define SOL_SOCKET SYMBOLIC(SOL_SOCKET)
|
||||
#define SOL_TCP SYMBOLIC(SOL_TCP)
|
||||
#define SOL_TIPC SYMBOLIC(SOL_TIPC)
|
||||
#define SOL_UDP SYMBOLIC(SOL_UDP)
|
||||
#define SOL_X25 SYMBOLIC(SOL_X25)
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -65,4 +35,35 @@ extern const long SOL_X25;
|
|||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
||||
#define SOL_IP LITERALLY(0)
|
||||
#define SOL_TCP LITERALLY(6)
|
||||
#define SOL_UDP LITERALLY(17)
|
||||
|
||||
#define SOL_AAL SYMBOLIC(SOL_AAL)
|
||||
#define SOL_ALG SYMBOLIC(SOL_ALG)
|
||||
#define SOL_ATM SYMBOLIC(SOL_ATM)
|
||||
#define SOL_BLUETOOTH SYMBOLIC(SOL_BLUETOOTH)
|
||||
#define SOL_CAIF SYMBOLIC(SOL_CAIF)
|
||||
#define SOL_DCCP SYMBOLIC(SOL_DCCP)
|
||||
#define SOL_DECNET SYMBOLIC(SOL_DECNET)
|
||||
#define SOL_ICMPV6 SYMBOLIC(SOL_ICMPV6)
|
||||
#define SOL_IPV6 SYMBOLIC(SOL_IPV6)
|
||||
#define SOL_IRDA SYMBOLIC(SOL_IRDA)
|
||||
#define SOL_IUCV SYMBOLIC(SOL_IUCV)
|
||||
#define SOL_KCM SYMBOLIC(SOL_KCM)
|
||||
#define SOL_LLC SYMBOLIC(SOL_LLC)
|
||||
#define SOL_NETBEUI SYMBOLIC(SOL_NETBEUI)
|
||||
#define SOL_NETLINK SYMBOLIC(SOL_NETLINK)
|
||||
#define SOL_NFC SYMBOLIC(SOL_NFC)
|
||||
#define SOL_PACKET SYMBOLIC(SOL_PACKET)
|
||||
#define SOL_PNPIPE SYMBOLIC(SOL_PNPIPE)
|
||||
#define SOL_PPPOL2TP SYMBOLIC(SOL_PPPOL2TP)
|
||||
#define SOL_RAW SYMBOLIC(SOL_RAW)
|
||||
#define SOL_RDS SYMBOLIC(SOL_RDS)
|
||||
#define SOL_RXRPC SYMBOLIC(SOL_RXRPC)
|
||||
#define SOL_SOCKET SYMBOLIC(SOL_SOCKET)
|
||||
#define SOL_TIPC SYMBOLIC(SOL_TIPC)
|
||||
#define SOL_X25 SYMBOLIC(SOL_X25)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SOL_H_ */
|
||||
|
|
|
@ -154,8 +154,8 @@ scall sys_geteuid 0x019019019201906b globl hidden
|
|||
scall sys_getegid 0x02b02b02b202b06c globl hidden
|
||||
scall getgroups 0x04f04f04f204f073 globl
|
||||
scall setgroups 0x0500500502050074 globl
|
||||
scall setreuid 0x07e07e07e207e071 globl
|
||||
scall setregid 0x07f07f07f207f072 globl
|
||||
scall sys_setreuid 0x07e07e07e207e071 globl hidden
|
||||
scall sys_setregid 0x07f07f07f207f072 globl hidden
|
||||
scall sys_setuid 0x0170170172017069 globl hidden
|
||||
scall sys_setgid 0x0b50b50b520b506a globl hidden
|
||||
scall sys_setresuid 0xfff11a137ffff075 globl hidden # polyfilled for xnu
|
||||
|
|
|
@ -553,7 +553,7 @@ syscon_windows:/*
|
|||
.rodata.str1.1
|
||||
.Llog: .ascii STRACE_PROLOGUE
|
||||
.ascii "bell system five system call support"
|
||||
.asciz " %'u magnums loaded on %s%n"
|
||||
.asciz " %'u magnums loaded on %s\n"
|
||||
.previous
|
||||
#endif /* DEBUGSYS */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue