(declaim (inline ,lisp-name))
(defun ,lisp-name (,arg)
(let ((r (alien-funcall (extern-alien ,name ,type) ,arg)))
- (if (null r)
- r
+ (if (null-alien r)
+ nil
(alien-to-passwd r)))))))
(define-pw-call "getpwnam" login-name (function (* alien-passwd) c-string))
(declaim (inline ,lisp-name))
(defun ,lisp-name (,arg)
(let ((r (alien-funcall (extern-alien ,name ,type) ,arg)))
- (if (null r)
- r
+ (if (null-alien r)
+ nil
(alien-to-group r)))))))
(define-gr-call "getgrnam" login-name (function (* alien-group) c-string))
nil)
#-win32
+(deftest pwent.non-existing
+ ;; make sure that we get something sensible, not an error
+ (handler-case (progn (sb-posix:getpwnam "almost-certainly-does-not-exist")
+ nil)
+ (t (cond) t))
+ nil)
+
+#-win32
(deftest grent.1
;; make sure that we found something
(not (sb-posix:getgrgid 0))
(not (sb-posix:getgrnam "wheel"))
nil)
+#-win32
+(deftest grent.non-existing
+ ;; make sure that we get something sensible, not an error
+ (handler-case (progn (sb-posix:getgrnam "almost-certainly-does-not-exist")
+ nil)
+ (t (cond) t))
+ nil)
+
#+nil
;; Requires root or special group + plus a sensible thing on the port
(deftest cfget/setispeed.1
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.10.33"
+"1.0.10.34"