X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fsb-bsd-sockets%2Fconstants.lisp;h=7badaf78eb331fdfb6a37b78c8ea53d61aa3e7b1;hb=96f9d7f026dbafe7c6a7842acf4b1376149dbf6d;hp=96d11a16156b9f5f8120e331aedd1dc7221269b0;hpb=27763fafd1b170518ac2e85b9344fdddddcfd7c5;p=sbcl.git diff --git a/contrib/sb-bsd-sockets/constants.lisp b/contrib/sb-bsd-sockets/constants.lisp index 96d11a1..7badaf7 100644 --- a/contrib/sb-bsd-sockets/constants.lisp +++ b/contrib/sb-bsd-sockets/constants.lisp @@ -47,6 +47,7 @@ "Send periodic keepalives: if peer does not respond, we get SIGPIPE") (:integer so-oobinline "SO_OOBINLINE" "Put out-of-band data into the normal input queue when received") + #-freebsd (:integer so-no-check "SO_NO_CHECK") #+linux (:integer so-priority "SO_PRIORITY") (:integer so-linger "SO_LINGER" @@ -129,6 +130,7 @@ (:structure in-addr ("struct in_addr" ((array (unsigned 8)) addr "u_int32_t" "s_addr"))) (:structure sockaddr-in ("struct sockaddr_in" + #+darwin ((unsigned 8) len "__uint8_t" "sin_len") (integer family "sa_family_t" "sin_family") ;; These two could be in-port-t and ;; in-addr-t, but then we'd throw away the @@ -139,6 +141,9 @@ (:structure sockaddr-un ("struct sockaddr_un" (integer family "sa_family_t" "sun_family") (c-string path "char" "sun_path"))) + (:structure sockaddr-un-abstract ("struct sockaddr_un" + (integer family "sa_family_t" "sun_family") + ((array (unsigned 8)) path "char" "sun_path"))) (:structure hostent ("struct hostent" (c-string-pointer name "char *" "h_name") ((* c-string) aliases "char **" "h_aliases") @@ -210,6 +215,10 @@ (msg (* msghdr)) (flags int))) (:function gethostbyname ("gethostbyname" (* hostent) (name c-string))) + #+darwin + (:function gethostbyname2 ("gethostbyname2" (* hostent) + (name c-string) + (af int))) (:function gethostbyaddr ("gethostbyaddr" (* hostent) (addr (* t)) (len int) @@ -234,7 +243,14 @@ (integer family "int" "ai_family") (integer socktype "int" "ai_socktype") (integer protocol "int" "ai_protocol") - (integer addrlen "size_t""ai_addrlen") + ;; CLH 20070306 FIXME: ai_addrlen should really + ;; be a socklen_t, but I'm not sure if this the + ;; case on other platforms. I'm setting this to + ;; socklen_t on darwin and hoping that other + ;; platform maintainers will do the right thing + ;; here. + #+darwin (integer addrlen "socklen_t" "ai_addrlen") + #-darwin (integer addrlen "size_t" "ai_addrlen") ((* sockaddr-in) addr "struct sockaddr*" "ai_addr") (c-string canonname "char *" "ai_canonname") ((* t) next "struct addrinfo*" "ai_next"))) @@ -273,8 +289,8 @@ (:integer EAI-BADFLAGS "EAI_BADFLAGS") (:integer EAI-NONAME "EAI_NONAME") (:integer EAI-SERVICE "EAI_SERVICE") + #-freebsd (:integer EAI-ADDRFAMILY "EAI_ADDRFAMILY") - (:integer EAI-NODATA "EAI_NODATA") (:integer EAI-MEMORY "EAI_MEMORY") (:integer EAI-FAIL "EAI_FAIL") (:integer EAI-AGAIN "EAI_AGAIN")