(we are speaking about SBCL).
I found in FreeBSD sys/errno.h
the following declaration:
#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
What error code is used in Haiku in this case? According to existing patch, the value -4025
is used. How can I check it? What is the name of relevant header file?
This is not about what value SBCL wants to use. This is about SBCL uses native OS code and just wants to properly handle specific error codes.
The difference between:
(define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error)
and
(define-socket-condition -4025 socket-type-not-supported-error)
is that the former takes the value from real existing C/C++ header file (in this case it is sys/errno.h
), but the later uses some hard-coded number. And this is the reason SBCL declined the patch for BSD Sockets.
Also on the topic of BSD Sockets: Where the function showdown()
is defined? It is related to ipv4 support. I have 0 knowledge of network programming, but SBCL tries to call this native function in sb-bsd-sockets
contrib module.
EDIT: I see the following declaration in os/supportErrors.h
:
#define ENOTSOCK B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 44)
Does this Haiku error code correspond to FreeBSD error code ESOCKTNOSUPPORT
(code number 44)? No, this is different error, also related to sockets.
EDIT2: it seems the function name in the email to me (explaining why the patch is declined), the function showdown()
was misspelled. It maybe wanted to be int shutdown(int, int)
declared in sys/socket.h
FreeBSD header.
I see similar declaration in Haiku in posix/sys/socket.h
:
int shutdown(int socket, int how);
The reason I suspect misspelling is where it is used in Lisp code:
(macrolet ((define-shutdown-test (name who-shuts-down who-reads element-type direction) ... )))