Skip to content
Snippets Groups Projects
Commit 263970d1 authored by Knight's avatar Knight
Browse files

Add struct group and related functions

parent 5066b7dc
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,13 @@ pub enum DIR {} ...@@ -17,6 +17,13 @@ pub enum DIR {}
pub enum locale_t {} pub enum locale_t {}
s! { 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 struct utimbuf {
pub actime: time_t, pub actime: time_t,
pub modtime: time_t, pub modtime: time_t,
...@@ -226,6 +233,9 @@ cfg_if! { ...@@ -226,6 +233,9 @@ cfg_if! {
} }
extern { extern {
pub fn getgrnam(name: *const ::c_char) -> *mut group;
pub fn getgrgid(gid: ::gid_t) -> *mut group;
pub fn fprintf(stream: *mut ::FILE, pub fn fprintf(stream: *mut ::FILE,
format: *const ::c_char, ...) -> ::c_int; format: *const ::c_char, ...) -> ::c_int;
pub fn printf(format: *const ::c_char, ...) -> ::c_int; pub fn printf(format: *const ::c_char, ...) -> ::c_int;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment