diff --git a/src/header/_aio/mod.rs b/src/header/_aio/mod.rs index 672f4e173b..b75ba38f78 100644 --- a/src/header/_aio/mod.rs +++ b/src/header/_aio/mod.rs @@ -3,7 +3,7 @@ //! See . use crate::{ - header::{bits_time::timespec, signal::sigevent}, + header::{bits_timespec::timespec, signal::sigevent}, platform::types::{c_int, c_void}, }; diff --git a/src/header/bits_time/cbindgen.toml b/src/header/bits_timespec/cbindgen.toml similarity index 100% rename from src/header/bits_time/cbindgen.toml rename to src/header/bits_timespec/cbindgen.toml diff --git a/src/header/bits_time/mod.rs b/src/header/bits_timespec/mod.rs similarity index 100% rename from src/header/bits_time/mod.rs rename to src/header/bits_timespec/mod.rs diff --git a/src/header/mod.rs b/src/header/mod.rs index b3bb9aa36f..58c7a95dfd 100644 --- a/src/header/mod.rs +++ b/src/header/mod.rs @@ -11,7 +11,7 @@ pub mod bits_locale_t; pub mod bits_pthread; #[path = "bits_socklen-t/mod.rs"] pub mod bits_socklen_t; -pub mod bits_time; +pub mod bits_timespec; // complex.h implemented in C // cpio.h implemented in C pub mod crypt; diff --git a/src/header/netdb/lookup.rs b/src/header/netdb/lookup.rs index e0358c6b22..0734eec668 100644 --- a/src/header/netdb/lookup.rs +++ b/src/header/netdb/lookup.rs @@ -12,7 +12,7 @@ use crate::{ use crate::header::{ bits_arpainet::htons, bits_socklen_t::socklen_t, - bits_time::timespec, + bits_timespec::timespec, errno::*, netinet_in::{IPPROTO_UDP, in_addr, sockaddr_in}, sys_socket::{ diff --git a/src/header/poll/cbindgen.toml b/src/header/poll/cbindgen.toml index 11047d5e92..246d5924cc 100644 --- a/src/header/poll/cbindgen.toml +++ b/src/header/poll/cbindgen.toml @@ -1,7 +1,7 @@ sys_includes = ["signal.h"] include_guard = "_RELIBC_POLL_H" after_includes = """ -#include // for timespec +#include // for timespec """ language = "C" style = "Tag" diff --git a/src/header/poll/mod.rs b/src/header/poll/mod.rs index 7ce2c7ff21..024a8d600e 100644 --- a/src/header/poll/mod.rs +++ b/src/header/poll/mod.rs @@ -7,7 +7,7 @@ use core::{mem, ptr, slice}; use crate::{ fs::File, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::EBADF, signal::sigset_t, sys_epoll::{ diff --git a/src/header/pthread/mod.rs b/src/header/pthread/mod.rs index f7315fa25f..c742a425ff 100644 --- a/src/header/pthread/mod.rs +++ b/src/header/pthread/mod.rs @@ -7,7 +7,7 @@ use core::{cell::Cell, ptr::NonNull}; use crate::{ error::Errno, - header::{bits_time::timespec, sched::*}, + header::{bits_timespec::timespec, sched::*}, platform::{ Pal, Sys, types::{ diff --git a/src/header/sched/cbindgen.toml b/src/header/sched/cbindgen.toml index e91acf1310..b361fa4531 100644 --- a/src/header/sched/cbindgen.toml +++ b/src/header/sched/cbindgen.toml @@ -8,7 +8,7 @@ sys_includes = ["sys/types.h"] include_guard = "_RELIBC_SCHED_H" after_includes = """ -#include // for timespec +#include // for timespec """ language = "C" style = "Tag" diff --git a/src/header/sched/mod.rs b/src/header/sched/mod.rs index 237f7cb3ad..bcdd34696c 100644 --- a/src/header/sched/mod.rs +++ b/src/header/sched/mod.rs @@ -4,7 +4,7 @@ use crate::{ error::ResultExt, - header::bits_time::timespec, + header::bits_timespec::timespec, platform::{ Pal, Sys, types::{c_int, pid_t}, diff --git a/src/header/semaphore/cbindgen.toml b/src/header/semaphore/cbindgen.toml index 13bdf9cdc9..be8f845c58 100644 --- a/src/header/semaphore/cbindgen.toml +++ b/src/header/semaphore/cbindgen.toml @@ -1,7 +1,7 @@ sys_includes = [] include_guard = "_RELIBC_SEMAPHORE_H" after_includes = """ -#include // for timespec +#include // for timespec """ language = "C" style = "Type" diff --git a/src/header/semaphore/mod.rs b/src/header/semaphore/mod.rs index 70a8b8a7d6..0ca2fa9ef1 100644 --- a/src/header/semaphore/mod.rs +++ b/src/header/semaphore/mod.rs @@ -4,7 +4,7 @@ use crate::{ header::{ - bits_time::timespec, + bits_timespec::timespec, time::{CLOCK_MONOTONIC, CLOCK_REALTIME}, }, platform::types::{c_char, c_int, c_long, c_uint, clockid_t}, diff --git a/src/header/signal/cbindgen.toml b/src/header/signal/cbindgen.toml index fe4d3bf84a..acfecf56db 100644 --- a/src/header/signal/cbindgen.toml +++ b/src/header/signal/cbindgen.toml @@ -1,7 +1,7 @@ sys_includes = ["bits/signal.h", "stdint.h", "sys/types.h", "bits/pthread.h", "features.h"] include_guard = "_RELIBC_SIGNAL_H" after_includes = """ -#include // for timespec +#include // for timespec #include """ language = "C" diff --git a/src/header/signal/mod.rs b/src/header/signal/mod.rs index 29f4529b14..d71999ef25 100644 --- a/src/header/signal/mod.rs +++ b/src/header/signal/mod.rs @@ -8,7 +8,7 @@ use cbitset::BitSet; use crate::{ error::{Errno, ResultExt}, - header::{bits_time::timespec, errno, setjmp}, + header::{bits_timespec::timespec, errno, setjmp}, platform::{ self, ERRNO, Pal, PalSignal, Sys, types::{ diff --git a/src/header/sys_stat/cbindgen.toml b/src/header/sys_stat/cbindgen.toml index 5c12e4dc43..a922349e9f 100644 --- a/src/header/sys_stat/cbindgen.toml +++ b/src/header/sys_stat/cbindgen.toml @@ -7,7 +7,7 @@ sys_includes = ["sys/types.h"] include_guard = "_SYS_STAT_H" after_includes = """ -#include // for timespec +#include // for timespec #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) diff --git a/src/header/sys_stat/mod.rs b/src/header/sys_stat/mod.rs index 3bca4c05d0..d0db00eafe 100644 --- a/src/header/sys_stat/mod.rs +++ b/src/header/sys_stat/mod.rs @@ -6,7 +6,7 @@ use crate::{ c_str::CStr, error::ResultExt, header::{ - bits_time::timespec, + bits_timespec::timespec, fcntl::{O_NOFOLLOW, O_PATH}, }, out::Out, diff --git a/src/header/sys_time/cbindgen.toml b/src/header/sys_time/cbindgen.toml index 5756a47625..9e28d70f11 100644 --- a/src/header/sys_time/cbindgen.toml +++ b/src/header/sys_time/cbindgen.toml @@ -3,7 +3,7 @@ sys_includes = ["sys/types.h", "sys/select.h"] include_guard = "_SYS_TIME_H" language = "C" after_includes = """ -#include // for timespec +#include // for timespec #define timeradd(x,y,res) (void) (\ (res)->tv_sec = (x)->tv_sec + (y)->tv_sec + (((x)->tv_usec + (y)->tv_usec) / 1000000), \ diff --git a/src/header/sys_time/mod.rs b/src/header/sys_time/mod.rs index ce4dd07e55..723ee1a48b 100644 --- a/src/header/sys_time/mod.rs +++ b/src/header/sys_time/mod.rs @@ -9,7 +9,7 @@ use crate::{ c_str::CStr, error::ResultExt, - header::{bits_time::timespec, sys_select::timeval}, + header::{bits_timespec::timespec, sys_select::timeval}, out::Out, platform::{ Pal, PalSignal, Sys, diff --git a/src/header/time/cbindgen.toml b/src/header/time/cbindgen.toml index 1f409617ca..d2476bd3b3 100644 --- a/src/header/time/cbindgen.toml +++ b/src/header/time/cbindgen.toml @@ -5,7 +5,7 @@ style = "Tag" no_includes = true cpp_compat = true after_includes = """ -#include // for timespec +#include // for timespec struct sigevent; """ diff --git a/src/header/time/mod.rs b/src/header/time/mod.rs index b534dc5274..dfe37883d1 100644 --- a/src/header/time/mod.rs +++ b/src/header/time/mod.rs @@ -6,7 +6,7 @@ use crate::{ c_str::{CStr, CString}, error::{Errno, ResultExt}, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::{EFAULT, ENOMEM, EOVERFLOW, ETIMEDOUT}, signal::sigevent, stdlib::getenv, diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index c4d5f17b00..fa30b644d0 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -13,7 +13,7 @@ use crate::{ c_str::CStr, error::{Errno, ResultExt}, header::{ - bits_time::timespec, + bits_timespec::timespec, crypt::{crypt_data, crypt_r}, errno::{self, ENAMETOOLONG}, fcntl, limits, diff --git a/src/header/utime/mod.rs b/src/header/utime/mod.rs index 93a97e27e1..75f5238560 100644 --- a/src/header/utime/mod.rs +++ b/src/header/utime/mod.rs @@ -8,7 +8,7 @@ use crate::{ c_str::CStr, error::ResultExt, - header::bits_time::timespec, + header::bits_timespec::timespec, platform::{ Pal, Sys, types::{c_char, c_int, time_t}, diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs index c30a163709..b53c95b5c6 100644 --- a/src/platform/linux/mod.rs +++ b/src/platform/linux/mod.rs @@ -4,7 +4,9 @@ use core::arch::asm; use super::{Pal, types::*}; use crate::{ c_str::CStr, + error::{Errno, Result}, header::{ + bits_timespec::timespec, dirent::dirent, errno::{EINVAL, EIO}, fcntl::{AT_EMPTY_PATH, AT_FDCWD, AT_REMOVEDIR}, @@ -14,6 +16,7 @@ use crate::{ sys_stat::{S_IFIFO, stat}, sys_statvfs::statvfs, sys_time::timezone, + sys_utsname::utsname, time::itimerspec, unistd::{SEEK_CUR, SEEK_SET}, }, @@ -22,10 +25,6 @@ use crate::{ }; use core::{num::NonZeroU64, ptr}; // use header::sys_times::tms; -use crate::{ - error::{Errno, Result}, - header::{bits_time::timespec, sys_utsname::utsname}, -}; mod epoll; mod ptrace; diff --git a/src/platform/linux/signal.rs b/src/platform/linux/signal.rs index 3459ef62ee..8c571ffd67 100644 --- a/src/platform/linux/signal.rs +++ b/src/platform/linux/signal.rs @@ -13,7 +13,7 @@ use super::{ use crate::{ error::{Errno, Result}, header::{ - bits_time::timespec, + bits_timespec::timespec, signal::{SA_RESTORER, SI_QUEUE, sigaction, siginfo_t, sigset_t, sigval, stack_t}, sys_select::timeval, sys_time::{self, itimerval}, diff --git a/src/platform/pal/mod.rs b/src/platform/pal/mod.rs index 5a99d2dbaf..4c5be00036 100644 --- a/src/platform/pal/mod.rs +++ b/src/platform/pal/mod.rs @@ -5,7 +5,7 @@ use crate::{ c_str::CStr, error::{Errno, Result}, header::{ - bits_time::timespec, + bits_timespec::timespec, signal::sigevent, sys_resource::{rlimit, rusage}, sys_select::timeval, diff --git a/src/platform/pal/signal.rs b/src/platform/pal/signal.rs index 0a5556e77a..8a8aaac346 100644 --- a/src/platform/pal/signal.rs +++ b/src/platform/pal/signal.rs @@ -1,8 +1,11 @@ -use super::super::{Pal, types::*}; +use super::super::{ + Pal, + types::{c_int, c_uint, pid_t}, +}; use crate::{ error::{Errno, Result}, header::{ - bits_time::timespec, + bits_timespec::timespec, signal::{sigaction, siginfo_t, sigset_t, sigval, stack_t}, sys_time::itimerval, }, diff --git a/src/platform/redox/event.rs b/src/platform/redox/event.rs index cb46f27f83..5d77de41cf 100644 --- a/src/platform/redox/event.rs +++ b/src/platform/redox/event.rs @@ -1,7 +1,7 @@ use core::mem::size_of; use crate::header::{ - bits_time::timespec, + bits_timespec::timespec, fcntl::{O_CLOEXEC, O_CREAT, O_RDWR}, signal::sigset_t, }; diff --git a/src/platform/redox/libredox.rs b/src/platform/redox/libredox.rs index 0980024b75..2aad40861f 100644 --- a/src/platform/redox/libredox.rs +++ b/src/platform/redox/libredox.rs @@ -12,7 +12,7 @@ use syscall::{ use crate::{ header::{ - bits_iovec::iovec, bits_time::timespec, errno::EINVAL, signal::sigaction, + bits_iovec::iovec, bits_timespec::timespec, errno::EINVAL, signal::sigaction, sys_stat::UTIME_NOW, }, out::Out, diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index c60b6e3e84..c68b00c865 100644 --- a/src/platform/redox/mod.rs +++ b/src/platform/redox/mod.rs @@ -26,7 +26,7 @@ use crate::{ error::{Errno, Result}, fs::File, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::{ EBADF, EBADFD, EEXIST, EFAULT, EFBIG, EINTR, EINVAL, EIO, ENAMETOOLONG, ENOENT, ENOMEM, ENOSYS, EOPNOTSUPP, EPERM, diff --git a/src/platform/redox/signal.rs b/src/platform/redox/signal.rs index c7a36819cb..e4b17865c1 100644 --- a/src/platform/redox/signal.rs +++ b/src/platform/redox/signal.rs @@ -5,7 +5,7 @@ use super::{ use crate::{ error::{Errno, Result}, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::{EINVAL, ENOSYS}, signal::{ SIG_BLOCK, SIG_DFL, SIG_IGN, SIG_SETMASK, SIG_UNBLOCK, SIGALRM, SIGEV_SIGNAL, diff --git a/src/platform/redox/timer.rs b/src/platform/redox/timer.rs index f97a9cab29..5289e054da 100644 --- a/src/platform/redox/timer.rs +++ b/src/platform/redox/timer.rs @@ -3,7 +3,7 @@ use syscall::Error; use crate::{ error::{Errno, Result}, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::EIO, signal::{SIGEV_SIGNAL, SIGEV_THREAD}, time::timer_internal_t, diff --git a/src/sync/cond.rs b/src/sync/cond.rs index 5b1be7c7b3..19f9868a19 100644 --- a/src/sync/cond.rs +++ b/src/sync/cond.rs @@ -3,7 +3,7 @@ use crate::{ error::Errno, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::{EINVAL, ETIMEDOUT}, pthread::*, time::{CLOCK_MONOTONIC, CLOCK_REALTIME, timespec_realtime_to_monotonic}, diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 559628d013..a21cefa8a9 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -20,7 +20,7 @@ pub use self::{ use crate::{ error::Errno, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::{EAGAIN, EINTR, ETIMEDOUT}, }, out::Out, diff --git a/src/sync/pthread_mutex.rs b/src/sync/pthread_mutex.rs index f82294980b..29bad634ae 100644 --- a/src/sync/pthread_mutex.rs +++ b/src/sync/pthread_mutex.rs @@ -5,7 +5,7 @@ use core::{ use crate::{ error::Errno, - header::{bits_time::timespec, errno::*, pthread::*}, + header::{bits_timespec::timespec, errno::*, pthread::*}, }; use crate::platform::{Pal, Sys, types::c_int}; diff --git a/src/sync/rwlock.rs b/src/sync/rwlock.rs index 4a56eee6af..c93fe05dc9 100644 --- a/src/sync/rwlock.rs +++ b/src/sync/rwlock.rs @@ -7,7 +7,7 @@ use core::{ use crate::{ error::{Errno, Result}, header::{ - bits_time::timespec, + bits_timespec::timespec, errno::{EINVAL, ETIMEDOUT}, time::{CLOCK_MONOTONIC, CLOCK_REALTIME, timespec_realtime_to_monotonic}, }, diff --git a/src/sync/semaphore.rs b/src/sync/semaphore.rs index e4fa4568fc..ce1496188a 100644 --- a/src/sync/semaphore.rs +++ b/src/sync/semaphore.rs @@ -3,7 +3,7 @@ use crate::{ header::{ - bits_time::timespec, + bits_timespec::timespec, time::{CLOCK_MONOTONIC, CLOCK_REALTIME, timespec_realtime_to_monotonic}, }, platform::types::{c_uint, clockid_t},