X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-bsd-sockets%2Fconstants.lisp;h=cf0be5bf4102b7733c8c030cb2593bbd3a14ced2;hb=236b1001f1d28caca1860b5de2c3095383276c54;hp=5cd6f722271ccb062279a6192e1a838c69d004e0;hpb=b3893d0b3c852b0b535ba6ecd9d66a5f92308c09;p=sbcl.git diff --git a/contrib/sb-bsd-sockets/constants.lisp b/contrib/sb-bsd-sockets/constants.lisp index 5cd6f72..cf0be5b 100644 --- a/contrib/sb-bsd-sockets/constants.lisp +++ b/contrib/sb-bsd-sockets/constants.lisp @@ -130,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 @@ -211,6 +212,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) @@ -235,7 +240,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")))