Fix make-array transforms.
[sbcl.git] / contrib / sb-bsd-sockets / sockopt.lisp
index e689a48..343fd18 100644 (file)
@@ -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)