X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-bsd-sockets%2Fdefpackage.lisp;h=cf321ef67ca6c1151ea0b2252cf16bba69547e11;hb=28346e0e47ab48ff7f8ba3de73840a4992bab28d;hp=d0d23b811d571362b2356ab046a05e1633d438c8;hpb=27763fafd1b170518ac2e85b9344fdddddcfd7c5;p=sbcl.git diff --git a/contrib/sb-bsd-sockets/defpackage.lisp b/contrib/sb-bsd-sockets/defpackage.lisp index d0d23b8..cf321ef 100644 --- a/contrib/sb-bsd-sockets/defpackage.lisp +++ b/contrib/sb-bsd-sockets/defpackage.lisp @@ -1,17 +1,11 @@ -#+(and sbcl win32) -(defpackage "SB-WIN32-SOCKETS-INTERNAL" - (:nicknames "WIN32SOCKINT") - (:shadow close listen) - (:use "COMMON-LISP" "SB-ALIEN" "SB-EXT" "SB-C-CALL")) - (defpackage "SB-BSD-SOCKETS-INTERNAL" (:nicknames "SOCKINT") (:shadow close listen) (:shadowing-import-from "SB-KERNEL" with-array-data) - (:use "COMMON-LISP" "SB-ALIEN" "SB-EXT" "SB-C-CALL")) + (:use "COMMON-LISP" "SB-ALIEN" "SB-EXT")) (defpackage "SB-BSD-SOCKETS" - (:export socket local-socket inet-socket + (:export socket local-socket local-abstract-socket inet-socket make-local-socket make-inet-socket socket-bind socket-accept socket-connect socket-send socket-receive socket-recv @@ -45,21 +39,15 @@ make-inet-address - non-blocking-mode - ) + non-blocking-mode) (:use "COMMON-LISP" "SB-BSD-SOCKETS-INTERNAL") (:import-from "SB-INT" "UNSUPPORTED-OPERATOR" "FEATUREP") (:documentation - " - -A thinly-disguised BSD socket API for SBCL. Ideas stolen from the BSD + "A thinly-disguised BSD socket API for SBCL. Ideas stolen from the BSD socket API for C and Graham Barr's IO::Socket classes for Perl. We represent sockets as CLOS objects, and rename a lot of methods and -arguments to fit Lisp style more closely. - -" - )) +arguments to fit Lisp style more closely.")) ;;; gethostbyname/gethostbyaddr are generally not thread safe. POSIX ;;; 1003.1-2003 defines an alternative API, which is specified in the @@ -68,6 +56,9 @@ arguments to fit Lisp style more closely. ;;; Unfortunately the manual page claims that these functions are not ;;; thread-safe on OS X, but they probably can't be any worse than ;;; gethostbyname and gethostbyaddr. +;;; +;;; CLH: getaddrinfo seems to be broken is broken on x86-64/darwin +#-(and x86-64 darwin) (let ((addr (sb-alien::find-dynamic-foreign-symbol-address "getaddrinfo"))) (when addr (pushnew :sb-bsd-sockets-addrinfo *features*)))