Rewrite Windows connect()

Our old code wasn't working with projects like Qt that call connect() in
O_NONBLOCK mode multiple times. This change overhauls connect() to use a
simpler WSAConnect() API and follows the same pattern as cosmo accept().
This change also reduces the binary footprint of read(), which no longer
needs to depend on our enormous clock_gettime() function.
This commit is contained in:
Justine Tunney 2024-09-12 23:01:20 -07:00
parent 5469202ea8
commit e142124730
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
25 changed files with 556 additions and 277 deletions

View file

@ -19,6 +19,10 @@
dir=libc/sysv/consts
. libc/sysv/gen.sh
# syscon errno EALREADY 114 114 37 37 37 37 37 10037 # connection already in progress; bsd consensus; WSAEALREADY; raised by connect(2), send(2), ip(7)
# syscon errno EINPROGRESS 115 115 36 36 36 36 36 10036 # bsd consensus; WSAEINPROGRESS; raised by connect(2) w/ O_NONBLOCK
# syscon errno EISCONN 106 106 56 56 56 56 56 10056 # socket is connected; bsd consensus; WSAEISCONN; raised by connect(2), send(2), unix(7), ip(7)
# The Fifth Bell System, Community Edition
# » catalogue of carnage
#