X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fprimordial-extensions.lisp;h=1ed66e784b0f3a8dbf34840f86b01e7e97ede3fb;hb=75b52379bdc2269961af6a1308eca63610f38ac3;hp=7b10afdfd33e75b6240210b46a95c7b4d1a960c7;hpb=e6c468c2b371f7deac2010cf03896a60974ea766;p=sbcl.git diff --git a/src/code/primordial-extensions.lisp b/src/code/primordial-extensions.lisp index 7b10afd..1ed66e7 100644 --- a/src/code/primordial-extensions.lisp +++ b/src/code/primordial-extensions.lisp @@ -333,3 +333,19 @@ 0) (1- max)))) (t nil))) + +;;; Helpers for defining error-signalling NOP's for "not supported +;;; here" operations. +(defmacro define-unsupported-fun (name &optional + (doc "Unsupported on this platform.") + (control + "~S is unsupported on this platform ~ + (OS, CPU, whatever)." + controlp) + arguments) + `(defun ,name (&rest args) + ,doc + (declare (ignore args)) + (error 'unsupported-operator + :format-control ,control + :format-arguments (if ,controlp ',arguments (list ',name)))))