Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haiku support #407

Merged
merged 2 commits into from
Sep 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/backend/libc/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pub(crate) mod dir;
#[cfg(not(any(
target_os = "dragonfly",
target_os = "haiku",
target_os = "freebsd",
target_os = "illumos",
target_os = "ios",
Expand Down
13 changes: 13 additions & 0 deletions src/backend/libc/fs/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use super::super::conv::{syscall_ret, syscall_ret_owned_fd, syscall_ret_ssize_t}
use super::super::offset::libc_fallocate;
#[cfg(not(any(
target_os = "dragonfly",
target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
Expand All @@ -35,6 +36,7 @@ use super::super::offset::libc_posix_fadvise;
use super::super::offset::libc_posix_fallocate;
use super::super::offset::{libc_fstat, libc_fstatat, libc_ftruncate, libc_lseek, libc_off_t};
#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "netbsd",
target_os = "redox",
Expand All @@ -43,6 +45,7 @@ use super::super::offset::{libc_fstat, libc_fstatat, libc_ftruncate, libc_lseek,
)))]
use super::super::offset::{libc_fstatfs, libc_statfs};
#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand All @@ -64,6 +67,7 @@ use crate::ffi::CString;
use crate::fs::Access;
#[cfg(not(any(
target_os = "dragonfly",
target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
Expand Down Expand Up @@ -94,6 +98,7 @@ use crate::fs::MemfdFlags;
))]
use crate::fs::SealFlags;
#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "netbsd",
target_os = "redox",
Expand All @@ -112,6 +117,7 @@ use crate::fs::{cwd, RenameFlags, ResolveFlags, Statx, StatxFlags};
use crate::fs::{Dev, FileType};
use crate::fs::{FdFlags, Mode, OFlags, Stat, Timestamps};
#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand Down Expand Up @@ -215,6 +221,7 @@ pub(crate) fn openat(
}

#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "netbsd",
target_os = "redox",
Expand All @@ -231,6 +238,7 @@ pub(crate) fn statfs(filename: &CStr) -> io::Result<StatFs> {
}

#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand Down Expand Up @@ -797,6 +805,7 @@ pub(crate) fn copy_file_range(

#[cfg(not(any(
target_os = "dragonfly",
target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
Expand Down Expand Up @@ -984,6 +993,7 @@ fn fstat_old(fd: BorrowedFd<'_>) -> io::Result<Stat> {
}

#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "netbsd",
target_os = "redox",
Expand All @@ -999,6 +1009,7 @@ pub(crate) fn fstatfs(fd: BorrowedFd<'_>) -> io::Result<StatFs> {
}

#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand All @@ -1013,6 +1024,7 @@ pub(crate) fn fstatvfs(fd: BorrowedFd<'_>) -> io::Result<StatVfs> {
}

#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand Down Expand Up @@ -1209,6 +1221,7 @@ pub(crate) fn fsync(fd: BorrowedFd<'_>) -> io::Result<()> {

#[cfg(not(any(
target_os = "dragonfly",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "redox",
Expand Down
11 changes: 11 additions & 0 deletions src/backend/libc/fs/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ impl FileType {
/// [`fadvise`]: crate::fs::fadvise
#[cfg(not(any(
target_os = "dragonfly",
target_os = "haiku",
target_os = "illumos",
target_os = "ios",
target_os = "macos",
Expand Down Expand Up @@ -697,6 +698,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand All @@ -708,6 +710,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand All @@ -719,6 +722,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "linux",
target_os = "macos",
Expand All @@ -733,6 +737,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand All @@ -745,6 +750,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand All @@ -757,6 +763,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand All @@ -769,6 +776,7 @@ bitflags! {
#[cfg(not(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand All @@ -781,6 +789,7 @@ bitflags! {
}

#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand Down Expand Up @@ -912,6 +921,7 @@ pub struct Stat {
#[cfg(not(any(
target_os = "android",
target_os = "emscripten",
target_os = "haiku",
target_os = "illumos",
target_os = "linux",
target_os = "l4re",
Expand Down Expand Up @@ -940,6 +950,7 @@ pub type StatFs = c::statfs64;
/// [`statvfs`]: crate::fs::statvfs
/// [`fstatvfs`]: crate::fs::fstatvfs
#[cfg(not(any(
target_os = "haiku",
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
Expand Down
Loading