Skip to content

Commit

Permalink
Add struct group and related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
knight42 committed Jul 31, 2016
1 parent 5066b7d commit 263970d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ pub enum DIR {}
pub enum locale_t {}

s! {
pub struct group {
pub gr_name: *mut ::c_char,
pub gr_passwd: *mut ::c_char,
pub gr_gid: ::gid_t,
pub gr_mem: *mut *mut ::c_char,
}

pub struct utimbuf {
pub actime: time_t,
pub modtime: time_t,
Expand Down Expand Up @@ -226,6 +233,9 @@ cfg_if! {
}

extern {
pub fn getgrnam(name: *const ::c_char) -> *mut group;
pub fn getgrgid(gid: ::gid_t) -> *mut group;

pub fn fprintf(stream: *mut ::FILE,
format: *const ::c_char, ...) -> ::c_int;
pub fn printf(format: *const ::c_char, ...) -> ::c_int;
Expand Down

0 comments on commit 263970d

Please sign in to comment.