Skip to content
Open
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
25 changes: 17 additions & 8 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5445,14 +5445,24 @@ fn test_aix(target: &str) {

cfg.skip_struct(move |struct_| {
match struct_.ident() {
// '__poll_ctl_ext_u' and '__pollfd_ext_u' are for unnamed unions.
"__poll_ctl_ext_u" => true,
"__pollfd_ext_u" => true,

// 'struct fpreg_t' is not defined in AIX headers. It is created to
// allow type 'double' to be used in signal contexts.
"fpreg_t" => true,

// These structures are guarded by the `_KERNEL` macro in the AIX
// header.
"fileops_t" | "file" => true,

_ => false,
}
});

cfg.skip_union(|union_| {
match union_.ident() {
// '__poll_ctl_ext_u' and '__pollfd_ext_u' are for unnamed unions.
"__poll_ctl_ext_u" => true,
"__pollfd_ext_u" => true,

// This type is defined for a union used within `struct ld_info`.
// The AIX header does not declare a separate standalone union
// type for it.
Expand All @@ -5461,10 +5471,6 @@ fn test_aix(target: &str) {
// This is a simplified version of the AIX union `_simple_lock`.
"_kernel_simple_lock" => true,

// These structures are guarded by the `_KERNEL` macro in the AIX
// header.
"fileops_t" | "file" => true,

_ => false,
}
});
Expand Down Expand Up @@ -5591,6 +5597,9 @@ fn test_aix(target: &str) {
_ => false,
});

let c_enums = ["uio_rw"];
cfg.alias_is_c_enum(move |e| c_enums.contains(&e));

ctest::generate_test(&mut cfg, "../src/lib.rs", "ctest_output.rs").unwrap();
}

Expand Down
Loading