Skip to content

Add QFMT_VFS_V1 on MIPS and test all QFMT_ constants #747

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

Merged
merged 1 commit into from
Aug 30, 2017
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
9 changes: 3 additions & 6 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,6 @@ fn main() {
"NOTE_EXIT_REPARENTED" |
"NOTE_REAP" if apple => true,

// The linux/quota.h header file which defines these can't be
// included with sys/quota.h currently on MIPS, so we don't include
// it and just ignore these constants
"QFMT_VFS_OLD" |
"QFMT_VFS_V0" if mips && linux => true,

// These constants were removed in FreeBSD 11 (svn r273250) but will
// still be accepted and ignored at runtime.
"MAP_RENAME" |
Expand Down Expand Up @@ -477,6 +471,7 @@ fn main() {
// are header conflicts if we try to include the headers that define them here.
"F_CANCELLK" | "F_ADD_SEALS" | "F_GET_SEALS" => true,
"F_SEAL_SEAL" | "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE" => true,
"QFMT_VFS_OLD" | "QFMT_VFS_V0" | "QFMT_VFS_V1" if mips && linux => true, // Only on MIPS

_ => false,
}
Expand Down Expand Up @@ -667,10 +662,12 @@ fn main() {
} else {
cfg.header("linux/fcntl.h");
}
cfg.header("linux/quota.h");
cfg.skip_const(move |name| {
match name {
"F_CANCELLK" | "F_ADD_SEALS" | "F_GET_SEALS" => false,
"F_SEAL_SEAL" | "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE" => false,
"QFMT_VFS_OLD" | "QFMT_VFS_V0" | "QFMT_VFS_V1" if mips && linux => false,
_ => true,
}
});
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ pub const EPOLLONESHOT: ::c_int = 0x40000000;

pub const QFMT_VFS_OLD: ::c_int = 1;
pub const QFMT_VFS_V0: ::c_int = 2;
pub const QFMT_VFS_V1: ::c_int = 4;

pub const EFD_SEMAPHORE: ::c_int = 0x1;

Expand Down
2 changes: 0 additions & 2 deletions src/unix/notbsd/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;

pub const CPU_SETSIZE: ::c_int = 128;

pub const QFMT_VFS_V1: ::c_int = 4;

pub const PTRACE_TRACEME: ::c_int = 0;
pub const PTRACE_PEEKTEXT: ::c_int = 1;
pub const PTRACE_PEEKDATA: ::c_int = 2;
Expand Down
2 changes: 0 additions & 2 deletions src/unix/notbsd/linux/other/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ pub const VEOF: usize = 4;

pub const CPU_SETSIZE: ::c_int = 0x400;

pub const QFMT_VFS_V1: ::c_int = 4;

pub const PTRACE_TRACEME: ::c_uint = 0;
pub const PTRACE_PEEKTEXT: ::c_uint = 1;
pub const PTRACE_PEEKDATA: ::c_uint = 2;
Expand Down
2 changes: 0 additions & 2 deletions src/unix/notbsd/linux/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,6 @@ pub const CPU_SETSIZE: ::c_int = 0x400;

pub const EXTPROC: ::tcflag_t = 0x00010000;

pub const QFMT_VFS_V1: ::c_int = 4;

pub const PTRACE_TRACEME: ::c_uint = 0;
pub const PTRACE_PEEKTEXT: ::c_uint = 1;
pub const PTRACE_PEEKDATA: ::c_uint = 2;
Expand Down