cosmopolitan/test
Gautham e99a4dcc8c
Add protoent and netent (#209)
The implementations of the getproto* functions follow from the getserv*
functions: same static name allocation, same type of internal function
that opens a file to search, aliases are not written to the struct, same
type of error handling/returns.

This changes also fixes a getaddrinfo AI_PASSIVE memory error. When
getaddrinfo is passed name = NULL and AI_PASSIVE in hints->ai_flags, it was
setting the s_addr value to INADDR_ANY but *not* returning the addrinfo
pointer via *res = ai. This caused a free(NULL) memory error when the caller
tried to free res, because the caller expects res to be a valid pointer to a
struct addrinfo.

Our non-standard API parseport() has been updated to use strtoimax.
strtoimax has an extra parameter endptr to store where the parsing was
terminated. endptr is used in parseport to check if the provided string
was valid.
2021-07-10 12:36:35 -07:00
..
dsp Add SSL to redbean 2021-06-24 13:20:50 -07:00
libc Add protoent and netent (#209) 2021-07-10 12:36:35 -07:00
net Make improvements to redbean 2021-07-08 15:56:23 -07:00
tool Make chacha20 go faster 2021-07-05 14:03:50 -07:00
test.mk Support malloc() on bare metal 2021-02-24 00:53:24 -08:00