split out ino_t from sys_types header
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_types.h.html
|
||||
#
|
||||
# This type is split out to prevent importing all of sys/types.h into other headers.
|
||||
#
|
||||
# POSIX headers that require ino_t:
|
||||
# - dirent.h
|
||||
# - sys/stat.h
|
||||
# - sys/types.h (where it should be defined)
|
||||
sys_includes = []
|
||||
include_guard = "_RELIBC_BITS_INO_T_H"
|
||||
language = "C"
|
||||
style = "type"
|
||||
no_includes = true
|
||||
cpp_compat = true
|
||||
[export]
|
||||
include = ["ino_t"]
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::platform::types::c_ulonglong;
|
||||
|
||||
/// Used for serial numbers.
|
||||
#[allow(non_camel_case_types)]
|
||||
pub type ino_t = c_ulonglong;
|
||||
@@ -13,6 +13,8 @@ pub mod bits_clockid_t;
|
||||
pub mod bits_gid_t;
|
||||
#[path = "bits_id-t/mod.rs"]
|
||||
pub mod bits_id_t;
|
||||
#[path = "bits_ino-t/mod.rs"]
|
||||
pub mod bits_ino_t;
|
||||
pub mod bits_iovec;
|
||||
#[path = "bits_locale-t/mod.rs"]
|
||||
pub mod bits_locale_t;
|
||||
|
||||
@@ -6,6 +6,7 @@ after_includes = """
|
||||
#include <bits/clockid-t.h>
|
||||
#include <bits/gid-t.h>
|
||||
#include <bits/id-t.h>
|
||||
#include <bits/ino-t.h>
|
||||
#include <bits/mode-t.h>
|
||||
#include <bits/off-t.h>
|
||||
#include <bits/pid-t.h>
|
||||
@@ -26,7 +27,6 @@ no_includes = true
|
||||
include = [
|
||||
"blksize_t",
|
||||
"dev_t",
|
||||
"ino_t",
|
||||
"reclen_t",
|
||||
"nlink_t",
|
||||
"useconds_t",
|
||||
|
||||
@@ -12,6 +12,7 @@ pub use crate::header::{
|
||||
bits_clockid_t::clockid_t,
|
||||
bits_gid_t::gid_t,
|
||||
bits_id_t::id_t,
|
||||
bits_ino_t::ino_t,
|
||||
bits_mode_t::mode_t,
|
||||
bits_off_t::off_t,
|
||||
bits_pid_t::pid_t,
|
||||
@@ -29,8 +30,6 @@ use crate::platform::types::{
|
||||
pub type blksize_t = c_long;
|
||||
/// Used for device IDs.
|
||||
pub type dev_t = c_ulonglong;
|
||||
/// Used for serial numbers.
|
||||
pub type ino_t = c_ulonglong;
|
||||
/// Used for directory entry lengths.
|
||||
pub type reclen_t = c_ushort;
|
||||
/// Used for link counts.
|
||||
|
||||
Reference in New Issue
Block a user