From 904f42826ffc074b801476596c258723c6e12c0f Mon Sep 17 00:00:00 2001 From: PeterM <1434309+petesmc@users.noreply.github.com> Date: Sat, 12 Jul 2025 21:44:38 -0700 Subject: [PATCH] Remove Windows GNU restriction and add to CI --- .github/workflows/checks.yaml | 4 ++++ bzip2.rs | 6 +++--- libbz2-rs-sys/src/high_level.rs | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 2771f12e4..510cbe756 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -48,6 +48,10 @@ jobs: os: windows-2022 features: "" target: "x86_64-pc-windows-gnu" + - rust: stable-x86_64-msvc + os: windows-2022 + features: "" + target: "x86_64-pc-windows-msvc" steps: - name: Checkout sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 diff --git a/bzip2.rs b/bzip2.rs index 325885439..f428c997c 100644 --- a/bzip2.rs +++ b/bzip2.rs @@ -31,7 +31,7 @@ extern "C" { static mut stdout_handle: *mut FILE; } -#[cfg(all(target_os = "windows", target_env = "gnu"))] +#[cfg(target_os = "windows")] extern "C" { fn __acrt_iob_func(idx: libc::c_uint) -> *mut FILE; } @@ -43,7 +43,7 @@ macro_rules! STDIN { }; } -#[cfg(all(target_os = "windows", target_env = "gnu"))] +#[cfg(target_os = "windows")] macro_rules! STDIN { () => { __acrt_iob_func(0) @@ -57,7 +57,7 @@ macro_rules! STDOUT { }; } -#[cfg(all(target_os = "windows", target_env = "gnu"))] +#[cfg(target_os = "windows")] macro_rules! STDOUT { () => { __acrt_iob_func(1) diff --git a/libbz2-rs-sys/src/high_level.rs b/libbz2-rs-sys/src/high_level.rs index 6446bee98..fff40af23 100644 --- a/libbz2-rs-sys/src/high_level.rs +++ b/libbz2-rs-sys/src/high_level.rs @@ -33,7 +33,7 @@ extern "C" { static mut stdout: *mut FILE; } -#[cfg(all(target_os = "windows", target_env = "gnu"))] +#[cfg(target_os = "windows")] extern "C" { fn __acrt_iob_func(idx: libc::c_uint) -> *mut FILE; } @@ -45,7 +45,7 @@ macro_rules! STDIN { }; } -#[cfg(all(target_os = "windows", target_env = "gnu"))] +#[cfg(target_os = "windows")] macro_rules! STDIN { () => { __acrt_iob_func(0) @@ -59,7 +59,7 @@ macro_rules! STDOUT { }; } -#[cfg(all(target_os = "windows", target_env = "gnu"))] +#[cfg(target_os = "windows")] macro_rules! STDOUT { () => { __acrt_iob_func(1)