diff options
author | Mackenzie Clark <mackenzie.a.z.c@gmail.com> | 2018-12-20 15:39:42 -0800 |
---|---|---|
committer | Mackenzie Clark <mackenzie.a.z.c@gmail.com> | 2018-12-20 15:39:42 -0800 |
commit | 0dd7f2d153cf7b744bdf3e49af67cfe780b2e97d (patch) | |
tree | ab8275df8d8c10f178bbc386f192da8c0213efef | |
parent | 0581f926ffdebfd399f1a89d742e3b2e2e4f3a3d (diff) | |
download | rust-libc-0dd7f2d153cf7b744bdf3e49af67cfe780b2e97d.tar.gz |
instead backfill constants on msvc
-rw-r--r-- | libc-test/build.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 2615826f82..ec0d1e0de0 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -55,6 +55,13 @@ fn main() { cfg.define("in_port_t", Some("uint16_t")); } + // these constants do not exist in msvc, but they are still useful + if msvc { + cfg.define("STDIN_FILENO", Some("0")); + cfg.define("STDOUT_FILENO", Some("1")); + cfg.define("STDERR_FILENO", Some("2")); + } + cfg.header("errno.h") .header("fcntl.h") .header("limits.h") @@ -713,9 +720,6 @@ fn main() { s if ios && s.starts_with("RTV_") => true, s if ios && s.starts_with("DLT_") => true, - // these constants do not exist in msvc, but they are still useful - "STDIN_FILENO" | "STDOUT_FILENO" | "STDERR_FILENO" if msvc => true, - _ => false, } }); |