ffi:c-inline allowed for the xyntax @object (similar to the previous commit),
although only syntax "@(return x) = xxx" is specified in the documentation.
The function SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME did not signal
an error when it was unable to find a protocol. This is fixed now
and an error of type UNKNOWN-PROTOCOL, with an accessor named
UNKNOWN-PROTOCOL-NAME, is being signaled. These two names are also
exported from the package SB-BSD-SOCKETS.
A test case is added.
Several other test cases are fixed with regard to :NO-ERROR clauses
inside HANDLER-CASEs.
On linux, using AI_ADDRCONFIG causes getaddrinfo to return no ip
address for localhost when only the loopback connection is
active. Also, we only get ipv4 addresses anyway due to specifying
ai_family = AF_INET, therefore the AI_ADDRCONFIG flag in not necessary
anyway.
After the recent refactor of GET-HOST-BY-NAME to use getaddrinfo,
these functions had multiple problems that are fixed in this commit:
- in GET-HOST-BY-NAME, freeaddrinfo was called on an unitialized
struct addrinfo if getaddrinfo failed
- error handling in GET-HOST-BY-NAME wasn't working, we were still
trying to use the error handling for gethostbyname
- GET-HOST-BY-ADDRESS still used the deprecated gethostbyaddr function
Remove flag AI_V4MAPPED which takes effect only for AF_INET6
family. Currently we do not work at all with ipv6, hence this flag is
a no-op. Moreover Android has no definition for this flag. See !172.
Fix contributed by Polos Ruetz. Closes!172.
This keyword argument was added in SBCL in 2010 and is used to pass
ABORT to CL:CLOSE.
The absence of this would obviously cause errors when code expects
this to be available. For example, this happens in usocket's
SOCKET-CONNECT and would cause several errors in their test suite
with obscure error messages like
Wrong number of arguments passed to function #<compiled-function 0000000003562e80>.
This is untested on Windows.
NETDB_INTERNAL and NETDB_SUCCESS are not defined by POSIX, so some
libc implementations (such as musl) do not have them. When compiling
sockets contrib, check if these are defined and, if not, define them to
be zero.
The backslash in '\0' got lost on the way to the generated C file
(build/ext/sockets.c). There may be more of these issues elsewhere
in the code base.
This resolves CIDs 66405 and 66413 (Buffer not null terminated).