File tree 1 file changed +10
-2
lines changed 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 {
277
277
}
278
278
}
279
279
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
+
280
290
extern "C" {
281
291
pub fn isalnum ( c : c_int ) -> c_int ;
282
292
pub fn isalpha ( c : c_int ) -> c_int ;
@@ -319,8 +329,6 @@ extern "C" {
319
329
pub fn feof ( stream : * mut FILE ) -> c_int ;
320
330
pub fn ferror ( stream : * mut FILE ) -> c_int ;
321
331
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 ;
324
332
pub fn atoi ( s : * const c_char ) -> c_int ;
325
333
pub fn strtod ( s : * const c_char , endp : * mut * mut c_char ) -> c_double ;
326
334
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