X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fsb-posix%2Fconstants.lisp;h=2920c014877f8cacba803a1eb676f013bdc250ef;hb=118902aab241d73ac48a40b3fef4101f654d9ec0;hp=84b1f91d0e7865206a9cf48bb3a15953d31400fe;hpb=df7c79dc72044de878cc47e11fab19ecc2e56a60;p=sbcl.git diff --git a/contrib/sb-posix/constants.lisp b/contrib/sb-posix/constants.lisp index 84b1f91..2920c01 100644 --- a/contrib/sb-posix/constants.lisp +++ b/contrib/sb-posix/constants.lisp @@ -12,6 +12,7 @@ "fcntl.h" "netdb.h" "errno.h" "dirent.h" "signal.h" + "pwd.h" "unistd.h" "termios.h") @@ -246,10 +247,32 @@ (:c-string name "char *" "d_name" :distrust-length #+sunos t #-sunos nil)) t) + ;; password database + (:structure alien-passwd + ("struct passwd" + (c-string-pointer name "char *" "pw_name") + (c-string-pointer passwd "char *" "pw_passwd") + (uid-t uid "uid_t" "pw_uid") + (gid-t gid "gid_t" "pw_gid") + ;; 'change', 'class', and 'expire' are not supported on Linux + #+nil + (time-t change "time_t" "pw_change") + #+nil + (c-string-pointer class "char *" "pw_class") + (c-string-pointer gecos "char *" "pw_gecos") + (c-string-pointer dir "char *" "pw_dir") + (c-string-pointer shell "char *" "pw_shell") + #+nil + (time-t expire "time_t" "pw_expire") + ;; OS X manpages say this exists. they lie! + #+nil + (:integer fields "int" "pw_fields"))) + (:structure alien-stat ("struct stat" (mode-t mode "mode_t" "st_mode") (ino-t ino "ino_t" "st_ino") + ;; Linux/MIPS uses unsigned long instead of dev_t here. #-mips (dev-t dev "dev_t" "st_dev") #+mips