Make more fixes and improvements

- Remove PAGESIZE constant
- Fix realloc() documentation
- Fix ttyname_r() error reporting
- Make forking more reliable on Windows
- Make execvp() a few microseconds faster
- Make system() a few microseconds faster
- Tighten up the socket-related magic numbers
- Loosen restrictions on mmap() offset alignment
- Improve GetProgramExecutableName() with getenv("_")
- Use mkstemp() as basis for mktemp(), tmpfile(), tmpfd()
- Fix flakes in pthread_cancel_test, unix_test, fork_test
- Fix recently introduced futex stack overflow regression
- Let sockets be passed as stdio to subprocesses on Windows
- Improve security of bind() on Windows w/ SO_EXCLUSIVEADDRUSE
This commit is contained in:
Justine Tunney 2023-07-29 18:44:15 -07:00
parent 140a8a52e5
commit 18bb5888e1
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
311 changed files with 1239 additions and 2622 deletions

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon alg,ALG_SET_AEAD_ASSOCLEN,4,4,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon alg,ALG_SET_AEAD_AUTHSIZE,5,5,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon alg,ALG_SET_DRBG_ENTROPY,6,6,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon alg,ALG_SET_IV,2,2,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon alg,ALG_SET_KEY,1,1,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon alg,ALG_SET_OP,3,3,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLERR,8,8,8,8,8,8,8,8

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLET,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLEXCLUSIVE,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLHUP,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLIN,1,1,1,1,1,1,1,1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLMSG,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLONESHOT,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000,0x40000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLOUT,4,4,4,4,4,4,4,4

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLPRI,2,2,2,2,2,2,2,2

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLRDBAND,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLRDHUP,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLRDNORM,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLWAKEUP,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000,0x20000000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLWRBAND,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLLWRNORM,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLL_CLOEXEC,0x080000,0x080000,0x01000000,0x01000000,0x100000,0x010000,0x010000,0x80000

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLL_CTL_ADD,1,1,1,1,1,1,1,1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLL_CTL_DEL,2,2,2,2,2,2,2,2

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon epoll,EPOLL_CTL_MOD,3,3,3,3,3,3,3,3

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_AH,51,51,51,51,51,51,51,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_BEETPH,94,94,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_COMP,108,108,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_DCCP,33,33,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_DSTOPTS,60,60,60,60,60,60,60,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_EGP,8,8,8,8,8,8,8,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_ENCAP,98,98,98,98,98,98,98,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_ESP,50,50,50,50,50,50,50,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_FRAGMENT,44,44,44,44,44,44,44,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_GRE,47,47,47,47,47,47,47,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_HOPOPTS,0,0,0,0,0,0,0,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_ICMP,1,1,1,1,1,1,1,1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_ICMPV6,58,58,58,58,58,58,58,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_IDP,22,22,22,22,22,22,22,22

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_IGMP,2,2,2,2,2,2,2,2

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_IP,0,0,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_IPIP,4,4,4,4,4,4,4,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_IPV6,41,41,41,41,41,41,41,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_MH,135,135,-1,-1,135,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_MPLS,137,137,-1,-1,137,137,137,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_MTP,92,92,92,92,92,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_NONE,59,59,59,59,59,59,59,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_PIM,103,103,103,103,103,103,103,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_PUP,12,12,12,12,12,12,12,12

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_RAW,255,255,255,255,255,255,255,255

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_ROUTING,43,43,43,43,43,43,43,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_RSVP,46,46,46,46,46,46,46,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_SCTP,132,132,132,132,132,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_TCP,6,6,6,6,6,6,6,6

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_TP,29,29,29,29,29,29,29,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_UDP,17,17,17,17,17,17,17,17

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon iproto,IPPROTO_UDPLITE,136,136,-1,-1,136,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,LOCAL_PEERCRED,0,0,1,1,1,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon open,O_RDWR,2,2,2,2,2,2,2,2

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_AAL,265,265,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_ALG,279,279,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_ATM,264,264,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_BLUETOOTH,274,274,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_CAIF,278,278,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_DCCP,269,269,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_DECNET,261,261,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_ICMPV6,58,58,58,58,58,58,58,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_IP,0,0,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_IPV6,41,41,41,41,41,41,41,41

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_IRDA,266,266,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_IUCV,277,277,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_KCM,281,281,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_LLC,268,268,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_NETBEUI,267,267,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_NETLINK,270,270,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_NFC,280,280,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_PACKET,263,263,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_PNPIPE,275,275,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_PPPOL2TP,273,273,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_RAW,255,255,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_RDS,276,276,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_RXRPC,272,272,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_SOCKET,1,1,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff
.syscon so,SOL_SOCKET,1,1,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_TCP,6,6,6,6,6,6,6,6

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_TIPC,271,271,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_UDP,17,17,17,17,17,17,17,17

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon sol,SOL_X25,262,262,-1,-1,-1,-1,-1,-1

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_ATTACH_BPF,50,50,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_ATTACH_FILTER,26,26,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_ATTACH_REUSEPORT_CBPF,51,51,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_ATTACH_REUSEPORT_EBPF,52,52,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_BINDTODEVICE,25,25,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_BPF_EXTENSIONS,48,48,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_BSDCOMPAT,14,14,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_BUSY_POLL,46,46,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_CNX_ADVICE,53,53,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_DETACH_BPF,27,27,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_DETACH_FILTER,27,27,0,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_DOMAIN,39,39,0,0,0x1019,0x1024,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon so,SO_DONTLINGER,0,0,0,0,0,0,0,~0x80

Some files were not shown because too many files have changed in this diff Show more