
Author: ctian Date: Mon Jul 12 05:47:05 2010 New Revision: 541 Log: Condition: ignore-unsupported-warnings Modified: usocket/trunk/condition.lisp Modified: usocket/trunk/condition.lisp ============================================================================== --- usocket/trunk/condition.lisp (original) +++ usocket/trunk/condition.lisp Mon Jul 12 05:47:05 2010 @@ -204,22 +204,17 @@ ((64 112) . host-down-error) ((65 113) . host-unreachable-error))) - (defun map-errno-condition (errno) (cdr (assoc errno +unix-errno-error-map+ :test #'member))) - (defun map-errno-error (errno) (cdr (assoc errno +unix-errno-error-map+ :test #'member))) - (defparameter +unix-ns-error-map+ `((1 . ns-host-not-found-error) (2 . ns-try-again-condition) (3 . ns-no-recovery-error))) - - (defmacro unsupported (feature context &key minimum) `(cerror "Ignore it and continue" 'unsupported :feature ,feature @@ -228,3 +223,11 @@ (defmacro unimplemented (feature context) `(signal 'unimplemented :feature ,feature :context ,context)) + + +;;; People may want to ignore all unsupported warnings, here it is. +(defmacro ignore-unsupported-warnings (&body body) + `(handler-bind ((unsupported + #'(lambda (c) + (declare (ignore c)) (continue)))) + (progn ,@body)))