Skip to content

Commit 5fdd0c4

Browse files
committed
Adding required defines and functions for vxworks
1 parent 586ccc1 commit 5fdd0c4

File tree

3 files changed

+1247
-56
lines changed

3 files changed

+1247
-56
lines changed

libc-test/build.rs

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn do_semver() {
104104
// maintain a file for Android.
105105
// NOTE: AIX doesn't include the unix file because there are definitions
106106
// missing on AIX. It is easier to maintain a file for AIX.
107-
if family != os && !matches!(os.as_str(), "android" | "aix") {
107+
if family != os && !matches!(os.as_str(), "android" | "aix") && os != "vxworks" {
108108
process_semver_file(&mut output, &mut semver_root, &family);
109109
}
110110
// We don't do semver for unknown targets.
@@ -3464,6 +3464,7 @@ fn test_vxworks(target: &str) {
34643464
let mut cfg = ctest_old::TestGenerator::new();
34653465
headers! { cfg:
34663466
"vxWorks.h",
3467+
"semLibCommon.h",
34673468
"yvals.h",
34683469
"nfs/nfsCommon.h",
34693470
"rtpLibCommon.h",
@@ -3480,13 +3481,11 @@ fn test_vxworks(target: &str) {
34803481
"elf.h",
34813482
"fcntl.h",
34823483
"grp.h",
3483-
"sys/poll.h",
34843484
"ifaddrs.h",
34853485
"langinfo.h",
34863486
"limits.h",
34873487
"link.h",
34883488
"locale.h",
3489-
"sys/stat.h",
34903489
"netdb.h",
34913490
"pthread.h",
34923491
"pwd.h",
@@ -3498,6 +3497,9 @@ fn test_vxworks(target: &str) {
34983497
"stdio.h",
34993498
"stdlib.h",
35003499
"string.h",
3500+
"sys/select.h",
3501+
"sys/stat.h",
3502+
"sys/poll.h",
35013503
"sys/file.h",
35023504
"sys/ioctl.h",
35033505
"sys/socket.h",
@@ -3508,7 +3510,14 @@ fn test_vxworks(target: &str) {
35083510
"sys/un.h",
35093511
"sys/utsname.h",
35103512
"sys/wait.h",
3513+
"sys/ttycom.h",
3514+
"sys/utsname.h",
3515+
"sys/resource.h",
3516+
"sys/mman.h",
35113517
"netinet/tcp.h",
3518+
"netinet/udp.h",
3519+
"netinet/in.h",
3520+
"netinet6/in6.h",
35123521
"syslog.h",
35133522
"termios.h",
35143523
"time.h",
@@ -3517,26 +3526,29 @@ fn test_vxworks(target: &str) {
35173526
"utime.h",
35183527
"wchar.h",
35193528
"errno.h",
3520-
"sys/mman.h",
35213529
"pathLib.h",
35223530
"mqueue.h",
3531+
"fnmatch.h",
3532+
"sioLibCommon.h",
3533+
"net/if.h",
35233534
}
35243535
// FIXME(vxworks)
35253536
cfg.skip_const(move |name| match name {
35263537
// sighandler_t weirdness
35273538
"SIG_DFL" | "SIG_ERR" | "SIG_IGN"
35283539
// This is not defined in vxWorks
3529-
| "RTLD_DEFAULT" => true,
3540+
| "RTLD_DEFAULT" | "S_ISVTX" | "SIGIO" | "SIGWINCH" | "SIGLOST" | "PRIO_PROCESS" => true,
35303541
_ => false,
35313542
});
35323543
// FIXME(vxworks)
35333544
cfg.skip_type(move |ty| match ty {
35343545
"stat64" | "sighandler_t" | "off64_t" => true,
3546+
"__uint128" => true,
35353547
_ => false,
35363548
});
35373549

35383550
cfg.skip_field_type(move |struct_, field| match (struct_, field) {
3539-
("siginfo_t", "si_value") | ("stat", "st_size") | ("sigaction", "sa_u") => true,
3551+
("siginfo_t", "si_value") | ("stat", "st_size") | ("sigaction", "sa_sigaction") => true,
35403552
_ => false,
35413553
});
35423554

@@ -3553,7 +3565,7 @@ fn test_vxworks(target: &str) {
35533565
// FIXME(vxworks)
35543566
cfg.skip_fn(move |name| match name {
35553567
// sighandler_t
3556-
"signal"
3568+
| "signal"
35573569
// not used in static linking by default
35583570
| "dlerror" => true,
35593571
_ => false,

0 commit comments

Comments
 (0)