Merge pull request #1710 from nielx/upstream/stat-cleanup

Haiku: add futimens and utimensat, remove futimes and cleanup.
This commit is contained in:
Yuki Okushi 2020-04-01 13:07:39 +09:00 committed by GitHub
commit 53bdd78e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 25 deletions

View File

@ -1270,6 +1270,13 @@ f! {
extern "C" {
pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;
pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int;
pub fn utimensat(
fd: ::c_int,
path: *const ::c_char,
times: *const ::timespec,
flag: ::c_int,
) -> ::c_int;
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
pub fn strerror_r(
errnum: ::c_int,
buf: *mut c_char,
@ -1394,7 +1401,6 @@ extern "C" {
addrlen: *mut ::socklen_t,
) -> ::ssize_t;
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
@ -1430,7 +1436,6 @@ extern "C" {
argv: *const *const ::c_char,
environment: *const *const ::c_char,
) -> ::c_int;
#[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
pub fn getgrgid_r(
gid: ::gid_t,
grp: *mut ::group,
@ -1438,15 +1443,9 @@ extern "C" {
buflen: ::size_t,
result: *mut *mut ::group,
) -> ::c_int;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "sigaltstack$UNIX2003"
)]
#[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int;
pub fn sem_close(sem: *mut sem_t) -> ::c_int;
pub fn getdtablesize() -> ::c_int;
#[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
pub fn getgrnam_r(
name: *const ::c_char,
grp: *mut ::group,
@ -1454,10 +1453,6 @@ extern "C" {
buflen: ::size_t,
result: *mut *mut ::group,
) -> ::c_int;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "pthread_sigmask$UNIX2003"
)]
pub fn pthread_sigmask(
how: ::c_int,
set: *const sigset_t,
@ -1468,8 +1463,6 @@ extern "C" {
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
#[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
pub fn getpwnam_r(
name: *const ::c_char,
pwd: *mut passwd,
@ -1477,8 +1470,6 @@ extern "C" {
buflen: ::size_t,
result: *mut *mut passwd,
) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
#[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
pub fn getpwuid_r(
uid: ::uid_t,
pwd: *mut passwd,
@ -1486,11 +1477,6 @@ extern "C" {
buflen: ::size_t,
result: *mut *mut passwd,
) -> ::c_int;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "sigwait$UNIX2003"
)]
#[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int;
pub fn pthread_atfork(
prepare: ::Option<unsafe extern "C" fn()>,
@ -1498,10 +1484,6 @@ extern "C" {
child: ::Option<unsafe extern "C" fn()>,
) -> ::c_int;
pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "popen$UNIX2003"
)]
pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
pub fn openpty(
amaster: *mut ::c_int,