Merge branch 'resource-bits' into 'master'

move sys resource bits file to cbindgen

See merge request redox-os/relibc!1116
This commit is contained in:
Jeremy Soller
2026-03-25 08:05:41 -06:00
4 changed files with 9 additions and 13 deletions
-9
View File
@@ -1,9 +0,0 @@
#ifndef _BITS_SYS_RESOURCE_H
#define _BITS_SYS_RESOURCE_H
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN (-1)
#define RUSAGE_BOTH (-2)
#define RUSAGE_THREAD 1
#endif /* _BITS_SYS_RESOURCE_H */
+6 -1
View File
@@ -1,6 +1,11 @@
sys_includes = ["sys/types.h", "stdint.h", "sys/time.h"]
include_guard = "_SYS_RESOURCE_H"
trailer = "#include <bits/sys/resource.h>"
trailer = """
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN (-1)
#define RUSAGE_BOTH (-2)
#define RUSAGE_THREAD 1
"""
language = "C"
style = "Tag"
no_includes = true
+1 -1
View File
@@ -12,7 +12,7 @@ use crate::{
},
};
// Exported in bits file
// Exported from cbindgen
// const RUSAGE_SELF: c_int = 0;
// const RUSAGE_CHILDREN: c_int = -1;
// const RUSAGE_BOTH: c_int = -2;
+2 -2
View File
@@ -15,8 +15,8 @@ use crate::{
arpa_inet::inet_aton,
bits_socklen_t::socklen_t,
errno::{
EAFNOSUPPORT, EDOM, EFAULT, EINVAL, EMSGSIZE, ENOMEM, ENOSYS, ENOTSOCK,
EOPNOTSUPP, EPROTONOSUPPORT,
EAFNOSUPPORT, EDOM, EFAULT, EINVAL, EMSGSIZE, ENOMEM, ENOSYS, ENOTSOCK, EOPNOTSUPP,
EPROTONOSUPPORT,
},
netinet_in::{in_addr, in_port_t, sockaddr_in},
string::strnlen,