Skip to content

Commit 0dd7f2d

Browse files
committed
instead backfill constants on msvc
1 parent 0581f92 commit 0dd7f2d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

libc-test/build.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ fn main() {
5555
cfg.define("in_port_t", Some("uint16_t"));
5656
}
5757

58+
// these constants do not exist in msvc, but they are still useful
59+
if msvc {
60+
cfg.define("STDIN_FILENO", Some("0"));
61+
cfg.define("STDOUT_FILENO", Some("1"));
62+
cfg.define("STDERR_FILENO", Some("2"));
63+
}
64+
5865
cfg.header("errno.h")
5966
.header("fcntl.h")
6067
.header("limits.h")
@@ -713,9 +720,6 @@ fn main() {
713720
s if ios && s.starts_with("RTV_") => true,
714721
s if ios && s.starts_with("DLT_") => true,
715722

716-
// these constants do not exist in msvc, but they are still useful
717-
"STDIN_FILENO" | "STDOUT_FILENO" | "STDERR_FILENO" if msvc => true,
718-
719723
_ => false,
720724
}
721725
});

0 commit comments

Comments
 (0)