
Raymond Toy pushed to branch issue-393-os-common-getpwuid at cmucl / cmucl Commits: 2117ed00 by Raymond Toy at 2025-03-26T11:39:39-07:00 Remove OS-specific user-info and passwd stuff First, remove the OS-specific fields from `user-info`. Basically, the user info no longer includes the solaris fields "age" and "comment" nor the freebsd field "change". Second, the passwd structure now only includes just the fields needed to fill in the user-info structure, even if the OS provides additional fields. - - - - - 1 changed file: - src/code/unix.lisp Changes: ===================================== src/code/unix.lisp ===================================== @@ -2409,43 +2409,15 @@ (password "" :type string) (uid 0 :type unix-uid) (gid 0 :type unix-gid) - #+solaris (age "" :type string) - #+solaris (comment "" :type string) - #+freebsd (change -1 :type fixnum) (gecos "" :type string) (dir "" :type string) (shell "" :type string)) -;; see <pwd.h> -#+solaris -(def-alien-type nil - (struct passwd - (pw-name (* char)) ; user's login name - (pw-passwd (* char)) ; no longer used - (pw-uid uid-t) ; user id - (pw-gid gid-t) ; group id - (pw-age (* char)) ; password age (not used) - (pw-comment (* char)) ; not used - (pw-gecos (* char)) ; typically user's full name - (pw-dir (* char)) ; user's home directory - (pw-shell (* char)))) ; user's login shell +;; See <pwd.h> +;; +;; While each OS may contain additional fields, we only need the ones +;; that are used the user-info structure. -#+bsd -(def-alien-type nil - (struct passwd - (pw-name (* char)) ; user's login name - (pw-passwd (* char)) ; no longer used - (pw-uid uid-t) ; user id - (pw-gid gid-t) ; group id - (pw-change int) ; password change time - (pw-class (* char)) ; user access class - (pw-gecos (* char)) ; typically user's full name - (pw-dir (* char)) ; user's home directory - (pw-shell (* char)) ; user's login shell - (pw-expire int) ; account expiration - #+(or freebsd darwin) - (pw-fields int))) ; internal -#+linux (def-alien-type nil (struct passwd (pw-name (* char)) ; user's login name View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2117ed00193d7a44083a2afb... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2117ed00193d7a44083a2afb... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)