X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-bsd-sockets%2Fsockopt.lisp;h=343fd186c19ddb0333809595d01723448aafbe76;hb=260de2062fca170efdac3e42491d7d866c2d2e56;hp=e689a4807b50a8ade1d11cf2f1616fb1bddda6a7;hpb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;p=sbcl.git diff --git a/contrib/sb-bsd-sockets/sockopt.lisp b/contrib/sb-bsd-sockets/sockopt.lisp index e689a48..343fd18 100644 --- a/contrib/sb-bsd-sockets/sockopt.lisp +++ b/contrib/sb-bsd-sockets/sockopt.lisp @@ -43,7 +43,7 @@ Code for options that not every system has should be conditionalised: (if (numberp (eval level)) level `(get-protocol-by-name ,(string-downcase (symbol-name level))))) - (supportedp (or (null features) (featurep features)))) + (supportedp (or (null features) (sb-int:featurep features)))) `(progn (export ',lisp-name) (defun ,lisp-name (socket) @@ -55,7 +55,8 @@ Code for options that not every system has should be conditionalised: (if (= -1 (sockint::getsockopt (socket-file-descriptor socket) ,find-level ,number (sb-alien:addr buffer) - (sb-alien:addr size))) + #+win32 size + #-win32 (sb-alien:addr size))) (socket-error "getsockopt") (,mangle-return buffer size))) `(error 'unsupported-operator @@ -102,6 +103,13 @@ Code for options that not every system has should be conditionalised: sockopt-priority sockint::sol-socket sockint::so-priority :linux "Available only on Linux.") +(define-socket-option-int + sockopt-tcp-keepcnt :tcp sockint::tcp-keepcnt :linux "Available only on Linux.") +(define-socket-option-int + sockopt-tcp-keepidle :tcp sockint::tcp-keepidle :linux "Available only on Linux.") +(define-socket-option-int + sockopt-tcp-keepintvl :tcp sockint::tcp-keepintvl :linux "Available only on Linux.") + ;;; boolean options are integers really (defun foreign-int-to-bool (x size)