Make ANSI Common Lisp available on Haiku (again)

This error does not exist in Haiku. So I’m not sure what you mean. Haiku will never use this error because it does not exist. There is no hidden numeric value, it just never can happen by calling any function in Haiku. So there is nothing to handle.

I don’t know where that -4025 comes from, it does not look like something that would come from Haiku, so I guess someone picked a random value that doesn’t mean anything and will never match with any actual error.

No.

ENOTSOCK is a standard error code if you try to do a socket operation on something that is not a socket. For example if you try to do this:

   int fd = open("/tmp/test", O_RDWR);
   send(fd, ...); // send() works only on socket, but the fd is not a socket

It looks like ESOCKTNOSUPPORT on other OS can happen if you try to create a socket with an invalid combination of socket type (SOCK_DGRAM or SOCK_STREAM) and address family (AF_UNIX, AF_INET, …) in a call to socket(). So, that means the address family exists, but is not compatible with the socket type.

I guess on Haiku you may get a less precise error code such as EAFNOSUPPORT or EPROTONOSUPPORT, but these are likely already handled in sbcl, and you can’t distinguish the two cases (an address family that doesn’t exist at all, from one that exists, but is incompatible with the requested socket type).

1 Like