Redefining id_t because it is differently sized and has a different meaning across BSD platforms

This commit is contained in:
Raphael Cohn 2016-05-20 10:59:03 +01:00
parent 2de25f81a4
commit a2d2b0cbe6
4 changed files with 9 additions and 3 deletions

View File

@ -19,6 +19,7 @@ pub type fsfilcnt_t = ::c_uint;
pub type speed_t = ::c_ulong;
pub type tcflag_t = ::c_ulong;
pub type nl_item = ::c_int;
pub type id_t = ::c_uint;
pub enum timezone {}
@ -1358,6 +1359,8 @@ extern {
base: ::locale_t) -> ::locale_t;
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
}
cfg_if! {

View File

@ -10,6 +10,7 @@ pub type pthread_key_t = ::c_int;
pub type tcflag_t = ::c_uint;
pub type speed_t = ::c_uint;
pub type nl_item = ::c_int;
pub type id_t = i64;
pub enum timezone {}
@ -742,6 +743,8 @@ extern {
pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
stackaddr: *mut *mut ::c_void,
stacksize: *mut ::size_t) -> ::c_int;
pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
}
cfg_if! {

View File

@ -9,7 +9,6 @@ pub type socklen_t = u32;
pub type sa_family_t = u8;
pub type pthread_t = ::uintptr_t;
pub type nfds_t = ::c_uint;
pub type id_t = ::c_uint;
s! {
pub struct sockaddr {
@ -358,8 +357,6 @@ extern {
pub fn getprogname() -> *const ::c_char;
pub fn setprogname(name: *const ::c_char);
pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
}
cfg_if! {

View File

@ -10,6 +10,7 @@ pub type speed_t = ::c_uint;
pub type tcflag_t = ::c_uint;
pub type nl_item = c_long;
pub type clockid_t = ::c_int;
pub type id_t = ::uint32_t;
pub enum timezone {}
@ -472,6 +473,8 @@ extern {
name: *mut ::c_char,
termp: *mut termios,
winp: *mut ::winsize) -> ::pid_t;
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
}
cfg_if! {