diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/libc/src/windows | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libc/src/windows')
-rw-r--r-- | vendor/libc/src/windows/mod.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/vendor/libc/src/windows/mod.rs b/vendor/libc/src/windows/mod.rs index 7f2f1ded1..26bff7f7a 100644 --- a/vendor/libc/src/windows/mod.rs +++ b/vendor/libc/src/windows/mod.rs @@ -278,13 +278,17 @@ impl ::Clone for fpos_t { } // Special handling for all print and scan type functions because of https://github.com/rust-lang/libc/issues/2860 -#[cfg_attr( - all(windows, target_env = "msvc"), - link(name = "legacy_stdio_definitions") -)] -extern "C" { - pub fn printf(format: *const c_char, ...) -> ::c_int; - pub fn fprintf(stream: *mut FILE, format: *const c_char, ...) -> ::c_int; +cfg_if! { + if #[cfg(not(feature = "rustc-dep-of-std"))] { + #[cfg_attr( + all(windows, target_env = "msvc"), + link(name = "legacy_stdio_definitions") + )] + extern "C" { + pub fn printf(format: *const c_char, ...) -> ::c_int; + pub fn fprintf(stream: *mut FILE, format: *const c_char, ...) -> ::c_int; + } + } } extern "C" { |