1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-04 23:17:46 +00:00

pinky: cleanup the code

This commit is contained in:
Knight 2016-07-26 16:43:03 +08:00 committed by Roy Ivy III
parent 6e2c3ede40
commit 79b6835612

View file

@ -8,6 +8,8 @@ use self::libc::{
uid_t,
gid_t,
};
pub use self::libc::passwd as c_passwd;
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
use self::libc::time_t;
#[cfg(target_os = "macos")]
@ -22,35 +24,6 @@ use std::vec::Vec;
use std::ptr::{null_mut, read};
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
#[repr(C)]
#[derive(Clone, Copy)]
pub struct c_passwd {
pub pw_name: *const c_char, /* user name */
pub pw_passwd: *const c_char, /* user name */
pub pw_uid: uid_t, /* user uid */
pub pw_gid: gid_t, /* user gid */
pub pw_change: time_t,
pub pw_class: *const c_char,
pub pw_gecos: *const c_char,
pub pw_dir: *const c_char,
pub pw_shell: *const c_char,
pub pw_expire: time_t
}
#[cfg(target_os = "linux")]
#[repr(C)]
#[derive(Clone, Copy)]
pub struct c_passwd {
pub pw_name: *const c_char, /* user name */
pub pw_passwd: *const c_char, /* user name */
pub pw_uid: uid_t, /* user uid */
pub pw_gid: gid_t, /* user gid */
pub pw_gecos: *const c_char,
pub pw_dir: *const c_char,
pub pw_shell: *const c_char,
}
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
#[repr(C)]
pub struct utsname {