Skip to content

Commit

Permalink
sb-bsd-sockets: Do not build local sockets on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
scymtym committed Nov 8, 2017
1 parent 7ec5f9c commit 6eb5fcb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion contrib/sb-bsd-sockets/defpackage.lisp
Expand Up @@ -6,7 +6,7 @@

(defpackage "SB-BSD-SOCKETS"
(:export #:socket
#:local-socket #:local-abstract-socket
#-win32 #:local-socket #-win32 #:local-abstract-socket
#:inet-socket #:inet6-socket
#:make-inet-socket ; deprecated

Expand Down
6 changes: 6 additions & 0 deletions contrib/sb-bsd-sockets/local.lisp
@@ -1,5 +1,8 @@
(in-package :sb-bsd-sockets)


;;;; Local domain sockets

(defclass local-socket (socket)
((family :initform sockint::af-local))
(:documentation
Expand Down Expand Up @@ -33,6 +36,9 @@ also known as unix-domain sockets."))
(let ((name (sockint::sockaddr-un-path sockaddr)))
(unless (zerop (length name)) name)))


;;;; Local domain sockets in the abstract namespace

(defclass local-abstract-socket (local-socket) ()
(:documentation
"Class representing local domain (AF_LOCAL) sockets with addresses
Expand Down
3 changes: 2 additions & 1 deletion contrib/sb-bsd-sockets/sb-bsd-sockets.asd
Expand Up @@ -28,7 +28,8 @@
(:file "inet4" :depends-on ("protocol" "sockets"))
(:file "inet6" :depends-on ("protocol" "sockets")
:if-feature (:not :win32))
(:file "local" :depends-on ("protocol" "sockets"))
(:file "local" :depends-on ("protocol" "sockets")
:if-feature (:not :win32))

(:file "name-service" :depends-on ("protocol" "sockets"))
(:file "misc" :depends-on ("sockets"))
Expand Down
7 changes: 0 additions & 7 deletions contrib/sb-bsd-sockets/win32-sockets.lisp
Expand Up @@ -68,16 +68,9 @@
(push 'call-wsa-startup sb-ext:*init-hooks*)

;; not implemented on win32
(defconstant af-local 0)
(defconstant msg-dontwait 0)
(defconstant msg-trunc 0)
(defconstant msg-eor 0)
(defconstant msg-nosignal 0)
(defconstant msg-waitall 0)
(defconstant msg-eor 0)
(defconstant size-of-sockaddr-un 0)
(defun (setf sockaddr-un-family) (addr family) ())
(defun (setf sockaddr-un-path) (addr family) ())
(defun sockaddr-un-path (addr) ())
(defun free-sockaddr-un (addr) ())
(defun allocate-sockaddr-un () ())

0 comments on commit 6eb5fcb

Please sign in to comment.