Skip to content

Commit 504d953

Browse files
committed
Fix test on cygwin
And fill semver file for cygwin.
1 parent d252fc6 commit 504d953

File tree

5 files changed

+872
-18
lines changed

5 files changed

+872
-18
lines changed

libc-test/build.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn src_hotfix_dir() -> PathBuf {
1313

1414
fn do_cc() {
1515
let target = env::var("TARGET").unwrap();
16-
if cfg!(unix) {
16+
if cfg!(unix) || target.contains("cygwin") {
1717
let exclude = ["redox", "wasi", "wali"];
1818
if !exclude.iter().any(|x| target.contains(x)) {
1919
let mut cmsg = cc::Build::new();
@@ -656,6 +656,7 @@ fn test_cygwin(target: &str) {
656656
"dlfcn.h",
657657
"errno.h",
658658
"fcntl.h",
659+
"fnmatch.h",
659660
"grp.h",
660661
"iconv.h",
661662
"langinfo.h",
@@ -666,11 +667,13 @@ fn test_cygwin(target: &str) {
666667
"netinet/tcp.h",
667668
"poll.h",
668669
"pthread.h",
670+
"pty.h",
669671
"pwd.h",
670672
"resolv.h",
671673
"sched.h",
672674
"semaphore.h",
673675
"signal.h",
676+
"spawn.h",
674677
"stddef.h",
675678
"stdlib.h",
676679
"string.h",
@@ -690,6 +693,7 @@ fn test_cygwin(target: &str) {
690693
"sys/uio.h",
691694
"sys/un.h",
692695
"sys/utsname.h",
696+
"sys/vfs.h",
693697
"syslog.h",
694698
"termios.h",
695699
"unistd.h",
@@ -809,7 +813,7 @@ fn test_cygwin(target: &str) {
809813
}
810814
});
811815

812-
cfg.generate("../src/lib.rs", "main.rs");
816+
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
813817
}
814818

815819
fn test_windows(target: &str) {

0 commit comments

Comments
 (0)