Commit 3688a53f authored by Zach Beane's avatar Zach Beane
Browse files

Adding socket error properties for SBCL.

parent 13cc6ed8
......@@ -103,14 +103,11 @@ longer anonymous, but has a meaningful name name."
(def-fake-slot excl::stream-property-list stream :default-value nil)
(def-fake-slot excl:stream-error-identifier stream :default-value nil)
(def-fake-slot excl:stream-error-code stream :default-value 0)
(defmethod excl:stream-error-identifier (condition)
(socket-error-identifier condition))
#+ccl
(defmethod excl:stream-error-identifier ((condition ccl:socket-error))
(ccl:socket-error-identifier condition))
#+ccl
(defmethod excl:stream-error-code ((condition ccl:socket-error))
(ccl:socket-error-code condition))
(defmethod excl:stream-error-code (condition)
(socket-error-code condition))
;;; Misc
......@@ -296,21 +293,11 @@ values otherwise."
`(call-with-locked-structure ,struct (lambda () ,@body)))
(defmacro excl:incf-atomic (place &optional (delta 1))
#+ccl
;; Doesn't work on structure slots on CCL!
;;`(atomic-incf-decf ,place ,delta)
`(incf ,place ,delta)
;; XXX
#-ccl
;; XXX FIXME
`(incf ,place ,delta))
(defmacro excl:decf-atomic (place &optional (delta 1))
#+ccl
;; Doesn't work on structure slots on CCL!
;;`(atomic-incf-decf ,place (- ,delta))
`(decf ,place (- ,delta))
;; XXX
#-ccl
;; XXX FIXME
`(decf ,place (- ,delta)))
(defstruct (basic-lock (:include excl:synchronizing-structure))
......
......@@ -19,13 +19,10 @@
#:without-interrupts
#:defstaticvar
#:symbol-value-in-process
#:socket-error-identifier
#:socket-error-code
;; XXX private
#:*initial-process*
)
#+ccl
(:import-from #:ccl
;; XXX private
#:atomic-incf-decf)
#:*initial-process*)
#+ccl
(:import-from #:ccl
#:lookup-hostname
......
......@@ -19,3 +19,12 @@
(defun file-kind (pathname)
(sb-impl::native-file-kind pathname))
(defun socket-error-identifier (condition)
(declare (ignore condition))
:unknown)
(defun socket-error-code (condition)
(if (search (princ-to-string condition) "Broken pipe")
32
99))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment