File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,16 @@ impl ::Clone for fpos_t {
277277 }
278278}
279279
280+ // Special handling for all print and scan type functions because of https://github.com/rust-lang/libc/issues/2860
281+ #[ cfg_attr(
282+ all( windows, target_env = "msvc" ) ,
283+ link( name = "legacy_stdio_definitions" )
284+ ) ]
285+ extern "C" {
286+ pub fn printf ( format : * const c_char , ...) -> :: c_int ;
287+ pub fn fprintf ( stream : * mut FILE , format : * const c_char , ...) -> :: c_int ;
288+ }
289+
280290extern "C" {
281291 pub fn isalnum ( c : c_int ) -> c_int ;
282292 pub fn isalpha ( c : c_int ) -> c_int ;
@@ -319,8 +329,6 @@ extern "C" {
319329 pub fn feof ( stream : * mut FILE ) -> c_int ;
320330 pub fn ferror ( stream : * mut FILE ) -> c_int ;
321331 pub fn perror ( s : * const c_char ) ;
322- pub fn printf ( format : * const c_char , ...) -> :: c_int ;
323- pub fn fprintf ( stream : * mut FILE , format : * const c_char , ...) -> :: c_int ;
324332 pub fn atoi ( s : * const c_char ) -> c_int ;
325333 pub fn strtod ( s : * const c_char , endp : * mut * mut c_char ) -> c_double ;
326334 pub fn strtof ( s : * const c_char , endp : * mut * mut c_char ) -> c_float ;
You can’t perform that action at this time.
0 commit comments