Merge branch 'split-gidt' into 'master'
split out gid_t from sys_types See merge request redox-os/relibc!1294
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# 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 gid_t:
|
||||
# - grp.h
|
||||
# - pwd.h
|
||||
# - sys/ipc.h (TODO not present in relibc)
|
||||
# - sys/stat.h
|
||||
# - sys/types.h (where it should be defined)
|
||||
# - unistd.h
|
||||
sys_includes = []
|
||||
include_guard = "_RELIBC_BITS_GID_T_H"
|
||||
language = "C"
|
||||
style = "type"
|
||||
no_includes = true
|
||||
cpp_compat = true
|
||||
[export]
|
||||
include = ["gid_t"]
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -0,0 +1,5 @@
|
||||
use crate::platform::types::c_int;
|
||||
|
||||
/// Used for group IDs.
|
||||
#[allow(non_camel_case_types)]
|
||||
pub type gid_t = c_int;
|
||||
@@ -5,6 +5,8 @@ pub mod _fenv;
|
||||
pub mod arpa_inet;
|
||||
pub mod assert;
|
||||
pub mod bits_arpainet;
|
||||
#[path = "bits_gid-t/mod.rs"]
|
||||
pub mod bits_gid_t;
|
||||
pub mod bits_iovec;
|
||||
#[path = "bits_locale-t/mod.rs"]
|
||||
pub mod bits_locale_t;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
sys_includes = ["stddef.h"]
|
||||
# TODO: figure out how to export void* type
|
||||
after_includes = """
|
||||
#include <bits/gid-t.h>
|
||||
#include <bits/off-t.h>
|
||||
#include <bits/pid-t.h>
|
||||
#include <bits/ssize-t.h>
|
||||
@@ -21,7 +22,6 @@ include = [
|
||||
"dev_t",
|
||||
"ino_t",
|
||||
"reclen_t",
|
||||
"gid_t",
|
||||
"uid_t",
|
||||
"mode_t",
|
||||
"nlink_t",
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
//! for the old specification.
|
||||
|
||||
pub use crate::header::{
|
||||
bits_off_t::off_t, bits_pid_t::pid_t, bits_ssize_t::ssize_t, bits_suseconds_t::suseconds_t,
|
||||
bits_time_t::time_t,
|
||||
bits_gid_t::gid_t, bits_off_t::off_t, bits_pid_t::pid_t, bits_ssize_t::ssize_t,
|
||||
bits_suseconds_t::suseconds_t, bits_time_t::time_t,
|
||||
};
|
||||
use crate::platform::types::{
|
||||
c_char, c_int, c_long, c_longlong, c_uchar, c_uint, c_ulong, c_ulonglong, c_ushort,
|
||||
@@ -23,8 +23,6 @@ pub type dev_t = c_ulonglong;
|
||||
pub type ino_t = c_ulonglong;
|
||||
/// Used for directory entry lengths.
|
||||
pub type reclen_t = c_ushort;
|
||||
/// Used for group IDs.
|
||||
pub type gid_t = c_int;
|
||||
/// Used for user IDs.
|
||||
pub type uid_t = c_int;
|
||||
/// Used for some file attributes.
|
||||
|
||||
Reference in New Issue
Block a user