Large reorganization of headers (WIP)

This commit is contained in:
Jeremy Soller
2018-08-26 08:11:35 -06:00
parent ff32c8cbbd
commit c20ce5ffed
261 changed files with 236 additions and 1672 deletions
+6
View File
@@ -0,0 +1,6 @@
include_guard = "_SYS_UTSNAME_H"
language = "C"
style = "Tag"
[enum]
prefix_with_name = true
+27
View File
@@ -0,0 +1,27 @@
//! sys/utsname implementation for linux, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysutsname.h.html
#[cfg(target_os = "linux")]
mod inner {
use platform;
use platform::{Pal, Sys};
use platform::types::*;
const UTSLENGTH: usize = 65;
#[repr(C)]
pub struct utsname {
pub sysname: [c_char; UTSLENGTH],
pub nodename: [c_char; UTSLENGTH],
pub release: [c_char; UTSLENGTH],
pub version: [c_char; UTSLENGTH],
pub machine: [c_char; UTSLENGTH],
pub domainname: [c_char; UTSLENGTH],
}
#[no_mangle]
pub unsafe extern "C" fn uname(uts: *mut utsname) -> c_int {
Sys::uname(uts as *mut platform::types::utsname)
}
}
#[cfg(target_os = "linux")]
pub use inner::*;