Changeset 10514


Ignore:
Timestamp:
Aug 21, 2008, 10:51:11 AM (11 years ago)
Author:
gb
Message:

INT-ERRNO-CALL: return (negative) errno if primary result negative
(same conventions as syscall interface, so we can stop using syscall
interface as often.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/macros.lisp

    r10487 r10514  
    36503650             ,@body)
    36513651        (setf (stream-output-timeout ,stream) ,old-output-timeout)))))
     3652
     3653;;; FORM returns a signed integer.  If it's non-negative, return that
     3654;;; value, otherwise, return the (negative) errnor value returned by
     3655;;; %GET-ERRNO
     3656(defmacro int-errno-call (form)
     3657  (let* ((value (gensym)))
     3658    `(let* ((,value ,form))
     3659      (if (< ,value 0)
     3660        (%get-errno)
     3661        ,value))))
     3662
Note: See TracChangeset for help on using the changeset viewer.