1 (in-package :sb-posix-internal)
3 (defun lisp-for-c-symbol (s)
4 (intern (substitute #\- #\_ (string-upcase s)) :sb-posix))
6 (defmacro define-call (name return-type error-predicate &rest arguments)
7 (let ((lisp-name (lisp-for-c-symbol name)))
9 (export ',lisp-name :sb-posix)
10 (declaim (inline ,lisp-name))
11 (defun ,lisp-name ,(mapcar #'car arguments)
12 (let ((r (alien-funcall
15 (function ,return-type
18 (get (cadr x) 'designator-type (cadr x)))
21 (if (get (cadr x) 'designator-type)
22 `(,(intern (symbol-name (cadr x)) :sb-posix)
26 (if (,error-predicate r) (syscall-error) r))))))