Prerequisites for Solaris testing support
With these changes there are no "undeclared" errors for libc-test on Solaris anymore.
This commit is contained in:
parent
2b948828c5
commit
b3870b405b
@ -24,6 +24,7 @@ fn main() {
|
||||
let netbsd = target.contains("netbsd");
|
||||
let openbsd = target.contains("openbsd");
|
||||
let rumprun = target.contains("rumprun");
|
||||
let solaris = target.contains("solaris");
|
||||
let bsdlike = freebsd || apple || netbsd || openbsd || dragonfly;
|
||||
let mut cfg = ctest::TestGenerator::new();
|
||||
|
||||
@ -34,6 +35,8 @@ fn main() {
|
||||
cfg.define("_NETBSD_SOURCE", Some("1"));
|
||||
} else if windows {
|
||||
cfg.define("_WIN32_WINNT", Some("0x8000"));
|
||||
} else if solaris {
|
||||
cfg.define("_REENTRANT", None);
|
||||
}
|
||||
|
||||
// Android doesn't actually have in_port_t but it's much easier if we
|
||||
@ -103,7 +106,9 @@ fn main() {
|
||||
cfg.header("pwd.h");
|
||||
cfg.header("grp.h");
|
||||
cfg.header("sys/utsname.h");
|
||||
cfg.header("sys/ptrace.h");
|
||||
if !solaris {
|
||||
cfg.header("sys/ptrace.h");
|
||||
}
|
||||
cfg.header("sys/mount.h");
|
||||
cfg.header("sys/uio.h");
|
||||
cfg.header("sched.h");
|
||||
@ -132,11 +137,11 @@ fn main() {
|
||||
cfg.header("ifaddrs.h");
|
||||
cfg.header("langinfo.h");
|
||||
|
||||
if !openbsd && !freebsd && !dragonfly {
|
||||
if !openbsd && !freebsd && !dragonfly && !solaris {
|
||||
cfg.header("sys/quota.h");
|
||||
}
|
||||
|
||||
if !musl && !x32 {
|
||||
if !musl && !x32 && !solaris {
|
||||
cfg.header("sys/sysctl.h");
|
||||
}
|
||||
|
||||
@ -291,6 +296,13 @@ fn main() {
|
||||
cfg.header("sys/ioctl_compat.h");
|
||||
}
|
||||
|
||||
if solaris {
|
||||
cfg.header("port.h");
|
||||
cfg.header("ucontext.h");
|
||||
cfg.header("sys/filio.h");
|
||||
cfg.header("sys/loadavg.h");
|
||||
}
|
||||
|
||||
if linux || freebsd || dragonfly || netbsd || apple || emscripten {
|
||||
if !uclibc {
|
||||
cfg.header("aio.h");
|
||||
@ -428,6 +440,8 @@ fn main() {
|
||||
"FILE_ATTRIBUTE_INTEGRITY_STREAM" |
|
||||
"ERROR_NOTHING_TO_TERMINATE" if mingw => true,
|
||||
|
||||
"SIG_DFL" |
|
||||
"SIG_ERR" |
|
||||
"SIG_IGN" => true, // sighandler_t weirdness
|
||||
"SIGUNUSED" => true, // removed in glibc 2.26
|
||||
|
||||
@ -515,6 +529,14 @@ fn main() {
|
||||
"BOTHER" => true,
|
||||
|
||||
"MFD_CLOEXEC" | "MFD_ALLOW_SEALING" if !mips && musl => true,
|
||||
|
||||
"DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG" | "DT_LNK" | "DT_SOCK" if solaris => true,
|
||||
"USRQUOTA" | "GRPQUOTA" if solaris => true,
|
||||
"PRIO_MIN" | "PRIO_MAX" if solaris => true,
|
||||
|
||||
// These are defined for Solaris 11, but the crate is tested on illumos, where they are currently not defined
|
||||
"EADI" | "PORT_SOURCE_POSTWAIT" | "PORT_SOURCE_SIGNAL" | "PTHREAD_STACK_MIN" => true,
|
||||
|
||||
_ => false,
|
||||
}
|
||||
});
|
||||
@ -636,6 +658,11 @@ fn main() {
|
||||
// Ignore these until next major version.
|
||||
"bind" | "writev" | "readv" | "sendmsg" | "recvmsg" if android && (aarch64 || x86_64) => true,
|
||||
|
||||
// signal is defined with sighandler_t, so ignore
|
||||
"signal" if solaris => true,
|
||||
|
||||
"cfmakeraw" | "cfsetspeed" if solaris => true,
|
||||
|
||||
_ => false,
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user