[Git][cmucl/cmucl][issue-393-os-common-getpwuid] Fix errors introduced in renaming os-unix-info

Raymond Toy pushed to branch issue-393-os-common-getpwuid at cmucl / cmucl Commits: 52a47a38 by Raymond Toy at 2025-03-30T08:31:56-07:00 Fix errors introduced in renaming os-unix-info We renamed `struct passwd` to `os-unix-info` in a previous commit, but we didn't update the use of `struct passwd` in `unix-getpwuid`. Fix this by first rename `os-unix-info` to `os-user-info` to match the name of the C struct. And update `unix-getpwuid` to use `os-user-info` instead of `passwd`. - - - - - 1 changed file: - src/code/unix.lisp Changes: ===================================== src/code/unix.lisp ===================================== @@ -2419,7 +2419,7 @@ ;; The C structure that is returned by os_getpwuid containing the info ;; that we use to fill the user-info object. (def-alien-type nil - (struct os-unix-info + (struct os-user-info (pw-name (* char)) ; user's login name (pw-passwd (* char)) ; no longer used (pw-uid uid-t) ; user id @@ -2535,7 +2535,7 @@ of the failure. In particular, if the second value is 0 (or ENONENT, ESRCH, EBADF, etc.), then the uid was not found." (declare (type unix-uid uid)) - (with-alien ((result (* (struct passwd)))) + (with-alien ((result (* (struct os-user-info)))) (let (result) (unwind-protect (progn @@ -2547,7 +2547,7 @@ (declare (optimize (ext:inhibit-warnings 3))) (alien-funcall (extern-alien "os_getpwuid" - (function (* (struct passwd)) + (function (* (struct os-user-info)) uid-t)) uid))) (if (null-alien result) @@ -2573,7 +2573,7 @@ (alien-funcall (extern-alien "os_free_getpwuid" (function c-call:void - (* (struct passwd)))) + (* (struct os-user-info)))) result)))))) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/52a47a381d3a84be6ea4fa25... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/52a47a381d3a84be6ea4fa25... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)